Thermal Error Compensation Technology: Thermodynamic Approaches to Enhance the Precision of Computer Numerical Control Machine Tools

Thermal Error Compensation Technology: Thermodynamic Approaches to Enhance the Precision of Computer Numerical Control Machine Tools

Meng Han

Intelligent Manufacturing College, Zibo Vocational Institute, Zibo 255300, China

Corresponding Author Email: 
11259@zbvc.edu.cn
Page: 
574-582
|
DOI: 
https://doi.org/10.18280/ijht.420224
Received: 
7 November 2023
|
Revised: 
29 January 2024
|
Accepted: 
12 March 2024
|
Available online: 
30 April 2024
| Citation

© 2024 The author. This article is published by IIETA and is licensed under the CC BY 4.0 license (http://creativecommons.org/licenses/by/4.0/).

OPEN ACCESS

Abstract: 

With the widespread application of computer numerical control (CNC) machine tools in high-precision manufacturing, their machining accuracy has garnered significant attention. Thermal errors generated during machining processes are one of the primary factors affecting accuracy. Although thermal error compensation technologies have been extensively researched and implemented in practice to improve machine accuracy, existing methods still face limitations in the dynamic thermal behavior analysis and adaptability in practical applications. This paper delves into the thermal error compensation technologies for CNC machine tools, exploring measurement, prediction, and compensation methods. Firstly, it enhances the accuracy and efficiency of measurements by optimizing the layout of temperature measurement points through a detailed analysis of the mechanisms of thermal error generation. Secondly, it introduces a prediction framework based on digital twin technology to accurately simulate and predict the thermal behavior of machine tools. Lastly, it employs an optimized back propagation neural network (BPNN) for intelligent modeling of thermal errors, thereby improving the prediction accuracy and response speed. These studies not only aid in improving the design and operation of machine tools but also provide theoretical and technical support for high-precision machining.

Keywords: 

computer numerical control (CNC) machine tools, thermal errors, thermal error compensation, digital twins, back propagation neural network (BPNN)

1. Introduction

With the modern manufacturing industry evolving towards high precision and efficiency, CNC machine tools play an increasingly important role in the machining of complex parts [1-4]. However, thermal deformation, which is inevitable during the machining process and caused by temperature changes, significantly affects the machining accuracy and product quality of machine tools [5-8]. Therefore, researching how to accurately measure and compensate for the thermal errors of machine tools is crucial for improving the machining accuracy and operational efficiency of CNC machine tools.

Thermal error compensation technology has become one of the key technologies to enhance the precision of CNC machine tools [9, 10]. Effective thermal error compensation can significantly improve the machining accuracy, reduce machining errors, and enhance product quality [11-15]. Additionally, in-depth research on thermal errors of machine tools not only helps optimize machine design but also enhances the market competitiveness of machine tools, aligning with the requirements for sustainable development.

However, despite various proposed methods for measuring and compensating thermal errors, there are still some deficiencies and flaws. Current studies are mostly focused on compensating static thermal errors, with insufficient exploration of the dynamic thermal behavior demonstrated by machine tools during actual machining processes [16-19]. Moreover, existing thermal error prediction models and compensation algorithms have not yet fully adapted to complex machining conditions and environmental changes, and their adaptability and accuracy in real application scenarios still need to be improved [20, 21].

This thesis conducts in-depth research on the thermal error compensation technology of CNC machine tools, which includes three main parts: Firstly, analyzing the generation mechanism of thermal errors in CNC machine tools and optimizing the layout of temperature measurement points to improve the accuracy and efficiency of thermal error measurements; secondly, constructing a prediction architecture based on digital twins for CNC machine tools' thermal errors, using digital twin technology to accurately simulate the thermal behavior of machine tools and predict and compensate for thermal errors in advance; lastly, developing a thermal error modeling method based on an optimized BPNN, which uses intelligent algorithms to improve the accuracy and response speed of thermal error predictions. Through these studies, this paper aims to provide a more precise and reliable thermal error compensation solution to significantly enhance the machining accuracy of CNC machine tools.

2. Thermal Error Analysis and Optimization for CNC Machines

2.1 Thermal error analysis

In the research on improving the precision of CNC machine tools, a deep understanding and accurate analysis of the thermal sources causing temperature changes in the machine tools are crucial. Internal thermal sources, such as motor operations and bearing friction, as well as external thermal sources like factory lighting and direct sunlight, significantly affect the temperature of the machine tools. Internal heat sources convert mechanical energy into heat energy, and the extent of their impact depends on the dynamic conditions of the equipment operation, such as bearing speed and friction characteristics. By applying thermodynamic principles, it is possible to precisely quantify these heat sources' thermal effects and the ways heat energy is transferred. Additionally, the thermal response of the machine tools is also influenced by their material and structural thermal capacity, which determines the speed and extent of heat propagation. The instability of environmental factors introduced by external heat sources, such as temperature fluctuations and the efficiency of cooling systems, must also be analyzed through thermodynamic methods to optimize the layout of temperature measurement points, ensuring the scientific validity and effectiveness of thermal error compensation strategies.

When CNC machine tools are in operation, internal heat sources, friction between the tool and the workpiece, and the use of coolant together create a complex internal temperature field. The uneven distribution of this temperature field causes significant spatial temperature variations among machine tool components, leading to inconsistent thermal expansion of materials and uneven thermal deformation. The extent of thermal deformation is not only influenced by the component temperatures but also by the material properties of the components, such as their thermal expansion coefficients. Through thermodynamic analysis, the direct impacts of these heat-induced deformations on the tool movement trajectory and the geometric accuracy of the machine tools can be predicted, subsequently affecting the dimensions of the machined parts. Thermal error refers to the discrepancy between the workpiece dimensions caused directly by the thermal deformation of the machine tools and their ideal dimensions. To accurately compensate for these thermal errors, it is essential to optimize the layout of temperature measurement points. By precisely monitoring the temperature changes at critical parts through thermodynamic analysis, effective compensation strategies can be developed to achieve the desired precision improvement targets. Figure 1 provides a schematic diagram of the mechanism of thermal error generation in CNC machine tools.

Figure 1. Schematic diagram of thermal error generation mechanism in CNC machine tools

2.2 Optimization of temperature measurement points

In the research on thermal error compensation for CNC machine tools, optimizing the layout of temperature measurement points is a key step aimed at accurately capturing the critical temperature regions that cause thermal errors, thereby enhancing the machining accuracy of the machine tools. Through thermodynamic analysis of the internal heat conduction mechanisms of CNC machine tools, combined with the schematic shown in Figure 2, this paper proposes the following methods for optimizing temperature measurement points:

The first method of optimizing temperature measurement points is based on the thermal mechanisms of machine tools and historical experience. By combining theoretical analysis with experimental research, this method identifies the most accuracy-impacting thermally sensitive areas within the CNC machine tools and installs temperature sensors at these critical locations. This strategy deeply applies thermodynamic principles, based on the heat transfer characteristics and operating conditions of the machine tools, for precise placement of temperature sensors, effectively reducing experimental costs and time.

The second method of optimizing temperature measurement points utilizes a data-driven strategy. In the initial phase, multiple temperature sensors are randomly installed on the machine tool based on preliminary assumptions. Then, using the temperature data collected during actual operations, statistical analysis and thermodynamic models, such as grey relational analysis and fuzzy clustering methods, are applied to analyze the relationship between the data and the spindle thermal errors. This method identifies the measurement points most correlated with spindle thermal errors, while ensuring that the data from these points have low correlation, optimizing the layout of the sensors. This strategy allows for dynamic adjustment and validation of the effectiveness of the measurement points under actual working conditions, enhancing the adaptability and precision of the approach.

Figure 2. Schematic diagram of heat conduction within cnc machine tools

The third method of optimizing temperature measurement points combines the advantages of the first two methods, employing a hybrid strategy. In the initial phase, potential thermally sensitive areas are predicted based on thermodynamic theory and machine tool design, and sensors are installed in these areas. Subsequently, by collecting actual temperature measurement data and using thermodynamic analysis tools, the effectiveness of these preset points is evaluated, and sensor positions are adjusted based on data correlation. This method combines the systematic nature of theoretical analysis with the empirical nature of experimental data, significantly improving the reliability and efficiency of the thermal error compensation strategy.

The first strategy relies on theoretical analysis and extensive engineering experience to pre-select temperature-sensitive points, effectively reducing the number of temperature sensors and interference, thus lowering costs and simplifying the data processing workflow. This method is suitable for standard machine tool operations that already have a thorough understanding of thermal mechanisms and extensive historical data. However, this strategy is somewhat subjective, and the simplified theoretical models may not fully accurately reflect complex real-world conditions. By combining quantitative thermodynamic analysis, this strategy can further improve the accuracy of temperature measurement point selection, reducing errors caused by model simplification. The second strategy uses a data-driven approach for real-time optimization of temperature points, particularly suitable for the initial research stages of new or special material machine tools. Although more costly, this method can accurately identify temperature measurement points highly correlated with thermal errors based on real operational data through dynamic analysis of thermodynamic behavior. This strategy effectively combines theory and practice by continuously monitoring and analyzing data, ensuring the precision and efficiency of thermal error compensation. The third strategy combines the advantages of the first two, initially determining temperature measurement points based on thermodynamic theory and experience, then optimizing based on actual data. This method reduces subjective bias as well as costs and the number of sensors, suitable for high-end CNC machine tools with high precision requirements and significant thermal error impacts. This strategy uses thermodynamic analysis to predict and validate the effectiveness of temperature measurement points, achieving an organic integration of theoretical predictions and experimental data, greatly enhancing the reliability and efficiency of the thermal error compensation plan. Overall, the third strategy provides an ideal balance, effectively combining theoretical depth with the objectivity of experimental data, particularly suitable for application in modern manufacturing environments where high precision and cost-effectiveness are sought.

2.3 Selection of temperature measurement points

This paper determines the layout of temperature measurement points based on the principles of thermodynamics, ensuring the selected points can accurately capture the thermal state changes of machine tools under actual working conditions, thus effectively guiding the thermal error compensation strategy. The chosen temperature measurement points should be located in areas where heat sources are concentrated and thermal impacts are significant, while also considering the representativeness of the hot spots and the practicality of the measurement data to achieve precise control and compensation of thermal errors.

Firstly, the selection of temperature measurement points should be close to the main heat sources. For example, in CNC machine tools, the spindle motor, as a primary heat source, makes areas near the spindle motor ideal temperature measurement points. These locations, being adjacent to the heat source, can directly reflect the transmission and distribution of heat generated during motor operation, providing key data for analyzing the overall temperature field. Thermodynamic analysis methods can further evaluate these temperature measurement points' data, helping to understand the cooling efficiency and thermal impact range of the spindle motor, providing a scientific basis for optimizing cooling system design and thermal error compensation strategies.

Secondly, the selected temperature measurement points need to comprehensively reflect the temperature field of the spindle system. The spindle system is a core component of CNC machine tools, and its temperature changes are directly related to the machining accuracy of the machine. Therefore, the layout of temperature measurement points should not only cover the spindle motor but also extend to surrounding key components such as spindle bearings. Data collected from these temperature measurement points can be used to comprehensively assess the temperature distribution and thermal stability of the spindle system under different working conditions, providing necessary experimental data for constructing thermodynamic models and predicting thermal errors.

Lastly, the temperature changes at the selected temperature measurement points should directly affect the size and direction of the spindle's thermal errors. This means that the temperature measurement points must not only be located in heat concentration areas but also in thermal error-sensitive areas, where temperature changes are directly related to machining errors of the machine tools. Through thermodynamic correlation analysis, it can be determined which temperature measurement points' data have a high correlation with machining errors, making the temperature monitoring at these points critical for devising effective thermal error compensation measures.

3. CNC Machine Tool Thermal Error Prediction Architecture Based on Digital Twins

In this study, to accurately predict and compensate for the thermal errors of CNC machine tools, a thermal error prediction architecture based on digital twin technology is proposed. This architecture integrates thermodynamic analysis with advanced simulation techniques, aimed at enhancing the machining precision of CNC machine tools. The architecture is divided into four main levels: the physical entity layer, the data transmission layer, the function execution layer, and the application service layer. The physical entity layer includes the actual physical information of the CNC machine tools and their environment, providing the necessary baseline data for the model; the data transmission layer is responsible for transferring the real-time operating data of the machine tools to the virtual model, ensuring the timeliness and accuracy of the data; the function execution layer uses these data to build mathematical and visualization models through thermodynamic principles and mechanical engineering techniques, simulating the thermal behavior and error changes of the machine tools, providing the core functions for prediction and analysis; the application service layer transforms the analysis results into specific technical applications and software packages for use by engineers and technicians to optimize machine performance. Figure 3 shows this digital twin-based CNC machine tool thermal error prediction architecture.

(1) Physical entity layer

As the bridge between actual machine tool operations and the virtual simulation model, the physical entity layer contains detailed information about the CNC system, linear feed axes, sensor testing equipment, and machined parts. This layer focuses on collecting data closely related to the machine tool's thermal errors. To ensure the comprehensiveness and accuracy of the data, this layer needs to precisely gather the motion and temperature information of the linear feed axes, which not only reflects the physical and geometric characteristics of the machine tools but is also crucial for thermal error analysis. By systematically collecting these key data, the physical entity layer provides real-time and accurate input to the digital twin model, ensuring that the thermodynamics-based analysis can effectively predict and compensate for the thermal errors that may occur in actual operations of CNC machine tools, thereby significantly improving machining precision and equipment efficiency.

(2) Data transmission layer

The data transmission layer plays a crucial role in the digital twin architecture, ensuring efficient and real-time communication between the physical entity space and the digital virtual space. At this level, the machining program is input into the CNC system, and a simulation of actual operations is performed under no-load conditions to capture real-time motion speed and coordinate position information on the X, Y, and Z axes. This mechanical information, along with temperature data measured by sensors at specific locations (such as near ball screws or linear scales), provides comprehensive monitoring of the machine tool's thermal state. Additionally, this layer is responsible for transferring environmental temperature forecasts and real-time measured thermal error values between physical and virtual spaces, ensuring thermal errors can be predicted and fed back promptly and accurately. During the thermal error compensation stage, the mechanical information and temperature data obtained are used to adjust and optimize the operating parameters of the CNC machine tools, compensating for errors caused by temperature changes in real time, and enhancing machine tool precision and performance using thermodynamic principles.

(3) Function execution layer

The function execution layer is the core of the digital twin architecture, responsible for implementing and operating highly accurate models, focusing on predicting and analyzing the thermal errors of the linear feed axes. This layer includes thermal error models specifically designed for the linear feed axes and three-dimensional digital models, based on thermodynamic and mechanical dynamics principles, ensuring the precision and practicality of thermal error predictions. The thermal error models are divided into linear feed axis thermal expansion error models and origin thermal drift error models, which detailedly depict and predict the thermal behavior and error evolution of the machine tools under different operating conditions. The three-dimensional digital models include geometric and physical models, where the geometric models are created in 3D modeling software using lightweight modeling techniques, displaying the accurate geometry and dynamics of the linear feed axes; the physical models are constructed using computer programming languages, precisely showing the thermal deformation state of the linear feed axes during actual operation through abstract modeling methods.

(4) Application service layer

The application service layer acts as a critical link between the user interface and actual applications within the digital twin-based CNC machine tool thermal error prediction architecture, primarily aimed at transforming complex models and algorithms from the function execution layer into user-friendly applications. This layer packages advanced simulation results and thermal error analysis tools, intuitively and real-time displaying the operational state and thermal error data of the machine tool feed axes on a human-machine interaction interface. The key task is to ensure the visual processing of information, allowing operators to easily understand and operate while ensuring the software's high reliability and stability to withstand the harsh conditions of industrial sites. The design of this layer focuses on enhancing the user experience and operational convenience, ensuring that from technicians to ordinary operators, everyone can effectively use digital twin technology for precise thermal error monitoring and compensation.

Figure 3. Digital twin-based CNC machine tool thermal error prediction architecture

4. CNC Machine Tool Thermal Error Modeling Based on Optimized BPNN

In the field of thermal error prediction and compensation for CNC machine tools, traditional modeling techniques such as multivariate linear regression and least squares method often fail to provide sufficiently accurate predictions due to the latency and non-linearity of machine tool thermal errors. To address these challenges, artificial neural networks, especially BPNNs, are widely used due to their powerful non-linear mapping capabilities and adaptive learning functions. However, standard BPNNs have problems such as falling into local minima, complex parameter initialization, and slow convergence rates. To overcome these limitations and further enhance the efficiency and accuracy of the prediction models, this paper proposes a BPNN model optimized by a chaotic ant colony algorithm. This model combines the global search capability of chaos theory with the optimization efficiency of ant colony algorithms, significantly improving learning speed and generalization ability, effectively avoiding overfitting during network training, thus achieving more accurate and stable predictions of thermal errors in CNC machine tools. Figure 4 shows the flowchart of the BPNN model optimized by the chaotic ant colony algorithm.

The core principle of the constructed model relies on the optimization capability of the ant colony algorithm and the randomness of chaos theory. Initially, by setting the parameters of the BPNN, establishing the maximum number of ants and the number of iterations, the optimization process is initiated. In the ant colony algorithm, the foraging path of each ant is introduced with chaotic disturbances, using the uncertainty and sensitivity of chaos theory to avoid falling into local optima during the search process. As ants complete their foraging and return to the nest, based on their return order and the shortness of their paths, the pheromone is updated, prioritizing the search results of the ants with the shortest paths, thus enhancing search efficiency. This process is repeated until the iteration number is reached or all ants converge on a common path, indicating that the optimal network parameters have been found. These parameters are then assigned to the BPNN, forming an optimized model capable of precisely predicting the thermal errors of CNC machine tools in actual operations, thereby improving the machining precision and efficiency of the machine tools.

When researching the BPNN model optimized by the chaotic ant colony algorithm for predicting thermal errors in CNC machine tools, precise experimental data as a basis for model training and validation is essential. Initially, by using a laser interferometer to measure the thermal errors of the spindle of a CNC machine tool under experimental conditions, detailed thermal drift error data can be obtained. This data not only includes the magnitude and direction of the errors (X, Y, Z directions) but also detailed records of the temperatures at each measurement point during measurement. Such data collection provides a quantified experimental basis for subsequent model training, ensuring that the constructed model can accurately reflect the actual thermal behavior of the machine tools under working conditions. Before establishing the thermal error prediction model, this paper conducts cluster analysis and correlation analysis on the collected temperature data, effectively identifying key measurement points closely related to spindle thermal errors. In this step, the analysis aims to explore the relationship between the temperatures at various measurement points and the thermal errors of the machine tool spindle, to determine the most influential temperature variables.

In the BPNN model optimized by the chaotic ant colony algorithm for modeling thermal errors of CNC machine tools, the specific optimization steps include the following four key stages:

(1) Parameter Setting Stage: At this stage, first define the number of parameters v to be optimized in the neural network and the specific parameters x1x2x3, ..., xv. Randomly select and assign each parameter a non-zero initial value, forming the parameter set Txu. Assign an initial pheromone value πk(Txu)(s)=F to each parameter, usually set as a constant, which will be updated during subsequent iterations. At the same time, set the maximum number of ants V and the maximum number of iterations S, providing a basic operational framework for the execution of the algorithm.

Figure 4. Flowchart of the BPNN model optimized by chaotic ant colony algorithm

(2) Calculate Transition Probability: At this stage, each ant needs to choose the transition probability for the next parameter from its current position. This probability depends not only on the intensity of the pheromones but also considers the "distance" between parameters, i.e., the similarity or fit of the selected parameter to the current parameter solution. Based on these two factors, construct a probability formula to guide the ants' search behavior, ensuring that ants move towards directions with higher pheromone concentrations and better parameter solutions, thus exploring more optimal neural network parameter configurations.

Construct the probability formula as follows:

$O\left(s_k^j\left(T_{x u}\right)\right)=\frac{\left(s_k\left(T_{x u}\right)\right)}{\sum_{a=1}^L s_i\left(T_{x u}\right)}$            (1)

(3) Update of Pheromones: To avoid the ant colony algorithm merely cycling through previously explored paths and falling into local optima, this stage introduces the Logistic model from chaotic systems for local pheromone updates. Assume the pheromone evaporation factor is represented by ϑ, and the rate of pheromone evaporation is represented by 1-ϑ. The intensity of the pheromone on a path at time s is represented by π0. The local pheromone update formula is as follows:

$\pi_{u k}(s)=(1-\vartheta) \pi_{u k}(s)+\vartheta \pi_0$            (2)

By adding a chaotic disturbance, the system's randomness and exploratory capacity are enhanced, allowing the search process to escape local optima and explore new possibilities. Assume the chaotic disturbance is represented by Quk, and the mapping coefficient is represented by w. The local pheromone formula after chaotic disturbance is as follows:

$\pi_{u k}(s)=(1-\vartheta) \pi_{u k}(s)+\vartheta \pi_0+w Q_{u k}$            (3)

Whenever an ant completes a search, the pheromone on that path is updated based on the quality of the path. The optimized pheromone update formula can reflect the relative merits of each path, providing correct guidance for the ant colony's search. Assume that the pheromone intensity left by an ant on path (u, k) during this search task is represented by ∆πuk(s), and the pheromone update formula for each path is as follows:

$\pi_{u k}\left(s+s_0\right)=(1-\vartheta) \pi_{u k}(s)+\Delta \pi_{u k}(s)$           (4)

Assume that the residual pheromone of the j-th ant after completing a search task on the k-th element in the set area Txu is represented by ∆sjk, and the calculation formula for ∆πuk(s) is as follows:

$\Delta \pi_{u k}(s)=\sum_{j=1}^V \Delta s_k^j\left(T_{x u}\right)$          (5)

Assume a constant is represented by O, and the total path length traveled by the j-th ant after completing a search task is represented by ∆sjk. The calculation formula for ∆sjk is as follows:

$\Delta s_k^j=\left\{\begin{array}{l}\frac{O}{M_j}, u k \in m_j \\ 0, E L\end{array}\right.$          (6)

(4) Iterative Optimization and Convergence: Repeat steps 2 and 3 until the preset number of iterations S is reached or all ants converge on the same optimal path, at which point the algorithm is considered to have found the optimal solution. This final convergence result represents the optimal parameter configuration for the BPNN, which theoretically allows the neural network to achieve the best performance for predicting thermal errors in CNC machine tools. Through this optimization process, the model not only improves prediction accuracy but also enhances the stability and reliability of the network in practical applications.

5. Experimental Results and Analysis

Figure 5 shows the iteration status of the optimized BPNN model constructed. The data from Figure 5 shows that the BPNN model optimized by the chaotic ant colony algorithm has demonstrated significant performance improvements in the application of CNC machine tool thermal error compensation. Specifically, the training error (Train) dropped rapidly from an initial 0.009 to approximately 0.00002 and continued to slightly decrease to 0.0000102 in subsequent iterations, demonstrating the model’s effectiveness and efficiency in parameter optimization.

Figure 5. Iteration situation of the optimized BPNN model constructed

The validation error (Validation), after an initial rapid decrease, stabilized at 0.000018 from the fourth epoch, indicating that the model has good generalization ability on unseen data. The test error (Test) also showed a similar trend, decreasing from 0.02 to 0.0000102, confirming the model’s stability and accuracy in practical applications. The optimal error (Best) remained constant throughout the training process at 0.000018, further proving the model’s consistency and reliability across different datasets. From the analysis of the above data, it can be concluded that the BPNN optimized by the chaotic ant colony algorithm is highly effective in predicting and compensating thermal errors in CNC machine tools. The model not only demonstrated rapid convergence and an extremely low error rate during the training process but also exhibited excellent generalization ability and stability during the validation and testing phases.

(a)

(b)

Figure 6. Predicted and actual thermal error conditions of CNC machine tools

Figure 6 CNC machine tool thermal error prediction vs. actual measurements comparing the actual and predicted data of CNC machine tool thermal errors in Figure 6, the prediction model generally well depicts the growth trend of thermal errors at different measurement points. The data shows that the error at measurement point 1 for all workpieces is always 0, indicating that the model's predictions match reality, confirming that the model accurately sets the starting point for thermal errors. As the measurement point number increases, both the actual and predicted error values show a gradually increasing trend, but the predicted values systematically underestimate the error at the last measurement point (e.g., the actual value at measurement point 6 for workpiece 10 is 19.6, while the predicted value is 18.2). Nonetheless, the model accurately reflects the growth rate and trend of thermal errors. From these observations, it can be concluded that although the prediction model has some errors at certain measurement points for some workpieces, overall, the prediction method based on the optimized BPNN provides good accuracy and reliability for predicting thermal errors in CNC machine tools. This demonstrates that the digital twin technology and neural network optimization algorithms effectively simulate and predict the thermal behavior of machine tools in actual operation, which is crucial for preemptive thermal error compensation.

Figure 7. Difference between predicted and actual error in CNC machine tools

According to the thermal error data of various workpieces at different measurement points provided in Figure 7, we can observe some key trends and patterns. First, the error at measurement point 1 for all workpieces is 0, which meets the initial conditions for thermal errors, indicating that the measurements start from a no thermal load condition. Subsequent measurement points show a trend of gradual increase in thermal errors as the operation time progresses, which conforms to the natural law of heat accumulation during continuous operation of CNC machine tools. Notably, some workpieces show a decrease or negative value in thermal errors at the last measurement points (such as workpiece 4 and workpiece 8), which may indicate that a dynamic equilibrium of heat distribution is being reached among the machine components or that cooling measures are beginning to take effect. From this data analysis, it is evident that the thermal errors of CNC machine tools exhibit a predictable pattern, validating the scientific and practical nature of the thermal error prediction architecture based on digital twin technology. Although the specific values of thermal errors vary among different measurement points and workpieces, these differences may stem from variations in machine usage conditions, environmental temperature changes, or different operating methods.

Table 1 displays data that clearly expresses the correlation coefficients between thermal errors on the X, Y, and Z axes of CNC machine tools at different measurement points (from Point 1 to Point 17). Analysis of these data reveals that most measurement points have high correlation coefficients, particularly on the Y-axis, where coefficients exceed 0.8 at nearly all points, reaching as high as 0.9854 at measurement Point 7, showing a very strong positive correlation. The correlation coefficients on the X and Z axes, although slightly lower than those on the Y-axis, also display strong positive correlations at most points, with the X-axis showing the highest correlation coefficient of 0.9365 at measurement Point 7, and the Z-axis peaking at measurement Point 10 with a coefficient of 0.9154. These high correlation coefficients indicate a clear direct relationship between rising temperatures and increased thermal errors in the machine tools. From these results, it can be concluded that temperature is a significant factor affecting the thermal errors of CNC machine tools, and its impact varies across different axes. The high correlation coefficients confirm the close link between temperature and thermal errors, supporting the effectiveness of using temperature data for predicting and compensating thermal errors.

Table 1. CNC machine tool thermal error and temperature correlation coefficients

 

Point 1

Point 2

Point 3

Point 4

Point 5

Point 6

Point 7

Point 8

Point 9

X

0.8721

0.8356

0.8546

0.9215

0.8564

0.7784

0.9365

0.8741

0.8365

Y

0.9125

0.8894

0.9215

0.9415

0.8895

0.8326

0.9854

0.8956

0.8795

Z

0.8236

0.7842

0.8236

0.8546

0.7894

0.7321

0.8785

0.9125

0.7895

 

Point 10

Point 11

Point 12

Point 13

Point 14

Point 15

Point 16

Point 17

-

X

0.9215

0.8795

0.8659

0.8265

0.8854

0.8265

0.9215

0.8451

-

Y

0.9542

0.9236

0.9254

0.8654

0.9126

0.8369

0.9451

0.8859

-

Z

0.9154

0.8452

0.8156

0.7689

0.8369

0.8245

0.8795

0.7849

-

Table 2. Comparison of fitting parameters for different prediction models of CNC machine tool thermal errors

 

Thermal Drift

Maximum Absolute Residual

Minimum Absolute Residual

Average Absolute Residual

Coefficient of Determination

Root Mean Square Error

Fitting Accuracy

Traditional BPNN

X direction

1.0235

0.0088

0.3652

0.8354

0.5896

0.9215

Y direction

2.5648

0.5421

1.3789

0.8326

1.3652

0.9258

Z direction

3.8956

0.7795

2.2364

0.8245

2.3694

0.8216

CNN Prediction Model

X direction

0.5874

0.0389

0.3125

0.8541

0.5874

0.9215

Y direction

2.7895

0.3562

1.0256

0.9126

1.2356

0.9326

Z direction

1.4526

0.4215

0.9369

0.8896

0.9568

0.9358

RNN Prediction Model

X direction

0.7326

0.1236

0.3326

0.8451

0.5874

0.9251

Y direction

2.3562

0.5689

1.2895

0.8759

1.4325

0.9245

Z direction

4.5128

0.6124

1.6895

0.8452

1.9852

0.8874

The Proposed Prediction Model

X direction

0.7652

0.0112

0.3147

0.9325

0.5412

0.9213

Y direction

0.9865

0.2865

0.6358

0.9654

0.6689

0.9452

Z direction

1.1265

0.3125

0.7895

0.9631

0.8265

0.9369

Table 2 provides a detailed comparison of the traditional BPNN, CNN prediction models, RNN models, and the optimized BPNN model proposed in this paper in predicting thermal errors in CNC machine tools. By analyzing thermal drift, maximum absolute residual, minimum absolute residual, average absolute residual, coefficient of determination, root mean square error, and fitting accuracy, it is observed that the proposed model particularly excels in predictions on the Y and Z axes. It shows notably better performance in terms of minimum and average absolute residuals compared to other models, while also having a higher coefficient of determination and fitting accuracy. For instance, on the Y-axis, the proposed model has a minimum absolute residual of 0.2865, an average of 0.6358, a coefficient of determination of 0.9654, a root mean square error of 0.6689, and a fitting accuracy of 0.9452, all of which are the best among the compared values. These data demonstrate that the optimized BPNN model proposed in this paper has significant advantages in predicting thermal errors in CNC machine tools. Its high fitting accuracy and low error values reflect the model's effectiveness and accuracy in practical applications, especially in handling complex thermal behavior predictions. This proves that the use of digital twin technology and smart algorithm optimizations is not only theoretically viable but also effectively enhances the capability to compensate for thermal errors in CNC machine tools in practice.

6. Conclusion

This paper has achieved several key scientific and technological advances through in-depth research on thermal error compensation technology for CNC machine tools. First, by detailed analysis of the mechanisms generating thermal errors and optimization of temperature measurement point layout, this study has improved the precision and efficiency of thermal error measurements. Second, it successfully constructed a prediction architecture based on digital twin technology, which can precisely simulate the thermal behavior of machine tools and effectively predict and compensate for thermal errors. Lastly, the study developed a thermal error modeling method based on an optimized BPNN, which significantly improved the accuracy and response speed of thermal error predictions.

Experimental results validate the effectiveness of the technologies. Through iterative analysis, the optimized BPNN demonstrated excellent convergence and stability. In comparisons of measured and predicted thermal errors, the model accurately captured the trends of thermal errors, and despite some errors, its overall performance was outstanding. The correlation analysis between thermal errors and temperatures further confirmed the direct and significant impact of temperature on thermal errors. In multi-model comparative analysis, this paper's model outperformed traditional BPNN, CNN, and RNN models across several key performance indicators, showcasing the efficiency and practicality of the optimized model.

While this study has achieved significant results, there are still some limitations, such as the adaptability and robustness of the model under extreme conditions, which require further verification. Additionally, real-time applications of thermal error compensation must consider the complexity and variability of machine tool operations. Future research directions could include further optimization of temperature measurement point layout, use of more complex machine learning algorithms to handle nonlinear high-dimensional data, and development of more universal thermal error prediction models suitable for different types of CNC machine tools and various operating conditions. Through these studies, it is expected to further enhance the machining precision and production efficiency of CNC machine tools, contributing to high-quality development in manufacturing.

  References

[1] Yu, X., Gao, W., Feng, Y., et al. (2023). Research progress of hydrostatic bearing and hydrostatic-hydrodynamic hybrid bearing in high-end computer numerical control machine equipment. International Journal of Precision Engineering and Manufacturing, 24(6): 1053-1081. https://doi.org/10.1007/s12541-023-00796-6

[2] Yu, G.B., Kwon, J., Chae, S., Lee, S.Y., Jung, S. (2023). Evaluations of patient-specific bolus fabricated by mold-and-cast method using computer numerical control machine tools. Journal of Radiation Research, 64(6): 973-981. https://doi.org/10.1093/jrr/rrad075

[3] Zheng, R., Qian, X., Gu, L. (2023). Group maintenance for numerical control machine tools: A case study. IEEE Transactions on Reliability, 72(4): 1407-1419. https://doi.org/10.1109/TR.2022.3233893

[4] Royandi, M.A., Effendi, I.A., Komara, A.I., Hung, J.P. (2024). Development of low-cost wireless monitoring system and its implementation on computer numerical control machine tool. Sensors and Materials, 36(3): 957-971. https://doi.org/10.18494/SAM4386

[5] Li, Z., Wang, B. (2023). Recent patents on cooling system of CNC machine tools. Recent Patents on Engineering, 17(4): 46-59. https://doi.org/10.2174/1872212116666220410183233

[6] Wang, S., Zhou, B., Fang, C., Sun, S. (2017). Research on thermal deformation of large CNC gear profile grinding machine tools. International Journal of Advanced Manufacturing Technology, 91: 577-587. https://doi.org/10.1007/s00170-016-9442-2

[7] Wang, H., Chen, G., Sun, Y. (2024). Prediction of thermal errors in a motorized spindle in CNC machine tools by applying loads based on heat flux. Proceedings of the Institution of Mechanical Engineers, Part C: Journal of Mechanical Engineering Science, 238(1): 264-278. https://doi.org/10.1177/09544062231170514

[8] Deng, Y., Liu, J., Li, D. (2022). Real time compensation technology for thermal error of lead screw drive system of CNC machine tool. Computer Integrated Manufacturing Systems, CIMS, 28(8): 2460-2471. https://doi.org/10.13196/j.cims.2022.08.017

[9] Chen, C., Dai, H., Lee, C., Hsieh, T., Hung, W., Jywe, W. (2024). The development of thermal error compensation on CNC machine tools by combining ridge parameter selection and backward elimination procedure. The International Journal of Advanced Manufacturing Technology, 130(5): 2423-2442. https://doi.org/10.1007/s00170-023-12778-z

[10] Qin, Q., Li, L., Zhao, G., Li, Z. (2023). Uncertainty quantification for spindle axial thermal error of CNC machine tools considering hysteresis effect. Precision Engineering, 83: 159-169. https://doi.org/10.1016/j.precisioneng.2023.06.002

[11] Wei, X., Ye, H., Zhou, J., Pan, S., Qian, M. (2023). A regularized regression thermal error modeling method for CNC machine tools under different ambient temperatures and spindle speeds. Sensors, 23(10): 4916. https://doi.org/10.3390/s23104916

[12] Zhu, M., Yang, Y., Feng, X., Du, Z., Yang, J. (2023). Robust modeling method for thermal error of CNC machine tools based on random forest algorithm. Journal of Intelligent Manufacturing, 34(4): 2013-2026. https://doi.org/10.1007/s10845-021-01894-w

[13] Chen, P.H., Chang, P.Z., Hu, Y.C., Luo, T.L., Tsai, C.Y., Li, W.C. (2024). On the robustness and generalization of thermal error models for CNC machine tools. The International Journal of Advanced Manufacturing Technology, 130(3): 1635-1651. https://doi.org/10.1007/s00170-023-12685-3

[14] Du, L., Li, R., Li, B. (2021). Deep Learning Prediction for thermal error of CNC machine tools based on attention mechanism. Advanced Engineering Sciences, 53(6): 194-203.

[15] Du, L., Li, R., Yu, Y. (2021). Spatiotemporal convolution thermal error model of CNC machine tools based on attention mechanism. Transactions of the Chinese Society for Agricultural Machinery, 52(5): 404-411.

[16] Wei, X., Ye, H., Miao, E., Pan, Q. (2022). Thermal error modeling and compensation based on Gaussian process regression for CNC machine tools. Precision Engineering, 77: 65-76. https://doi.org/10.1016/j.precisioneng.2022.05.008

[17] Liu, K., Han, W., Wang, Y., Liu, H., Song, L. (2021). Review on thermal error compensation for feed axes of CNC machine tools. Journal of Mechanical Engineering, 57(3): 156-173. 

[18] Zhang, Z., Feng, S., Ding, Y., Mei, X., Tao, Z. (2022). Thermal error modeling of spindle and dynamic machining accuracy reliability analysis of CNC machine tools based on IA and LHSMC. Eksploatacja i Niezawodność, 24(1): 100-113. http://doi.org/10.17531/ein.2022.1.12

[19] Wei, X., Chen, Y., Miao, E., Feng, X., Pan, Q. (2021). Application of principal component algorithm in spindle thermal error modeling of CNC machine tools. Optics and Precision Engineering, 29(11): 2649-2660.

[20] Du, L., Lv, F., Li, R., Li, B. (2021). Thermal error compensation method for CNC machine tools based on deep convolution neural network. Journal of Physics: Conference Series, 1948(1): 012033. http://doi.org/10.1088/1742-6596/1948/1/012165

[21] Li, Z.J., Zhao, C.Y., Lu, Z.C. (2020). Thermal error modeling method for ball screw feed system of CNC machine tools in x-axis. The International Journal of Advanced Manufacturing Technology, 106: 5383-5392. https://doi.org/10.1007/s00170-020-05047-w