Cutter pose error prediction method based on transfer learning model

Through the tool position error prediction method based on the transfer learning model, the problem that five-axis linkage CNC machine tools are difficult to accurately predict spatial errors under complex machining conditions is solved, and the tool position error error prediction and error compensation for the machine tool working space is achieved, which improves the accuracy of the machining parts.

CN119620685AInactive Publication Date: 2025-03-14NEWAY CNC EQUIPMENT (SUZHOU) CO LTD +1
View PDF 14 Cites 0 Cited by

Patent Information

Application Number
CN202510158751.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-13
Publication Date
2025-03-14
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art is difficult to accurately predict the spatial error of five-axis linked CNC machine tools under complex machining conditions.

Method used

Using the tool pose error prediction method based on the transfer learning model, an improved Informer model is built by acquiring and processing the data in the source and target fields, and transfer learning is performed to achieve tool pose error prediction for the entire machine tool workspace.

Benefits of technology

It realizes accurate prediction of tool position errors in the five-axis machine tool working space, can implement effective error compensation, and improve the accuracy of machining parts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119620685A_ABST
    Figure CN119620685A_ABST
Patent Text Reader

Abstract

The invention discloses a tool pose error prediction method based on a transfer learning model, which belongs to the field of numerical control machine tools and comprises the steps of acquiring source field data, acquiring target field data, processing the source field data, layering the source field data, constructing an improved Informer model for parameter training, performing transfer learning and the like. The space error is associated with the technological parameters and the motion amount of each axis, and the tool pose error of the five-axis machine tool working space is predicted by means of the transfer learning technology, so that effective error compensation can be implemented, and the precision of a machined part is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of numerically controlled machine tools, and in particular to a tool posture error prediction method based on a transfer learning model. Background Art

[0002] In the contemporary machining industry, five-axis CNC machine tools have become an indispensable core equipment for modern manufacturing due to their excellent flexibility and precision. This type of machine tool can achieve synchronous control of five axes, allowing the tool to freely contact the workpiece from any angle in three-dimensional space, thereby effectively processing various complex surface parts. As the industry continues to increase its requirements for component accuracy and quality, the measurement and prediction of the spatial error of five-axis CNC machine tools is particularly important.

[0003] The commonly used spatial error modeling and compensation methods usually involve detailed measurements of multiple errors of five-axis machine tools, building error models, and calculating the error compensation values ​​of each axis based on them. However, it is difficult to accurately predict errors under complex machining conditions. Summary of the invention

[0004] In order to overcome the shortcomings of the prior art, one of the objects of the present invention is to provide a tool posture error prediction method based on a transfer learning model, which measures the tool posture error in the processing area to predict the tool posture error in the entire workspace of a CNC machine tool.

[0005] One of the purposes of the present invention is achieved by the following technical solution: A tool posture error prediction method based on a transfer learning model comprises the following steps: Obtaining source domain data: CNC machine tools n Workpieces are processed to obtain n The process parameters of the workpiece during machining, the position information of the tool tip in the machine tool coordinate system, the rotation angle information of the rotary axis, and the corresponding tool posture error are formed into a data set. ,in, X i Indicates i The parameter data of samples, X i Include p Features, , Y i Indicates The tool posture error corresponding to the sample is: n is the sample data size; Obtain target domain data: Obtain the overall stroke and process parameter range of the CNC machine tool, select the target sample size m within the overall stroke and process parameter range, and the target domain data constitutes a data set , where Xj Indicates j The parameter data of samples, X j Include p Features, ; Source domain data processing: identifying and deleting outliers from the source domain data, estimating and filling in outliers and missing values, and placing the processed source domain data in the target domain data for normalization; Source domain data stratification: The processed source domain data is stratified to form two data sets A1 and A2. , Y Pi represents the tool position deviation corresponding to the i-th sample; , Y Vi represents the tool posture error corresponding to the i-th sample; Improved Informer model: Two sub-networks are connected in parallel to construct an improved Informer model. The first three dimensions output by the first sub-network represent the fitted tool position deviation, and the second three-dimensional information output by the second sub-network represents the fitted tool posture error. The outputs of these two sub-networks are combined to form the final tool posture error prediction model output. Perform parameter training: align the source domain data and the target domain data in feature space through a loss function, separate the aligned data into a training set and a test set, divide the training set into k subsets, conduct a k-fold cross-validation experiment on the k subsets, and obtain the final hyperparameters; Transfer learning: The improved Informer model is applied to the target domain dataset B through transfer learning to achieve tool pose error prediction for the entire machine tool workspace.

[0006] Furthermore, in the step of acquiring source domain data, the process parameters include spindle speed, feed speed, axial cutting depth, and radial cutting width.

[0007] Furthermore, in the step of obtaining source domain data, the tool posture error data is obtained by measuring the tool posture error data using a three-coordinate measuring instrument. n The position deviation and normal error of the surface point of the workpiece after the workpiece is machined are converted into a tool posture error.

[0008] Furthermore, in the source domain data processing step, when outlier identification is performed on the source domain data, the identification formula is: ; Among them, x is the sample value, μ is the expectation of the sample value, σ is the standard deviation of the sample value, and the calculated value Z is compared with the threshold. When Z is greater than or equal to the threshold, the data is an outlier and is eliminated. When Z is less than the threshold, the data is a normal value and is retained.

[0009] Furthermore, the estimation and filling of outliers and missing values ​​are performed as follows: Lagrange interpolation method is used to estimate and fill out outliers and missing values, and the estimated value calculation formula is: ; in, y i represents the dependent variable at different sample points, x i and x j Represents the independent variable at different sample points.

[0010] Furthermore, the processed source domain data is placed in the target domain data for normalization. The formula is: ; in, x i For the dataset i Dimensional data, x min is the minimum value of the data in the dataset dimension, x max is the maximum value of the data set dimension. is the normalized data.

[0011] Furthermore, in the parameter training step, the feature space alignment of the source domain data and the target domain data through the loss function is specifically: calculating the maximum mean difference and covariance matrix of the source domain data and the target domain data in the feature space, fusing the maximum mean difference loss and the related alignment loss, and constructing a comprehensive loss function.

[0012] Furthermore, the loss function formula is: ; In the formula, is the maximum mean difference; For related alignment; ; in, X s is the source domain dataset, X t is the target domain dataset, n s is the number of samples in the source domain dataset, nt is the number of samples in the target domain dataset, is a nonlinear feature mapping from the input space to a feature space (Hilbert space H), C s and C t is the covariance measure, d is the feature dimension, represents the 2-norm.

[0013] Furthermore, in the parameter training step, a k-fold cross-validation experiment is performed on k subsets to obtain the final hyperparameters. Specifically, a k-fold cross-validation experiment is performed for each group of hyperparameter combinations to be searched, and a subset is selected as a validation set in each iteration, and the remaining subsets are combined as training sets for training the improved Informer model. During automatic parameter adjustment, the hyperparameter space is explored according to the set evaluation indicators to find the optimal combination. The above k-fold cross-validation process is repeated for multiple groups of different hyperparameter combinations. After completing the evaluation of all hyperparameter combinations, the performance indicators obtained by verifying different combinations are compared, and the best performing group of hyperparameters is screened out and determined as the final hyperparameters.

[0014] Furthermore, the tool posture error prediction method based on the transfer learning model also includes a model performance evaluation step, which is located after the parameter training step and before the transfer learning step. The model performance evaluation is specifically: using MSE, RMSE and R 2 The evaluation parameters are used to evaluate the test results. The formula is as follows: ; in, For the i The true value of the samples, For the i The model prediction value of samples, is the mean of the true values.

[0015] Compared with the prior art, the tool posture error prediction method based on the transfer learning model of the present invention associates the spatial error with the process parameters and the motion amount of each axis through the steps of acquiring source domain data, acquiring target domain data, processing source domain data, stratifying source domain data, improving the Informer model, performing parameter training and transfer learning, and realizes the prediction of the tool posture error in the working space of a five-axis machine tool with the help of transfer learning technology, thereby implementing effective error compensation and improving the accuracy of the processed parts. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 It is a flow chart of a tool posture error prediction method based on a transfer learning model of the present invention; Figure 2 This is a structural diagram of the improved Informer model of the present invention. DETAILED DESCRIPTION

[0017] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0018] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.

[0019] See also Figure 1 The present invention provides a tool posture error prediction method based on a transfer learning model, comprising the following steps: Obtaining source domain data: CNC machine tools n Workpieces are processed to obtain n The process parameters of the workpiece during machining, the position information of the tool tip in the machine tool coordinate system, the rotation angle information of the rotary axis, and the corresponding tool posture error are formed into a data set. ,in, X i Indicates i The parameter data of samples, X i Include p Features, , Y i Indicates i The tool posture error corresponding to the sample is: n is the sample data size; Obtain target domain data: Obtain the overall stroke and process parameter range of the CNC machine tool, select the target sample size m within the overall stroke and process parameter range, and the target domain data constitutes a data set , where X j Indicates j The parameter data of samples, X j Include p Features, ; Source domain data processing: identifying and deleting outliers from the source domain data, estimating and filling in outliers and missing values, and placing the processed source domain data in the target domain data for normalization; Source domain data stratification: The processed source domain data is stratified to form two data sets A1 and A2. , Y Pi represents the tool position deviation corresponding to the i-th sample; , Y Vi represents the tool posture error corresponding to the i-th sample; Improved Informer model: Two sub-networks are connected in parallel to construct an improved Informer model. The first three dimensions output by the first sub-network represent the fitted tool position deviation, and the second three-dimensional information output by the second sub-network represents the fitted tool posture error. The outputs of these two sub-networks are combined to form the final tool posture error prediction model output. Perform parameter training: align the source domain data and the target domain data in feature space through a loss function, separate the aligned data into a training set and a test set, divide the training set into k subsets, conduct a k-fold cross-validation experiment on the k subsets, and obtain the final hyperparameters, thereby optimizing the Informer model; Transfer learning: The improved Informer model is applied to the target domain dataset B through transfer learning to achieve tool pose error prediction for the entire machine tool workspace.

[0020] Specifically, in the step of obtaining source domain data, the process parameters include spindle speed, feed speed, axial cutting depth, and radial cutting width. The rotation angle information of the rotary axis includes the A-axis rotation angle and the C-axis rotation angle. The tool posture error data is obtained by measuring the tool posture error using a three-dimensional coordinate measuring instrument. n The position deviation and normal error of the surface point of the workpiece after the workpiece is machined are converted into a tool posture error.

[0021] In the source domain data processing step, when outliers are identified on the source domain data, the identification formula is: ; Where x is the sample value, μ is the expected value of the sample value, σ is the standard deviation of the sample value, and the calculated value Z is compared with the threshold value. When Z is greater than or equal to the threshold value, the data is an abnormal value and is eliminated. When Z is less than the threshold value, the data is a normal value and is retained. In this embodiment, the threshold value is 3.

[0022] The specific method for estimating and filling in outliers and missing values ​​is as follows: Lagrange interpolation method is used to estimate and fill in outliers and missing values. The formula for calculating the estimated value is: ; in, y i represents the dependent variable at different sample points, x i and x j Represents the independent variable at different sample points.

[0023] The formula for normalizing the processed source domain data in the target domain data is: ; in, x i For the dataset Dimensional data, x min is the minimum value of the data in the dataset dimension, x max is the maximum value of the data set dimension. is the normalized data.

[0024] In the source domain data stratification step, dataset A1 includes processed n The process parameters when machining a workpiece, the position information of the tool tip in the machine tool coordinate system, the rotation angle information of the rotary axis, and the corresponding tool position deviation. Data set A2 includes the processing parameters of the workpiece, the position information of the tool tip in the machine tool coordinate system, the rotation angle information of the rotary axis, and the corresponding tool position deviation. n The process parameters when cutting a workpiece, the position information of the tool tip in the machine tool coordinate system, the rotation angle information of the rotating axis, and the tool posture error of the corresponding point are calculated.

[0025] In the step of improving the Informer model, the Informer model is improved as follows Figure 2 As shown in the figure, the improved Informer model is constructed by connecting two sub-networks in parallel. This parallel structure can effectively avoid directly using all the data to fit a single model, which would make the model too complicated.

[0026] The specific steps for parameter training are: In the parameter training step, the feature space alignment of the source domain data and the target domain data through the loss function is specifically: calculating the maximum mean difference and covariance matrix of the source domain data and the target domain data in the feature space, fusing the maximum mean difference loss and the related alignment loss, and constructing a comprehensive loss function.

[0027] Furthermore, the loss function formula is: ; In the formula, is the maximum mean difference; For related alignment; ; ; in, X s is the source domain dataset, X t is the target domain dataset, n s is the number of samples in the source domain dataset, n t is the number of samples in the target domain dataset, is a nonlinear feature mapping from the input space to a feature space (Hilbert space H), C s and C t is the covariance measure, d is the feature dimension, Represents the -2 norm.

[0028] After preprocessing and feature space alignment, the source and target domain data are divided into 80% training sets and 20% test sets. Subsequently, the training set is further evenly divided into k subsets. During the Optuna hyperparameter tuning process, a k-fold cross-validation experiment is carried out for each set of hyperparameter combinations to be searched. In each iteration, a subset is selected as the validation set, and the remaining subsets are combined into the training set for training and improving the Informer model. Optuna explores the hyperparameter space according to the set evaluation indicators to find the optimal combination. Repeat the above k-fold cross-validation process for multiple groups of different hyperparameter combinations. After completing the evaluation of all hyperparameter combinations, compare the performance indicators obtained by verifying different combinations, select the best set of hyperparameters and determine them as the final hyperparameters. Retrain the model with the final hyperparameters on the complete training set to obtain the optimized model. When retraining the model, the Huber loss function is selected as the loss function.

[0029] The Huber loss function formula is: ; in, is the threshold of the Huber loss function, For the The true value of the samples, For the The model predicts the value of the sample.

[0030] The training set is input into the improved Informer model for training. The hyperparameter settings used in the training process are shown in Table 1: Table 1

[0031] The tool posture error prediction method based on the transfer learning model also includes a model performance evaluation step, which is located after the parameter training step and before the transfer learning step. The model performance evaluation is specifically: using mean square error (MSE), root mean square error (RMSE) and determination coefficient The evaluation parameters are used to evaluate the test results. The formula is as follows: ; in, For the The true value of the samples, For the The model prediction value of samples, is the mean of the true values.

[0032] The improved Informer model is applied to the target domain dataset through transfer learning to achieve the prediction task of the entire machine tool workspace.

[0033] Compared with the prior art, the tool posture error prediction method based on the transfer learning model of the present invention associates the spatial error with the process parameters and the motion amount of each axis through the steps of acquiring source domain data, acquiring target domain data, processing source domain data, stratifying source domain data, improving the Informer model, performing parameter training and transfer learning, and realizes the prediction of the tool posture error in the working space of a five-axis machine tool with the help of transfer learning technology, thereby implementing effective error compensation and improving the accuracy of the processed parts.

[0034] The above embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several modifications and improvements can be made without departing from the concept of the present invention, which are equivalent modifications and improvements made to the above embodiments based on the essential technology of the present invention, and all of them belong to the protection scope of the present invention.

Claims

1. A tool posture error prediction method based on transfer learning model, characterized in that: The following steps are involved: Obtaining source domain data: CNC machine tools n Workpieces are processed to obtain n The process parameters of the workpiece during machining, the position information of the tool tip in the machine tool coordinate system, the rotation angle information of the rotary axis, and the corresponding tool posture error are formed into a data set. ,in, X i Indicates The parameter data of samples, X i Include p Features, , Y i Indicates The tool posture error corresponding to the sample is: n is the sample data size; Obtain target domain data: Obtain the overall stroke and process parameter range of the CNC machine tool, select the target sample size m within the overall stroke and process parameter range, and the target domain data constitutes a data set , where X j Indicates j The parameter data of samples, X j Include p Features, ; Source domain data processing: identifying and deleting outliers from the source domain data, estimating and filling in outliers and missing values, and placing the processed source domain data in the target domain data for normalization; Source domain data stratification: The processed source domain data is stratified to form two data sets A1 and A2. , Y Pi represents the tool position deviation corresponding to the i-th sample; , Y Vi represents the tool posture error corresponding to the i-th sample; Improved Informer model: Two sub-networks are connected in parallel to improve the Informer model. The first three-dimensional information output by the first sub-network represents the fitted tool position deviation, and the second three-dimensional information output by the second sub-network represents the fitted tool posture error. The outputs of these two sub-networks are combined to form the final tool posture error prediction model output. Perform parameter training: align the source domain data and the target domain data in feature space through a loss function, separate the aligned data into a training set and a test set, divide the training set into k subsets, conduct a k-fold cross-validation experiment on the k subsets, and obtain the final hyperparameters; Transfer learning: The improved Informer model is applied to the target domain dataset B through transfer learning to achieve tool pose error prediction for the entire machine tool workspace.

2. The tool posture error prediction method based on the transfer learning model according to claim 1 is characterized in that: In the step of acquiring source domain data, the process parameters include spindle speed, feed speed, axial cutting depth, and radial cutting width.

3. The tool posture error prediction method based on the transfer learning model according to claim 1 is characterized in that: In the step of obtaining source domain data, the tool posture error data is obtained by measuring the tool posture error data using a three-coordinate measuring machine. n The position deviation and normal error of the surface point of the workpiece after the workpiece is machined are converted into a tool posture error.

4. The tool posture error prediction method based on the transfer learning model according to claim 1 is characterized in that: In the source domain data processing step, when outlier identification is performed on the source domain data, the identification formula is: ; Among them, x is the sample value, μ is the expectation of the sample value, σ is the standard deviation of the sample value, and the calculated value Z is compared with the threshold. When Z is greater than or equal to the threshold, the data is an outlier and is eliminated. When Z is less than the threshold, the data is a normal value and is retained.

5. The tool posture error prediction method based on transfer learning model according to claim 1, characterized in that: The specific method for estimating and filling in outliers and missing values ​​is as follows: Lagrange interpolation method is used to estimate and fill in outliers and missing values. The formula for calculating the estimated value is: ; in, y i represents the dependent variable at different sample points, x i and x j Represents the independent variable at different sample points.

6. The tool posture error prediction method based on transfer learning model according to claim 1, characterized in that: The formula for normalizing the processed source domain data in the target domain data is: ; in, x i For the dataset Dimensional data, x min is the minimum value of the data in the dataset dimension, x max is the maximum value of the data set dimension. is the normalized data.

7. The tool posture error prediction method based on transfer learning model according to claim 1 is characterized in that: In the parameter training step, the feature space alignment of the source domain data and the target domain data through the loss function is specifically: calculating the maximum mean difference and covariance matrix of the source domain data and the target domain data in the feature space, fusing the maximum mean difference loss and the related alignment loss, and constructing a comprehensive loss function.

8. The tool posture error prediction method based on transfer learning model according to claim 7 is characterized in that: The loss function formula is: ; In the formula, is the maximum mean difference; For related alignment; ; in, X s is the source domain dataset, X t is the target domain dataset, n s is the number of samples in the source domain dataset, n t is the number of samples in the target domain dataset, is a nonlinear feature mapping from the input space to a feature space, C s and C t is the covariance measure, d is the feature dimension, represents the 2-norm.

9. The tool posture error prediction method based on transfer learning model according to claim 7, characterized in that: In the parameter training step, a k-fold cross-validation experiment is performed on k subsets to obtain the final hyperparameters. Specifically, a k-fold cross-validation experiment is performed for each group of hyperparameter combinations to be searched, and a subset is selected as a validation set in each iteration, and the remaining subsets are combined as training sets for training and improving the Informer model. During automatic parameter adjustment, the hyperparameter space is explored according to the set evaluation indicators to find the optimal combination. The above k-fold cross-validation process is repeated for multiple groups of different hyperparameter combinations. After completing the evaluation of all hyperparameter combinations, the performance indicators obtained by verifying different combinations are compared, and the best performance group of hyperparameters is screened out and determined as the final hyperparameters.

10. The tool posture error prediction method based on transfer learning model according to claim 1, characterized in that: The tool posture error prediction method based on the transfer learning model also includes a model performance evaluation step, which is located after the parameter training and before the transfer learning step. The model performance evaluation is specifically: using MSE, RMSE and R 2 The evaluation parameters evaluate the test results, and the formula is as follows: ; in, For the The true value of the samples, For the The model prediction value of samples, is the mean of the true values.

Citation Information

Patent Citations

  • Multi-element geochemical exploration anomaly recognition method based on multi-convolution self-coding neural network

    CN108710777A

  • Ship target recognition method based on transfer learning

    CN109800796A

  • Indoor positioning method based on deep migration and model parameter integration

    CN112113570A

  • Cutter wear state intelligent identification method based on heterogeneous domain adaptive transfer learning

    CN112801139A

  • Bearing performance degradation evaluation method and system based on digital twinborn model

    CN113221277A