A tool wear monitoring and workpiece surface quality online regulation method under variable working conditions
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-08
- Publication Date
- 2026-08-11
AI Technical Summary
[0003]在现有的刀具磨损状态监测技术中,基于刀具磨损机理解析模型的方法虽然具有较好的模型可解释性,但是在建立刀具磨损机理模型的过程中,通常对实际加工过程中的环境和力学关系进行了大量的简化,太过理想化,因此不能很准确地用于预测刀具磨损状态,且这种机理解析模型中的模型参数在复杂多变的工况下通常较难标定,其普适性较差
[0035] The beneficial effects of this invention are as follows: This invention predicts tool wear by using a data-driven target working condition tool wear prediction model, and then performs data transfer on the prediction results, which can improve prediction accuracy while reducing the training dataset. Finally, the tool wear amount obtained by combining the data-driven tool wear amount with the tool wear amount obtained by the wear analysis mechanism model is combined to further improve prediction accuracy and increase the interpretability of the results.
Smart Images

Figure CN118081481B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent manufacturing technology, and in particular relates to a method for monitoring tool wear and controlling workpiece surface quality online under varying working conditions. Background Technology
[0002] Currently, in CNC machining, tool wear is a key factor affecting machining quality. The judgment of tool wear status and tool change timing mainly relies on human experience. This tool change strategy leads to two problems: First, if the tool is changed too early, a tool that could still be used is replaced prematurely, wasting its remaining value and increasing costs and downtime. Second, if the tool is changed too late, tools that have exceeded the dulling failure standard will reduce the machining quality of the parts. Therefore, real-time monitoring of tool wear status and timely issuance of warnings for tools exceeding the dulling failure standard, prompting operators to replace the tools, can effectively improve machining efficiency and quality, and reduce production costs.
[0003] In existing tool wear condition monitoring technologies, the method based on the tool wear mechanism analysis model has good model interpretability. However, in the process of establishing the tool wear mechanism model, the environment and mechanical relationship in the actual machining process are usually greatly simplified, which is too idealized. Therefore, it cannot be used to accurately predict the tool wear condition. Moreover, the model parameters in this mechanism analysis model are usually difficult to calibrate under complex and variable working conditions, and its universality is poor. Summary of the Invention
[0004] The purpose of this invention is to provide a method for monitoring tool wear and controlling workpiece surface quality online under varying working conditions, combining a data-driven model and a wear analysis mechanism model to improve the accuracy of tool wear monitoring.
[0005] This invention adopts the following technical solution: a method for monitoring tool wear under varying working conditions, comprising the following steps:
[0006] Collect machine tool status data corresponding to the current machining parameters;
[0007] Using machine tool status data as input information, the first tool's predicted wear amount is obtained by using a target working condition tool wear amount prediction model.
[0008] Using the predicted wear amount of the first tool as a known quantity, the predicted wear amount of the second tool is calculated based on the mapping relationship between the tool wear amount prediction model for the target working condition and the tool wear amount prediction model for the original working condition; wherein, the tool wear amount prediction model for the original working condition is the tool wear amount prediction model corresponding to the predetermined machining parameters;
[0009] The predicted wear amount of the fourth tool is determined based on the predicted wear amount of the second tool and the predicted wear amount of the third tool; wherein, the predicted wear amount of the third tool is the tool predicted wear amount calculated using the wear analysis mechanism model.
[0010] Furthermore, the target working condition tool wear prediction model is based on the Transformer model, including an encoder and a decoder;
[0011] The encoder consists of a Multi-Head Attention layer, a Feed Forward layer, and two Add & Norm layers;
[0012] The decoder includes a multi-layer FC network.
[0013] Furthermore, the mapping relationship between the target working condition tool wear prediction model and the original working condition tool wear prediction model is established through the following method:
[0014]
[0015] Among them, X s X represents the predicted wear amount of the first tool. t Let φ(x) represent the predicted wear amount of the second tool, n represent the number of training samples used to train the tool wear prediction model for the target working condition, m represent the number of training samples used to train the tool wear prediction model for the original working condition, n < m, φ() is the mapping function, which maps the tool wear features to the regenerated Hilbert space, H represents the regenerated Hilbert space, and x si This represents the i-th training data, x, used to train the tool wear prediction model for the target working condition. tj These represent the j-th training data MMD used to train the original working condition tool wear prediction model. 2 (φ,X s ,X t () indicates the maximum mean difference.
[0016] Furthermore, the loss function of the target working condition tool wear prediction model is:
[0017]
[0018] Among them, L total L represents the loss function. mse (X s ,Y s ) represents the root mean square error loss, and Y represents the actual tool wear. This represents the output of the Multi-Head Attention layer of the encoder in the target working condition tool wear prediction model. Output of the Multi-Head Attention layer of the encoder in the original tool wear prediction model The measurement loss between them This represents the output of the encoder feed-forward layer of the target tool wear prediction model. Compared with the original working condition tool wear prediction model encoder feed forward layer output The measurement loss between them λ1, λ2, and λ3 represent the metric loss between the output of the encoder Add&Norm layer of the tool wear prediction model for the target working condition and the output of the encoder Add&Norm layer of the tool wear prediction model for the original working condition. λ1, λ2, and λ3 are all hyperparameters between 0 and 1.
[0019] Furthermore, it also includes:
[0020] The predicted wear amount of the fourth tool is compared with the tool wear amount threshold, and the tool wear state is assigned to the predicted wear amount of the fourth tool at the current moment based on the comparison result.
[0021] When the tool wear state is different from both the previous and subsequent tool wear states, the tool wear state is modified to be the same as the previous tool wear state.
[0022] Another technical solution of the present invention: a tool wear monitoring device under varying working conditions, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described method.
[0023] Another technical solution of the present invention: a method for online control of workpiece surface quality, comprising the following steps:
[0024] The predicted wear amount of the fourth tool and its corresponding machining parameters are obtained; the predicted wear amount of the fourth tool is obtained through the method described above.
[0025] The predicted wear of the fourth tool and its corresponding machining parameters are input into the first surface integrity parameter prediction model to obtain the first workpiece surface integrity prediction parameters.
[0026] The surface integrity prediction parameters of the first workpiece are corrected to obtain the surface integrity prediction parameters of the second workpiece.
[0027] When the predicted surface integrity parameter of the second workpiece reaches the preset threshold of the surface integrity parameter, the machining parameters are adjusted according to the predicted surface integrity parameter of the second workpiece and the predicted wear amount of the fourth tool.
[0028] Furthermore, the correction of the predicted parameters for the surface integrity of the first workpiece includes:
[0029] The surface integrity prediction parameters of the first workpiece are corrected based on the correspondence between the first surface integrity parameter prediction model and the second surface integrity parameter prediction model to obtain the surface integrity prediction parameters of the second workpiece; wherein, the first surface integrity parameter prediction model and the second surface integrity parameter prediction model are obtained by training with different machining parameters.
[0030] Furthermore, the network architecture of the first surface integrity parameter prediction model and the second surface integrity parameter prediction model is the same;
[0031] The first surface integrity parameter prediction model is based on the Transformer model, which includes an encoder and a decoder;
[0032] The encoder consists of a Multi-Head Attention layer, a Feed Forward layer, and two Add & Norm layers;
[0033] The decoder includes a multi-layer FC network.
[0034] Another technical solution of the present invention: an online workpiece surface quality control device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described method.
[0035] The beneficial effects of this invention are as follows: This invention predicts tool wear by using a data-driven target working condition tool wear prediction model, and then performs data transfer on the prediction results, which can improve prediction accuracy while reducing the training dataset. Finally, the tool wear amount obtained by combining the data-driven tool wear amount with the tool wear amount obtained by the wear analysis mechanism model is combined to further improve prediction accuracy and increase the interpretability of the results. Attached Figure Description
[0036] Figure 1 This is a flowchart of a tool wear monitoring method under varying working conditions according to an embodiment of the present invention;
[0037] Figure 2 This is a schematic diagram illustrating the principle of the transfer learning strategy in an embodiment of the present invention;
[0038] Figure 3 This is a flowchart of an online workpiece surface quality control method according to an embodiment of the present invention;
[0039] Figure 4 This is a schematic diagram of the first surface integrity parameter prediction model in an embodiment of the present invention;
[0040] Figure 5This is a schematic diagram illustrating the transfer learning strategy applied in the online workpiece surface quality control method in this embodiment of the invention.
[0041] Figure 6 This is a partial schematic diagram of an online control method for workpiece surface quality in an embodiment of the invention. Detailed Implementation
[0042] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments.
[0043] Data-driven model-based methods can establish a nonlinear mapping relationship between multi-source heterogeneous physical signals and tool wear state through model training, which has higher tool wear state monitoring accuracy compared to tool wear mechanism models.
[0044] Data-driven model-based tool wear condition monitoring involves acquiring multiple physical signals from the machine tool (such as vibration, force, current, power, and acoustic emission signals) using sensors. These raw, heterogeneous physical signals are then preprocessed. The preprocessed features are used as input to a data-driven model to establish a mapping between these features and tool wear values, enabling real-time tool wear condition monitoring during machining. However, during the acquisition of raw machine tool physical signals, environmental interference and other factors can mask the original signal features. Therefore, using appropriate signal feature extraction methods to extract ideal physical signal features is crucial for the accuracy of tool wear condition monitoring. Inadequate feature extraction can lead to model training errors.
[0045] When using data-driven models to establish a nonlinear mapping relationship between multi-source heterogeneous physical signal features and tool wear, the most widely used deep learning model in existing research is the LSTM (Long Short-Term Memory) model. Although the LSTM model alleviates the gradient explosion and gradient vanishing problems in recurrent neural networks (RNNs) to some extent, its performance is greatly limited because it uses sequential input, which prevents parallel computation. Moreover, in problems with long sequences, LSTM only alleviates the gradient vanishing and gradient explosion problems, but does not fundamentally solve the problem. In contrast, the attention mechanism in the transformer model fundamentally solves the problem, and the parallelism of the transformer is far superior to that of LSTM, with higher computational efficiency and better computing power.
[0046] Data-driven tool wear condition monitoring methods rely entirely on curve fitting between data. Excessive datasets can obscure the physical relationships between the data and fail to consider the actual physical relationship between the tool and the workpiece during the machining process. This results in poor interpretability and generalization ability of the model. Furthermore, data-driven tool wear condition monitoring methods require a large number of experimental results to establish a basic experimental dataset for model training, which is a significant workload.
[0047] The tool wear condition monitoring method based on the fusion of mechanism and data-driven model can not only ensure the accuracy of tool wear condition monitoring, but also make the model more interpretable. Existing data-driven models can only solve the tool wear condition monitoring problem under a single working condition. Introducing the transfer learning strategy into the data-driven model can solve this problem better, realize tool wear condition monitoring under varying working conditions, and reduce the amount of data required to collect the basic test dataset for tool wear tests under different working conditions.
[0048] Surface integrity refers to the surface layer quality of a workpiece, specifically the surface texture and metallurgical quality of the surface layer after machining. It is an important factor affecting the fatigue life of a workpiece.
[0049] In existing workpiece machining processes, machining parameters are constrained by the workpiece surface integrity to obtain the workpiece machining parameters. Existing surface integrity prediction and process control methods only consider the influence of process parameters on surface integrity under constant process parameters. Although the process parameters are constant during machine tool machining, tool wear varies, meaning the actual machining state is time-varying. Therefore, using process parameters obtained under constant process parameters ultimately fails to achieve a satisfactory workpiece surface integrity state.
[0050] Existing methods for surface integrity prediction and process control only consider the influence of process parameters on surface integrity under constant process parameters. However, in actual machining, as tool wear evolves, the contact area and contact mode between the tool and the workpiece constantly change. This means that although the machining process parameters are constant, the surface integrity of the workpiece is not maintained under constant machining parameters as the machining process progresses. Furthermore, existing data-driven tool wear condition monitoring models do not consider the relationships between the characteristics of multi-source heterogeneous physical signals input, resulting in low monitoring accuracy.
[0051] However, if a nonlinear mapping relationship between different tool wear states, different machining process parameters and surface integrity is established through a data-driven model and integrated into the tool wear state monitoring system, the real-time machining surface integrity can be predicted through real-time machining parameters and tool wear states. Based on the real-time tool wear state monitoring value and the corresponding surface integrity as coupling constraints, online intelligent control of machining process parameters can be carried out, which can significantly improve the surface quality of the workpiece.
[0052] This invention constructs a mechanism-data-driven fusion tool wear state monitoring method under varying operating conditions, incorporating a transfer learning strategy. This improves the accuracy of tool wear state monitoring. Then, considering the coupled influence of real-time machining process parameters and tool wear state monitoring values on surface integrity, the real-time machining process parameters and tool wear state monitoring values are used as inputs. A transformer model incorporating a transfer learning strategy is then used to obtain surface integrity monitoring values under varying operating conditions. The real-time tool wear state and the corresponding surface integrity monitoring values are used as coupling constraints to adjust the machining process parameters online. This invention constructs a mechanism-data-driven fusion tool wear state monitoring model and a surface integrity prediction data-driven model under varying operating conditions, and achieves intelligent control of process parameters, improving the accuracy of tool wear state monitoring and the surface quality of the machined workpiece.
[0053] This invention discloses a method for monitoring tool wear under varying working conditions, such as... Figure 1 As shown, the process includes the following steps: collecting machine tool status data corresponding to the current machining parameters; using the machine tool status data as input information, predicting the first tool wear amount using a target working condition tool wear amount prediction model; using the first tool wear amount as a known quantity, calculating the second tool wear amount based on the mapping relationship between the target working condition tool wear amount prediction model and the original working condition tool wear amount prediction model; wherein, the original working condition tool wear amount prediction model is the tool wear amount prediction model corresponding to the predetermined machining parameters; determining the fourth tool wear amount based on the second tool wear amount and the third tool wear amount; wherein, the third tool wear amount is the tool wear amount calculated using a wear analysis mechanism model.
[0054] This invention predicts tool wear by using a data-driven target working condition tool wear prediction model, and then performs data transfer on the prediction results, which can improve prediction accuracy while reducing the training dataset. Finally, the tool wear data obtained from the data-driven tool wear data and the tool wear data obtained from the wear analysis mechanism model are combined to further improve prediction accuracy and increase the interpretability of the results.
[0055] In this embodiment of the invention, the machine tool status data includes spindle vibration signal, AE signal and force signal, and the machining parameters correspond to NC instruction data.
[0056] After collecting machine tool status data, this data needs to be preprocessed to ensure the accuracy of subsequent predictions and avoid the impact of abnormal data on the prediction model. The preprocessing process includes outlier removal, truncation of invalid data during tool advance and retraction, noise reduction filtering, signal feature extraction, feature dimensionality reduction, feature fusion, and signal numerical normalization.
[0057] Specifically, outlier removal can be performed using the Isolation Forest algorithm to check for outliers, and any constant values detected can be removed. Invalid data truncation during tool advance and retraction can be achieved using the larger quartile method.
[0058] After removing outliers and truncating invalid data from tool advances and retreats, noise reduction filtering is performed, specifically using particle filtering.
[0059] Signal feature extraction consists of three parts: time-domain feature extraction, frequency-domain feature extraction, and time-frequency-domain feature extraction.
[0060] Feature dimensionality reduction involves calculating the correlation coefficients of the extracted signal features, arranging them according to the correlation coefficients, removing weakly correlated signal features, and retaining strongly correlated signal features to reduce the dimensionality of the signal features.
[0061] Signal numerical normalization is a process of normalizing the characteristic values of various physical signals of different magnitudes, limiting the data to a certain range, and eliminating the adverse effects caused by outlier sample data values.
[0062] Then feature fusion is performed. In this embodiment, principal component analysis (PCA) is used for feature fusion.
[0063] As a specific implementation method, the target working condition tool wear prediction model is based on the Transformer model, which includes an encoder and a decoder. The encoder includes a Multi-Head Attention layer, a Feed Forward layer and two Add & Norm layers. The decoder includes a multi-layer FC network.
[0064] Specifically, by utilizing the Multi-head Attention layer in the Transformer model, the coupling effects between multiple different signal features and tool wear can be identified. Based on this relationship, a feedforward neural network is used for recursive calculations to achieve feature extraction at different levels. Residual connections and layer normalization calculations are added to each layer to avoid gradient anomalies that could prevent the model from being optimized and trained.
[0065] More specifically, the first step is to obtain the representation vector X of the input signal features. Embedding X EmbeddingThe signal feature data point position is obtained by adding the input signal feature embedding and the signal feature data point position embedding. In this embodiment of the invention, the embedding represents the value of the spindle vibration signal, AE signal and force signal, and the signal feature data point position embedding represents the value of the time node conversion corresponding to the above machine tool status data.
[0066] The embedding of input signal features can be obtained by convolutional mapping. The position embedding of the data points of the input signal features can be represented by PE, and the dimension of the PE is the same as that of the input signal feature embedding. The calculation process of PE is as follows:
[0067] PE (pos,2i) =sin(pos / 10000) 2i / d (1)
[0068] PE (pos,2i+1) =cos(pos / 10000) 2i / d (2)
[0069] Where pos represents the position of the input signal feature data point in the entire data segment, d represents the dimension of PE, 2i represents an even dimension, 2i+1 represents an odd dimension (i.e., 2i≤d, 2i+1≤d), and i is a natural number.
[0070] Then represent vector X Embedding The information is fed into the Encoder block, and after passing through the Encoder block, the encoded information matrix C can be obtained. The Encoder block contains a Multi-Head Attention layer, a Feed Forward layer, and two Add & Norm layers.
[0071] First, Multi-Head Attention is used, which consists of multiple Self-Attention mechanisms. Self-Attention requires Q (query), K (key), and V (value). Q, K, and V are obtained through a linear transformation of the input to Self-Attention. Then, the output of Self-Attention can be calculated using Q, K, and V. The formula for calculating Self-Attention is as follows:
[0072]
[0073] Where, d k It is the number of columns in the Q and K matrices, which is also the vector dimension.
[0074] Then, the input signal features are passed to n different Self-Attention mechanisms in Multi-Head Attention to obtain n different outputs. The outputs of the n different Self-Attention mechanisms are then fused through a fully connected layer to obtain the final output.
[0075] Then, Add&Norm consists of two parts, Add and Norm, and its calculation formula is as follows:
[0076] LayerNorm(X+MultiHeadAttention(X)) (4)
[0077] Here, X represents the input of Multi-Head Attention, MultiHeadAttention(X) represents the output of Multi-Head Attention, and X + MultiHeadAttention(X) is Add, which is a residual connection that can prevent network degradation. Norm refers to Layer Normalization, which can perform normalization operations to speed up the convergence speed of each neural network layer.
[0078] The data is then fed into Feed Forward, a two-layer fully connected layer. The first layer uses the Gelu function as its activation function. To avoid overfitting, a Dropout regularization function is added after the first layer. The second layer does not use an activation function. Its calculation process is as follows:
[0079]
[0080] Then, add&norm is passed in, and its calculation formula is as follows:
[0081] LayerNorm(X+FeedForward(X)) (6)
[0082] Finally, the encoded information matrix C output by the Encoder is passed to the Decoder. For the Decoder in the tool wear condition monitoring task, a multi-layer FC network is used to decode the encoded information matrix C. The GELU function is used as the activation function in the hidden layer of the FC network.
[0083] In this invention, different tool wear prediction models need to be trained for different machining parameters, requiring a large amount of machining data as a training dataset. However, in practice, it is usually difficult to obtain a large amount of data to train the model. Therefore, as... Figure 2As shown, this invention trains a relatively accurate original working condition tool wear prediction model by conducting a large number of experiments under commonly used machining parameters (i.e., predetermined machining parameters), and then trains a less accurate target working condition tool wear prediction model using a small training set. Finally, by finding the feature distribution differences between the original working condition (i.e., the working condition corresponding to the predetermined machining parameters) and the target working condition (i.e., the working condition corresponding to the current machining parameters), the tool wear is transferred and learned, so as to obtain more accurate prediction results with less training data.
[0084] Specifically, the mapping relationship between the target working condition tool wear prediction model and the original working condition tool wear prediction model is established through the following method:
[0085]
[0086] Among them, X s X represents the predicted wear amount of the first tool. t Let φ(x) represent the predicted wear amount of the second tool, n represent the number of training samples used to train the tool wear prediction model for the target working condition, m represent the number of training samples used to train the tool wear prediction model for the original working condition, n < m, φ() is the mapping function, which maps the tool wear features to the regenerated Hilbert space, H represents the regenerated Hilbert space, and x si This represents the i-th training data, x, used to train the tool wear prediction model for the target working condition. tj These represent the j-th training data MMD used to train the original working condition tool wear prediction model. 2 (φ,X s ,X t () indicates the maximum mean difference.
[0087] The method described above can be used to obtain the value containing X. t X s The maximum mean difference between φ and φ is used to represent the mapping relationship between the target working condition tool wear prediction model and the original working condition tool wear prediction model.
[0088] More specifically, the Gaussian kernel function is chosen as the kernel function for maximizing the difference between the means:
[0089]
[0090] Where k(u,v) is a monotonic function of the Euclidean distance between any point u in space and a certain center v, and σ is the bandwidth.
[0091] In addition, since it is necessary to transform the mapping relationship of the output of the target working condition tool wear prediction model, the difference in feature distribution between the source domain and the target domain is added to the loss function of the target working condition tool wear prediction model.
[0092] The loss function L designed in this invention total From the mean squared error loss L mse Difference from the maximum mean L mmd Composition, mean squared error loss L mse The difference between the predicted values of the source domain network branches and the true values of the source domain layers is represented by the maximum mean difference, which represents the difference in signal feature distribution between the source and target domains. Therefore, the loss function of the target working condition tool wear prediction model is:
[0093]
[0094] Among them, L total L represents the loss function. mse (X s ,Y s ) represents the root mean square error loss, and Y represents the actual tool wear. This represents the output of the Multi-Head Attention layer of the encoder in the target working condition tool wear prediction model. Output of the Multi-Head Attention layer of the encoder in the original tool wear prediction model The measurement loss between them This represents the output of the encoder feed-forward layer of the target tool wear prediction model. Compared with the original working condition tool wear prediction model encoder feed forward layer output The measurement loss between them λ1, λ2, and λ3 represent the metric loss between the output of the encoder Add&Norm layer of the tool wear prediction model for the target working condition and the output of the encoder Add&Norm layer of the tool wear prediction model for the original working condition. λ1, λ2, and λ3 are all hyperparameters between 0 and 1.
[0095] Mean squared error loss L mse The calculation process is as follows:
[0096]
[0097] The loss metric for data distribution variance is:
[0098]
[0099] L mmd This represents the difference in the distribution of features between the source and target domains.
[0100] By back-optimizing the weight coefficients w and bias vector b of each layer of the transfer learning network using the loss function, the loss function L is optimized. total Minimizes the accuracy of tool wear and surface integrity prediction.
[0101] The optimization process for the weight parameter w and the bias vector b is as follows:
[0102]
[0103]
[0104] Where w * It optimizes the weight parameters, b * η is the bias vector for optimization; η is the learning rate, used to optimize and adjust w and b.
[0105] Next, the predicted wear amount of the fourth tool is determined based on the predicted wear amount of the second tool and the predicted wear amount of the third tool. That is, the predicted wear amounts of the second tool and the third tool are fused. Kalman filtering, extended Kalman filtering, or particle filtering methods can be used. In these methods, the predicted wear amount of the second tool is used as the observation value and the predicted wear amount of the third tool is used as the state value.
[0106] In this embodiment, the particle filtering method is used as an example for illustration. The tool wear state monitoring results based on the transformer data-driven model with the introduction of a transfer learning strategy are used as the observations of the particle filtering algorithm.
[0107]
[0108] Among them, z k This represents the tool wear prediction obtained from the improved transformer algorithm model based on the introduction of a transfer learning strategy; y k Indicates the actual wear of the cutting tool; n k It is observation noise, which is assumed to follow a normal distribution.
[0109] Then, the prediction results based on the tool wear mechanism model are used as the initial particle distribution, and the tool wear mechanism model is transformed into a tool wear state transition equation. The tool wear state transition equation is shown below:
[0110]
[0111] Where k represents the time point, and f(·) represents the state transition equation established based on the tool wear mechanism; x k-1 This indicates the tool wear state at time k-1; v k-1 This represents process noise that is independent and identically distributed.
[0112] Finally, the tool wear condition monitoring results based on the transformer data-driven model with the introduction of transfer learning strategy are fused with the prediction results based on the tool wear mechanism model. The observations of the particle filter algorithm are used to correct the output results based on the tool wear mechanism model, so as to obtain more accurate tool wear condition monitoring results.
[0113] Finally, the predicted wear amount of the fourth tool is compared with the tool wear threshold, and a tool wear state is assigned to the predicted wear amount of the fourth tool at the current moment based on the comparison result; when the tool wear state is different from both the tool wear state at the previous moment and the tool wear state at the next moment, the tool wear state is modified to be the same as the tool wear state at the previous moment.
[0114] Tool wear status is identified by comparing the predicted wear amount of the fourth tool with the tool wear failure criterion (i.e., tool wear threshold). Tools that do not meet the tool wear failure criterion are marked as healthy state "0", i.e., tool wear status is marked as "0", and tools that meet the tool wear failure criterion are marked as "1", i.e., tool wear status is marked as "1". Since the tool wear process proceeds gradually, unidirectionally, and irreversibly from unworn to worn, this pattern is used to correct the tool wear status identification results, thereby improving the accuracy of tool wear status monitoring and predicting the remaining tool service life.
[0115] The present invention also discloses a tool wear monitoring device under varying working conditions, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the above-described method.
[0116] This invention also discloses an online method for controlling the surface quality of a workpiece, such as... Figure 3 As shown, the process includes the following steps: obtaining the predicted wear amount of the fourth tool and its corresponding machining parameters; obtaining the predicted wear amount of the fourth tool using the method described above; inputting the predicted wear amount of the fourth tool and its corresponding machining parameters into the first surface integrity parameter prediction model to obtain the first workpiece surface integrity prediction parameters; correcting the first workpiece surface integrity prediction parameters to obtain the second workpiece surface integrity prediction parameters; when the second workpiece surface integrity prediction parameters reach the preset threshold of the surface integrity parameters, adjusting the machining parameters according to the second workpiece surface integrity prediction parameters and the predicted wear amount of the fourth tool.
[0117] As one implementation method, such as Figure 5As shown, the correction of the surface integrity prediction parameters of the first workpiece includes: correcting the surface integrity prediction parameters of the first workpiece based on the correspondence between the first surface integrity parameter prediction model and the second surface integrity parameter prediction model to obtain the surface integrity prediction parameters of the second workpiece; wherein, the first surface integrity parameter prediction model and the second surface integrity parameter prediction model are obtained by training with different machining parameters.
[0118] In this embodiment, such as Figure 4 As shown, the network architecture of the first surface integrity parameter prediction model and the second surface integrity parameter prediction model is the same; the first surface integrity parameter prediction model is based on the Transformer model and includes an encoder and a decoder; the encoder includes a Multi-Head Attention layer, a Feed Forward layer and two Add & Norm layers; the decoder includes a multi-layer FC network.
[0119] Although the network architecture of the first surface integrity parameter prediction model and the second surface integrity parameter prediction model is the same, for the same reason as the above-mentioned tool wear monitoring method under variable working conditions, it is possible to achieve high prediction accuracy with fewer training samples.
[0120] Meanwhile, the surface integrity parameter prediction model differs from the tool wear prediction model in the dimensions of its input and output. Different input and output modules are constructed based on the characteristics of surface integrity parameters. Surface integrity indices include surface roughness, surface residual stress, and microhardness, and the coupling relationship between process parameters and tool wear state on surface integrity is analyzed.
[0121] In addition, such as Figure 6 As shown, tool wear failure threshold and surface integrity control threshold are also required. When the tool flank wear monitoring value reaches the tool wear failure threshold, the machine is stopped and an alarm is issued to prompt the operator to replace the tool. When the surface integrity monitoring value reaches the control threshold and an alarm is issued, the coupling effect between tool wear and process parameters and surface integrity is considered. The machining process parameters are then adjusted online in real time using the real-time tool wear monitoring value and the corresponding comprehensive surface integrity monitoring value as coupling constraints. This ensures that the surface integrity of the machined workpiece obtained under the adjusted process parameters and the real-time tool wear state is accurately controlled within the surface integrity control threshold range, guaranteeing that the machined workpiece has a good surface quality.
[0122] For real-time online control of machining parameters based on the coupling constraints of real-time tool wear condition monitoring values and corresponding comprehensive surface integrity monitoring values, methods such as deep reinforcement learning multi-objective optimization algorithms, multi-objective deep Q-networks, and multi-objective deep deterministic policy gradients can be adopted. Specifically, a reward function is established with surface integrity parameters such as residual stress, surface roughness, microhardness, and tool wear as optimization objective functions, and then multi-objective optimization is performed with spindle speed and feed rate as optimization variables.
[0123] In summary, this invention discloses a mechanism-data-driven online monitoring method for tool wear state and surface quality under varying working conditions, oriented towards surface integrity. During CNC machine tool machining, multi-source heterogeneous physical signals from the CNC machine tool are simultaneously acquired. The signal characteristics of the multi-source heterogeneous physical signals are preprocessed, and a tool wear mechanism model based on an analytical model of tool wear change rate is established by comprehensively considering tool geometry, material properties of the machined sample, cutting process physics, and tool wear degradation law. At the same time, a transformer data-driven model incorporating a transfer learning strategy is established. This solves the problem that existing tool wear state monitoring methods can only monitor tool wear state under a single working condition and cannot effectively address tool wear state monitoring under varying working conditions. A mechanism-data-driven fusion tool wear condition monitoring model is obtained by fusing a particle filtering algorithm with a transformer data-driven model incorporating a transfer learning strategy. This model addresses the problems of poor model interpretability, poor generalization, low monitoring accuracy, and gradient explosion or vanishing during model training in existing single-data-driven tool wear monitoring methods, as well as the low accuracy and poor generalization of single-tool wear mechanism-based models. Simultaneously, the transformer data-driven model incorporating a transfer learning strategy is used to establish the coupling effect of different tool wear states on surface integrity under varying conditions. This enables real-time monitoring of surface integrity considering real-time tool wear state under varying conditions, providing a more accurate real-time surface integrity prediction method. This solves the problem that existing surface integrity prediction models only consider constant parameters and do not account for the impact of real-time tool wear state on the prediction accuracy. Then, a tool wear failure threshold database is established based on the statistical results of tool wear failure thresholds under different machining characteristics, and a surface integrity control threshold database is established based on the statistical results of the surface integrity parameter control domain under different machining characteristics. When the real-time monitoring value of tool wear reaches the tool wear failure threshold, the machine should be stopped immediately and an alarm should be issued to prompt the operator to replace the tool in time. When the real-time monitoring value of surface integrity exceeds the surface integrity control threshold, the machining process parameters should be adjusted online in real time using the real-time tool wear state monitoring value and the corresponding comprehensive surface integrity monitoring value of the machined workpiece as coupling constraints. This ensures that the surface integrity of the machined workpiece obtained under the current real-time controlled machining parameters and the real-time tool wear state is accurately controlled within the surface integrity control threshold range, guaranteeing that the machined workpiece has a good surface quality. This solves the problem in existing optimization techniques for machining process parameters based on surface integrity constraints, which only consider the influence of constant machining process parameters on surface integrity, but do not consider the influence of the tool wear state on surface integrity during constant machining process parameters on surface integrity control.
[0124] The present invention also discloses an online workpiece surface quality control device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described method.
[0125] If the integrated unit module is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to a storage device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks.
[0126] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0127] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed in this invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0128] In the embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of modules or units is merely a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed.
[0129] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
Claims
1. A method for monitoring tool wear under varying working conditions, characterized in that, Includes the following steps: Collect machine tool status data corresponding to the current machining parameters; Using the machine tool status data as input information, the first tool's predicted wear amount is predicted using the target working condition tool wear amount prediction model; Using the first tool's predicted wear amount as a known quantity, the second tool's predicted wear amount is calculated based on the mapping relationship between the target working condition tool wear amount prediction model and the original working condition tool wear amount prediction model; wherein, the original working condition tool wear amount prediction model is the tool wear amount prediction model corresponding to the predetermined machining parameters; The predicted wear amount of the fourth tool is determined based on the predicted wear amount of the second tool and the predicted wear amount of the third tool; wherein, the predicted wear amount of the third tool is the predicted wear amount of the tool calculated using a wear analysis mechanism model; The target working condition tool wear prediction model is based on the Transformer model and includes an encoder and a decoder; The encoder includes a Multi-Head Attention layer, a Feed Forward layer, and two Add & Norm layers; The decoder includes a multi-layer FC network; The mapping relationship between the tool wear prediction model for the target working condition and the tool wear prediction model for the original working condition is established using the following method: , in, This indicates the predicted wear amount of the first tool. Let n represent the predicted wear amount of the second tool, n represent the number of training samples used to train the tool wear prediction model for the target working condition, and m represent the number of training samples used to train the tool wear prediction model for the original working condition, where n < m. This is a mapping function that maps tool wear characteristics to a regenerated Hilbert space. Represents the regenerated Hilbert space. This represents the i-th training data used to train the tool wear prediction model for the target working condition. These represent the j-th training data used to train the original working condition tool wear prediction model. Indicates the maximum mean difference; The loss function of the target working condition tool wear prediction model is: , in, Represents the loss function. This represents the mean squared error loss. Indicates the actual wear of the cutting tool. This represents the output of the Multi-Head Attention layer of the encoder in the target working condition tool wear prediction model. Output of the Multi-Head Attention layer of the encoder in the original tool wear prediction model The measurement loss between them This represents the output of the encoder feed-forward layer of the target tool wear prediction model. Compared with the original working condition tool wear prediction model encoder feed forward layer output The measurement loss between them This represents the metric loss between the output of the encoder Add&Norm layer of the tool wear prediction model for the target working condition and the output of the encoder Add&Norm layer of the tool wear prediction model for the original working condition. , and All of them are hyperparameters between 0 and 1.
2. The method for monitoring tool wear under varying working conditions as described in claim 1, characterized in that, Also includes: The predicted wear amount of the fourth tool is compared with the tool wear amount threshold, and the tool wear state is assigned to the predicted wear amount of the fourth tool at the current moment based on the comparison result. When the tool wear state is different from both the tool wear state at the previous moment and the tool wear state at the next moment, the tool wear state is modified to be the same as the tool wear state at the previous moment.
3. A tool wear monitoring device under varying working conditions, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1-2.
4. A method for online control of workpiece surface quality, characterized in that, Includes the following steps: The predicted wear amount of the fourth tool and its corresponding machining parameters are obtained; the predicted wear amount of the fourth tool is obtained by the method described in any one of claims 1-2. The predicted wear amount of the fourth tool and its corresponding machining parameters are input into the first surface integrity parameter prediction model to obtain the first workpiece surface integrity prediction parameters. The surface integrity prediction parameters of the first workpiece are corrected to obtain the surface integrity prediction parameters of the second workpiece. When the predicted surface integrity parameter of the second workpiece reaches the preset threshold of the surface integrity parameter, the machining parameters are adjusted according to the predicted surface integrity parameter of the second workpiece and the predicted wear amount of the fourth tool.
5. The online control method for workpiece surface quality as described in claim 4, characterized in that, The correction of the surface integrity prediction parameters of the first workpiece includes: Based on the correspondence between the first surface integrity parameter prediction model and the second surface integrity parameter prediction model, the prediction parameters of the first workpiece surface integrity are corrected to obtain the prediction parameters of the second workpiece surface integrity; wherein, the first surface integrity parameter prediction model and the second surface integrity parameter prediction model are obtained by training with different machining parameters.
6. The online control method for workpiece surface quality as described in claim 5, characterized in that, The network architecture of the first surface integrity parameter prediction model and the second surface integrity parameter prediction model is the same. The first surface integrity parameter prediction model is based on the Transformer model and includes an encoder and a decoder; The encoder includes a Multi-Head Attention layer, a Feed Forward layer, and two Add & Norm layers; The decoder includes a multi-layer FC network.
7. An online workpiece surface quality control device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 4-6.
Citation Information
Patent Citations
Cutter wear monitoring method based on transfer learning
CN115351601A
Method for monitoring tool wear in deep hole machining based on SSAE-LSTM model
WO2021046737A1