# Novel Real-Time Compensation Method for Machine Tool's Ball Screw Thermal Error
## 1 Introduction  
In precision machining, the contribution of thermal error to total machine tool error can reach 40-70% [1; 2]. Fortunately, the thermal error of the machine tool can be effectively controlled using materials with low thermal expansion coefficients [3], as well as through structural design optimization [4] and cooling [5]. However, such measures are expensive and, therefore, impractical for most machine tools. For example, the drilling machines commonly used in the 3C (Computers, Communications, and Consumer Electronics) industry utilize a semi-closed control loop, and the thermal error caused by the thermal elongation of the ball screw during processing can significantly reduce positioning accuracy. Therefore, the mechanisms for improving machining accuracy through thermal error compensation technology have been widely researched [6]. For the past few decades, data mining algorithms such as multivariate linear regression [7], neural networks [8], support vector machines [9], and gray systems [10] have been widely used in the modeling of machine tool thermal errors. However, the robustness of the big data model requires suitable heat-sensitive point selection [11]. However, the temperature measurement of moving parts, such as the screw and screw nut, is challenging [12], which has limited the effectiveness of such classic methods. A potential alternative for thermal error prediction is the solution of the thermal equilibrium equation. However, traditionally, this method exhibits low computational efficiency [13] and challenges in parameter identification [14]. Significant research is being done to overcome these obstacles. [PERSON] [15] uses partial differential equations to determine the thermal error model of the ball screw feed system and compensate for it. [PERSON] [16] uses the GA-SRW neural network to construct a thermal error model of the x-axislead screw of worm gear machines for error compensation. Meanwhile, [PERSON] [17] has established a quasi-static model and a thermodynamic model for the thermal characteristics of the ball screw and proposes a calculation scheme considering the dynamic changes of boundary conditions. Through comprehensive analysis of the influence of various factors, [PERSON] [18] has determined the mechanism of thermal error in a linear axis fixed on each end (fixed-fixed installation). [PERSON] [19] considers the ball screw feed system as a two-dimensional heat transfer system and has analyzed and predicted its thermal error. [PERSON] [20] proposes a thermal error model of the feed shaft based on the heat transfer mechanism and investigates the reliability of the model based on the deep belief network (DBN) and the Monte Carlo method. [PERSON] [14], meanwhile, uses the finite difference method to simulate the thermal elongation of the feed system under various working conditions and optimizes boundary conditions using the response surface method. [PERSON] [21] directly integrates the thermal error model established using the transfer function into the control system of the machining center to realize real-time compensation of thermal error. There are few existing studies discussing the trade-off of computing power and the robustness of the thermal error prediction model. In this study, we propose a thermal error compensation method based on a finite difference iterative equation, using the screw of a three-axis drilling machine as the object. The paper is structured as follows. Section 2 presents a broad view of the iterative finite difference equation and modeling method for a single-ended fixed ball screw feed system, while Section 3 presents the detailed derivation of the thermal error equations. Section 4 proposes and evaluates a parameter identification method and introduces the thermal error compensation implementation and procedure.