A method for thermal error compensation in a five-axis CNC machine tool
By constructing a simulated thermal expansion model of the workpiece and infrared thermal imaging, combined with temperature-sensitive features and a multi-scale GRU tool wear monitoring model, the tool compensation amount is dynamically adjusted, which solves the problem of the impact of workpiece cooling after heating on machining accuracy in five-axis CNC machine tools, and achieves higher machining accuracy.
Patent Information
- Application Number
- CN202510223491.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-27
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2045-02-27
AI Technical Summary
Existing thermal error compensation methods for five-axis CNC machine tools fail to effectively combine the effect of workpiece cooling after heating during machining on the cutting tool, resulting in limited room for improvement in machining accuracy.
By constructing a simulated thermal expansion model of the workpiece, and combining infrared thermal imaging and temperature data, a nonlinear mapping relationship between temperature-sensitive characteristics and thermal errors is established. A multi-scale GRU tool wear monitoring model is trained, and a Bayesian optimization algorithm is used to optimize the compensation model. The tool compensation amount is dynamically adjusted to cope with workpiece temperature changes and tool wear.
It improves the accuracy of tool compensation, further enhancing the machining accuracy of high-precision workpieces and avoiding the limitations of simply considering the influencing factors of machine tools and cutting tools.
Smart Images

Figure CN120065906B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of CNC machine tools, and in particular to a thermal error compensation method for a five-axis CNC machine tool. Background Technology
[0002] Five-axis CNC machine tools are high-tech, high-precision machine tools specifically designed for machining complex curved surfaces. Due to their high precision, thermal errors during machining become a significant factor leading to reduced workpiece machining accuracy.
[0003] During long-term operation, five-axis CNC machine tools generate frictional heat, cutting heat, spindle running heat, tool wear, and ambient temperature, which can cause small but cumulative deformations in the overall structure of the machine tool, resulting in thermal errors. For workpieces that already require high precision, these deformations will significantly affect the machining dimensions and surface quality of the workpiece.
[0004] To reduce the impact of thermal errors and improve machining accuracy, thermal error compensation technology is often used. However, most of these technologies focus on thermal error compensation on the machine tool side. The frictional heat and cutting heat generated by the cutting tool do not act unidirectionally on the tool but also affect the workpiece. For example, Chinese patent document CN119148621A establishes a thermal error model that incorporates the additional thermal effects of tool wear on the temperature field, but it neglects the thermal effects on the workpiece, resulting in room for improvement in machining accuracy even after compensation. Summary of the Invention
[0005] To address the problem in existing technologies that lack compensation for tool cooling after workpiece processing due to heat, this invention provides a thermal error compensation method for five-axis CNC machine tools.
[0006] The technical solution adopted in this invention is:
[0007] A method for thermal error compensation of a five-axis CNC machine tool includes the following steps:
[0008] S1. Obtain the model data of the finished workpiece and establish a simulation thermal expansion model of the workpiece;
[0009] S2. Analyze the simulated thermal expansion model of the workpiece to determine the relationship between the workpiece's temperature and dimensional changes;
[0010] S3. During machine tool operation, collect temperature data of the workpiece's machining area at the next processing time;
[0011] S4. Based on the relationship between the workpiece's temperature and dimensional changes, and combined with the thermal error compensation model, determine the tool compensation for the machining area at the next time step.
[0012] Preferably, in step S3, the temperature data of the workpiece's next processing location is collected, including the following steps:
[0013] S31. Collect the machining data of the machine tool to obtain the current posture of the workpiece;
[0014] S32. Acquire the current infrared thermal image of the workpiece;
[0015] S33. Adjust the simulated thermal expansion model of the workpiece according to its current posture so that the simulated thermal expansion model corresponds to the current posture of the workpiece.
[0016] S34: Determine the machining location for the next time step based on the machine tool's machining data, map the machining location to the simulated thermal expansion model and infrared thermal imaging, and collect the temperature of the machining location in the current infrared thermal imaging.
[0017] Preferably, in step S4, based on the relationship between the workpiece's temperature and dimensional changes, and in conjunction with the thermal error compensation model, the tool compensation amount for the machining area at the next time step is determined, including the following steps:
[0018] S41. During machine tool operation, thermal error data is obtained by measuring the positional change between the cutting point of the tool and the workpiece.
[0019] S42. Use the SVM model to establish a nonlinear mapping relationship between machine tool-related temperature-sensitive characteristics and thermal errors;
[0020] S43. Train a tool wear monitoring model based on multi-scale GRU;
[0021] S44. Add a correction function to the SVM model to obtain the thermal error compensation model; the correction function dynamically adjusts the thermal error compensation based on the real-time tool wear value output by the tool wear monitoring model.
[0022] S45. Based on the relationship between the temperature and dimensional changes of the workpiece, determine the tool compensation caused by the temperature change of the workpiece at the next processing time.
[0023] S46. Based on the tool compensation caused by the change in workpiece temperature at the next processing time, combined with the thermal error compensation model, the final tool compensation is obtained.
[0024] Preferably, in step S42, the screening of temperature-sensitive features includes the following steps:
[0025] S421. During the operation of the machine tool, temperature data of various relevant monitoring points are collected through multiple temperature sensors;
[0026] S422. Standardize the collected temperature data, perform correlation analysis on the temperature data and thermal error data, and screen out temperature-sensitive features that are highly correlated with thermal error to form a temperature-sensitive feature set.
[0027] Preferably, in step S43, training the tool wear monitoring model based on a multi-scale GRU includes the following steps:
[0028] S431. During machine tool operation, acceleration signals are collected by a three-dimensional accelerometer, and the wear value of the tool's flank face is measured by handheld microscope.
[0029] S432. Preprocess the acceleration signal, use the preprocessed acceleration signal as input, and the wear value of the tool flank as a label to train a tool wear monitoring model based on multi-scale GRU.
[0030] Preferably, step S44 further includes the following step:
[0031] The Bayesian optimization algorithm is used to optimize the hyperparameters in the SVM model and the parameters in the correction function, thereby optimizing the thermal error compensation model.
[0032] Preferably, in step S432, the acceleration signal is preprocessed, including the following steps:
[0033] The signal input / output and idle data are removed by a change point detection algorithm, and the data is downsampled by a moving average method.
[0034] Preferably, in step S43, the multi-scale GRU includes four parallel branches, each branch containing two layers of GRU units; the first layer of GRU units in the four branches all have 128 neurons, and the second layer has 128, 64, 32, and 16 neurons respectively; then the four branches pass through two fully connected layers in sequence, the two fully connected layers have 512 and 128 neurons respectively, and the prediction result is output after passing through the fully connected layers.
[0035] The beneficial effects of this invention are:
[0036] Based on the thermal error compensation model of machine tool temperature change and tool wear, and combined with the dimensional changes caused by the cooling of the workpiece after heating, the tool is comprehensively compensated. This avoids the limitations of the existing thermal error compensation model that only considers the influence of machine tool and tool, improves the accuracy of tool compensation, and further enhances the machining accuracy of high-precision workpieces. Attached Figure Description
[0037] Figure 1 This is a flowchart illustrating the thermal error compensation method for a five-axis CNC machine tool in an embodiment of the present invention. Detailed Implementation
[0038] The technical solution of the present invention will be described in detail below with reference to the embodiments.
[0039] Example
[0040] A method for thermal error compensation of a five-axis CNC machine tool includes the following steps:
[0041] S1. Obtain the model data of the finished workpiece and establish a simulation thermal expansion model of the workpiece;
[0042] S2. Analyze the simulated thermal expansion model of the workpiece to determine the relationship between the workpiece's temperature and dimensional changes;
[0043] S3. During machine tool operation, collect the temperature data of the workpiece's machining area at the next time step, as follows:
[0044] S31. During machine tool operation, the machining data of the machine tool is collected to obtain the current posture of the workpiece;
[0045] S32. Acquire the current infrared thermal image of the workpiece;
[0046] S33. Adjust the simulated thermal expansion model of the workpiece according to its current posture so that the simulated thermal expansion model corresponds to the current posture of the workpiece.
[0047] S34. Determine the machining location for the next time step based on the machine tool's machining data, and collect the temperature of that machining location in the current infrared thermal imaging.
[0048] S4. Based on the relationship between the workpiece's temperature and dimensional changes, and in conjunction with the thermal error compensation model, determine the tool compensation for the machining area in the next time step, as follows:
[0049] S41. During machine tool operation, thermal error data is obtained by measuring the positional change between the cutting point of the tool and the workpiece.
[0050] S42. Use an SVM model to establish a nonlinear mapping relationship between machine tool-related temperature-sensitive features and thermal errors. The selection of temperature-sensitive features includes the following steps:
[0051] S421. During machine tool operation, temperature data from various relevant monitoring points are collected through multiple temperature sensors. The input characteristics at each moment are used as the temperature values of each temperature sensor, forming a temperature data matrix. The matrix format is as follows:
[0052] ;
[0053] In the formula, For the first Temperature sensor At any moment The temperature value at that time;
[0054] S422. Standardize the collected temperature data to eliminate the influence of data dimension and units. The specific standardization formula is as follows:
[0055] ;
[0056] In the formula, For the first A temperature sensor at time Temperature value at that time Temperature sensor The average temperature value Its standard deviation;
[0057] Correlation analysis was performed on temperature data and thermal error data, and Pearson correlation coefficient analysis was used to screen for data related to thermal error. The Pearson correlation coefficient, a highly correlated temperature-sensitive characteristic, is calculated using the following formula:
[0058] ;
[0059] In the formula, For a moment Thermal error value, and Temperature sensors The mean of thermal error, This refers to the number of temperature sensors;
[0060] Setting the correlation threshold to 0.85, temperature features with correlation coefficients greater than 0.85 are retained to form a temperature-sensitive feature set:
[0061] ;
[0062] In the formula, The number of sensitive temperature features selected;
[0063] SVM uses a radial basis function (RBF) kernel, with the kernel function in the form of:
[0064] ;
[0065] In the formula, Two vectors and Kernel functions between is a hyperparameter of the radial basis function (RBF) that controls the similarity between input features;
[0066] The SVM model is trained using historical temperature data and thermal error data to generate a nonlinear mapping relationship between temperature-sensitive features and thermal error. The model is as follows:
[0067] ;
[0068] In the formula, It is a pre-trained SVM regression model that can predict thermal errors based on temperature-sensitive feature data.
[0069] S43. Train a tool wear monitoring model based on a multi-scale GRU. The multi-scale GRU includes four parallel branches, each containing two layers of GRU units. The first layer of GRU units in each of the four branches has 128 neurons, and the second layer has 128, 64, 32, and 16 neurons respectively. Then, the four branches pass through two fully connected layers in sequence. The two fully connected layers have 512 and 128 neurons respectively. After passing through the fully connected layers, the prediction results are output as follows.
[0070] S431. During machine tool operation, acceleration signals are collected by a three-dimensional accelerometer, and the wear value of the tool's flank face is measured by handheld microscope.
[0071] S432. The acceleration signal is preprocessed by removing signal entry / exit and idle data using a change point detection algorithm, and downsampling the data using a moving average method. The preprocessed acceleration signal is used as input, and the tool flank wear value is used as a label to train a tool wear monitoring model based on a multi-scale GRU. The signal preprocessing process is as follows:
[0072] Acceleration signal of one cutting operation Divide the data into segments and define each segment as... Each segment contains Data points:
[0073] ;
[0074] For each signal segment Calculate its mean and variance The formula is as follows:
[0075] ;
[0076] ;
[0077] Compare adjacent data segments and mean and variance To determine whether there is a significant change between two data sets, calculate using the following formulas respectively. and :
[0078] ;
[0079] ;
[0080] when At that time, this part of the data is removed; for the remaining stable signals Perform sliding window downsampling; if the window is too small... Then the mean value in each sliding window can be expressed as:
[0081] ;
[0082] In the formula, From position In the start window sample points (from) arrive The mean of )
[0083] The entire signal is processed using a sliding window method to generate a downsampled signal. ;
[0084] S44. A correction function is added to the SVM model to obtain the thermal error compensation model. The correction function dynamically adjusts the thermal error compensation based on the real-time tool wear value output by the tool wear monitoring model. In addition, a Bayesian optimization algorithm is used to optimize the hyperparameters in the SVM model and the parameters in the correction function to optimize the thermal error compensation model.
[0085] A multi-scale GRU model is used to monitor tool wear in real time, with preprocessed acceleration signals as input. The GRU model captures wear state changes at different time scales and outputs the real-time wear state of the tool. The recursive formula for each layer of GRU is:
[0086] ;
[0087] ;
[0088] ;
[0089] In the formula, To update the door, To reset the door, For the current moment The hidden state output. Output the hidden state from the previous time step. Let the input vector be the input vector at the current time. , It updates the weight matrix of the gate. , It is the weight matrix of the reset gate. , Let be the weight matrix of the candidate hidden states. It is the sigmoid activation function. The hyperbolic tangent activation function is used. This indicates element-wise multiplication;
[0090] Considering the impact of tool wear on thermal error, a sigmoid correction function is introduced to dynamically adjust the thermal error compensation. The formula for the correction function is:
[0091] ;
[0092] In the formula, For a moment Tool wear during use, The parameters used to control the steepness of the sigmoid curve, The threshold at which tool wear begins to significantly affect thermal error;
[0093] The formula for the revised thermal error compensation model is as follows:
[0094] ;
[0095] Bayesian optimization is used to jointly optimize the hyperparameters in the model, including those in the SVM. and and the tool wear correction function and The objective function of Bayesian optimization is:
[0096] ;
[0097] In the formula, As a penalty factor, For a moment The actual thermal error at that time For total thermal error compensation;
[0098] Through Bayesian optimization, the optimal combination of hyperparameters and correction function parameters in SVM is finally obtained. The final formula for the thermal error compensation model is:
[0099] ;
[0100] S45. Based on the relationship between the temperature and dimensional changes of the workpiece, determine the tool compensation caused by the temperature change of the workpiece at the next processing time.
[0101] S46. Based on the tool compensation caused by the change in workpiece temperature at the next processing time, combined with the final thermal error compensation model, the final tool compensation is obtained.
[0102] This invention constructs a simulated thermal expansion model of the workpiece and adjusts the model in real time according to the workpiece's current posture at preset time intervals to match the infrared thermal imaging of the workpiece at the corresponding time. This allows for accurate prediction of the error required at the next machining point due to the workpiece cooling and forming after machining. Finally, this error is combined with the output of the thermal error compensation model to determine the final tool compensation amount. Based on the thermal error compensation model of machine tool temperature change and tool wear, and combined with the dimensional changes caused by the cooling of the workpiece after heating, the tool is comprehensively compensated. This avoids the limitations of existing thermal error compensation models that only consider the influence of machine tool and tool factors, improves the accuracy of tool compensation, and further enhances the machining accuracy of high-precision workpieces.
[0103] The embodiments described above are merely illustrative of specific implementations of the present invention, and while the descriptions are detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention.
Claims
1. A method for thermal error compensation in a five-axis CNC machine tool, characterized in that, Includes the following steps: S1. Obtain the model data of the finished workpiece and establish a simulation thermal expansion model of the workpiece; S2. Analyze the simulated thermal expansion model of the workpiece to determine the relationship between the workpiece's temperature and dimensional changes; S3. During machine tool operation, collect temperature data of the workpiece's machining area at the next processing time; S4. Based on the relationship between the temperature and size changes of the workpiece, predict the amount of error required at the machining point at the next moment due to the cooling and forming of the workpiece after machining. Combined with the thermal error compensation model, determine the tool compensation for the machining part at the next moment.
2. The thermal error compensation method for a five-axis CNC machine tool according to claim 1, characterized in that, In step S3, temperature data of the workpiece's next processing location is collected, including the following steps: S31. Collect the machining data of the machine tool to obtain the current posture of the workpiece; S32. Acquire the current infrared thermal image of the workpiece; S33. Adjust the simulated thermal expansion model of the workpiece according to its current posture so that the simulated thermal expansion model corresponds to the current posture of the workpiece. S34: Determine the machining location for the next time step based on the machine tool's machining data, map the machining location to the simulated thermal expansion model and infrared thermal imaging, and collect the temperature of the machining location in the current infrared thermal imaging.
3. The thermal error compensation method for a five-axis CNC machine tool according to claim 2, characterized in that, In step S4, based on the relationship between the workpiece's temperature and dimensional changes, the error required at the machining point at the next moment due to the workpiece cooling and forming after machining is predicted. Combined with the thermal error compensation model, the tool compensation amount for the machining area at the next moment is determined, including the following steps: S41. During machine tool operation, thermal error data is obtained by measuring the positional change between the cutting point of the tool and the workpiece. S42. Use the SVM model to establish a nonlinear mapping relationship between machine tool-related temperature-sensitive characteristics and thermal errors; S43. Train a tool wear monitoring model based on multi-scale GRU; S44. Add a correction function to the SVM model to obtain the thermal error compensation model; The correction function dynamically adjusts the thermal error compensation based on the real-time tool wear value output by the tool wear monitoring model; S45. Based on the relationship between the temperature and dimensional changes of the workpiece, determine the tool compensation caused by the temperature change of the workpiece at the next processing time. S46. Based on the tool compensation caused by the change in workpiece temperature at the next processing time, combined with the thermal error compensation model, the final tool compensation is obtained.
4. The thermal error compensation method for a five-axis CNC machine tool according to claim 3, characterized in that, In step S42, the screening of temperature-sensitive features includes the following steps: S421. During the operation of the machine tool, temperature data of various relevant monitoring points are collected through multiple temperature sensors; S422. Standardize the collected temperature data, perform correlation analysis on the temperature data and thermal error data, and screen out temperature-sensitive features that are highly correlated with thermal error to form a temperature-sensitive feature set.
5. The thermal error compensation method for a five-axis CNC machine tool according to claim 4, characterized in that, In step S43, the tool wear monitoring model based on multi-scale GRU is trained, including the following steps: S431. During machine tool operation, acceleration signals are collected by a three-dimensional accelerometer, and the wear value of the tool's flank face is measured by handheld microscope. S432. Preprocess the acceleration signal, use the preprocessed acceleration signal as input, and the wear value of the tool flank as a label to train a tool wear monitoring model based on multi-scale GRU.
6. The thermal error compensation method for a five-axis CNC machine tool according to claim 5, characterized in that, Step S44 also includes the following steps: The Bayesian optimization algorithm is used to optimize the hyperparameters in the SVM model and the parameters in the correction function, thereby optimizing the thermal error compensation model.
7. The thermal error compensation method for a five-axis CNC machine tool according to claim 6, characterized in that, In step S432, the acceleration signal is preprocessed, including the following steps: The signal input / output and idle data are removed by a change point detection algorithm, and the data is downsampled by a moving average method.
8. The thermal error compensation method for a five-axis CNC machine tool according to claim 7, characterized in that, In step S43, the multi-scale GRU includes four parallel branches, each containing two layers of GRU units; the first layer of GRU units in each of the four branches has 128 neurons, and the second layer has 128, 64, 32, and 16 neurons respectively; then the four branches pass through two fully connected layers in sequence, with 512 and 128 neurons respectively, and the prediction result is output after passing through the fully connected layers.
Citation Information
Patent Citations
Five-axis numerical control machine tool thermal error compensation method considering tool wear
CN119148621A
Cited By
A temperature collection module for real-time monitoring of a numerical control machine tool and application thereof
CN122346060A