COMPENSATION OF MACHINE TOOL THERMAL ERROR BASED ON VIRTUAL SENSORS

Thermal errors can have a significant effect on CNC machine tool accuracy. The thermal error compensation system has become a cost-effective method of improving machine tool accuracy in recent years. Thermal errors of ball screw system directly affect the positioning errors of CNC machine tools. This paper illustrates how virtual sensors for temperature measurement can support the thermal model to predict the thermal errors while reducing the temperature monitoring cost. Experimental results under different working conditions were performed and the proposed model for thermal error compensation proves to be accurate in predicting the thermal error of CNC machine tools.


INTRODUCTION
Thermal errors have been reported to contribute approximately 40-70% of the total positioning error of the CNC machine tool [1].In this work, the thermal error of a ball screw system is discussed.Ball screws are often used in machine tools with a rotary encoder feedback on the end of the screw.Thermal deformation of the ball screw shaft can be a serious source of positioning error [2,3].Thermal errors need to be remedied in order to improve the accuracy of CNC machine tools.During the normal function of ball screw system, heat generating from the friction of balls movement on the thread produces a significant thermal growth of the screw.Using linear scales or laser scales provide direct feedback removing the ball screw from the positioning loop.
However, fitting such scales to many machines may be mechanically difficult and costly [4].Additionally, convenient locations for the scales might be nonideal from a thermal point of view, so cannot be considered a complete solution ‫العلوم‬ ‫األسورٌة:‬ ‫الجاهعة‬ ‫هجلة‬ ‫والتطبيقية‬ ‫األساسية‬ Journal of Alasmarya University: Basic and Applied Sciences to the problem.Another common technique used to reduce the effect of ball screw expansion is application of pre-tension to the ball screw.This technique suffers from a number of drawbacks such as potentially incurring vibration, ball screw buckling and bearing failure problems [5].
Multiple linear regression (MLR) is the simplest method to correlate measured temperatures with resulting displacement.A Least Squares (LS) approach is used to obtain the coefficients that determine the relationship between inputs and output without using any physical equation.In recent work [6], the authors investigated the effect of thermal error on the ball screw feed drive system of a precision boring machine tool.In light of multiple temperature sensors, MLR model was employed to carry out the modelling of thermal error of the ball screw feed drive system.Also it has already been being used in modelling the thermal error of machine tools by other researcher previously [7][8][9].Although this method can provide reasonable results for a given machine test regime, the thermal displacement usually changes with variation in the machining process and the environment, which introduces an error into the model [10].The linear regression model is also time-consuming and labour intensive to design.
Recently, there has been growing interest in applying artificial intelligence algorithms that favour the inductive strategy of deriving models from measured data in thermal error modelling of CNC machine tools.This method will be referred to as ‗‗data-driven models'' or alternately ‗‗empirical-based models''.In this context, the data driven models are behavioural models that are based on historical data to predict the thermal error of machine tool.Contrary to the numerical models, they are not based on explicit physical equation definitions but on experimental database which is capable of reflecting the relationship between inputs and outputs.Data driven techniques for thermal error modelling can be divided into two categories: statistical techniques such as regression methods, linear polynomial models, etc., and Artificial Intelligence (AI) techniques such as artificial neural networks (ANNs), fuzzy systems, etc. Guo et al. [11] presented a thermal error model based on temperature sensors using artificial fish swarm and ant colony algorithm-based back propagation neural network (AFSACA-BPN).Artificial fish swarm was used to generate initial pheromone value of ant colony algorithm, which could improve the computational efficiency of the ANN and prediction accuracy of their proposed Chen et al. [12] used an auto-regression model to predict thermal growth of a motorized high speed spindle.Several models were built for the spindle thermal growth; temperature-based model, temperature/speed-based model displacement/speed-based, and hybrid-variables model, respectively.The later model combines the temperature measurements, spindle speed and displacement sensor embedded into the spindle housing as input variables.According to their results, it was found that the displacement-based thermal error models have much better accuracy and robustness than the temperature-based model.
Mayr et al. [13] used a Grey-box model based on one input variable to predict thermal errors of a five-axis machine tool.Three different input values were investigated: the axis power consumption, the axis speed, and the cooling power of the cooling circuit.According to their investigation, the best compensation results were obtained using only the axis cooling power as input parameter (up to 90 % improvement).In another study by Gebhardt et al. [14] no direct temperature measurement is taken and only the power consumption of the axis drive was used as input variable to the same Grey-box model.
Brecher et al. [15] used a transfer function approach (a combination of first and second order time delay system) to describes the displacement behaviour of a machine tool.They also claim that it was possible to calculate the machine structure displacement by using only control internal data (e.g., spindle speeds, axis feed) as input variables.Results show that with this approach a reduction of the thermal displacements of more than 80 % of the initial value is possible.
Creighton et al. [16] used the FEM model to study the temperature distribution characteristics of a spindle, motor and its housing.The results from the characterisation tests were used to develop a simple exponential model of the axial thermal error related to the spindle speed and running time.It was reported that the model was successful in reducing spindle growth by up to 80 % under random spindle speed.
However, the thermal error of a machine tool is a mutual coupling of many complex factors that are affected by many variables; therefore, their model cannot compensate the cyclic variation due to the ambient temperature changes.

Journal of Alasmarya University: Basic and Applied Sciences
It is extremely difficult to predict the thermal error from a simple exponential equation.Moreover, their proposed model is a function of time, and not of temperature variables.There will be a difficulty of precisely calculating the time, especially when short-term stops and restarts happen.So, it may lack robustness and accuracy.
Thermal error modelling is still an innovative and developing area of CNC machine tool accuracy.There are still uncertainties and room for improvement.In summary, from this undertaken literature review, it appears that, despite a large amount of previous research undertaken in the thermal error compensation area, there is a number of issues that still remain to be addressed.The main aim of this research work is to produce intelligent techniques for modelling machine tool errors caused by the thermal distortion of CNC machine tools.In the light of the intelligent fusion modelling, virtual sensor approaches will be used to reduce the complexity of wiring and interface effort.The goal of this investigation is to make the intelligent compensation system more robust and readily applicable to any common CNC machine with minimal effort.

MATERIALS AND METHODS
A ball screw system is widely used for feed drive systems because of its high efficiency, great stiffness and long life.Generally, the table is connected to the nut, and the nut houses a ball screw.The screw is connected to the drive motor either directly or via a gear system depending on the feed speed, inertia, and torque reduction requirements (see Figure 1) As is well known heat sources being the root of temperature change and thermal expansion of the ball screw system, which consequently leads to positioning error of the feed drive system.Because of the difficulty of measuring the temperature of screw shaft while the machining is in progress, numerical predicting of the ball screw temperature field is a promising alternative way for this study.During the heating up stage, the temperature of the ball screw is affected by the fraction heat from the moving nut Q nut , friction heat from the front bearing and the motor Q 1 , and friction heat from rear bearing Q 2 .Meanwhile, a part of the generated heat is dissipating to the ambient air via forced convection.A typical sketch of the heat sources of a ball screw system is shown in Figure 1.The governing equation of the ball screw during the heating up phase can be expressed as follows: Where indicates the forced convection heat transfer coefficient; and indicate the ball screw and the ambient temperatures, respectively; is the material density; is the specific heat; and is the volume of the screw shaft.

The friction heat (
) is found to be related to the feeding rate of a linear correlation [17].Then, an exponential growth model is obtained to describe the temperature change of the screw shaft during the warming phase by solving the friction differential equation.
During the cooling down stage, there is no frictional heat generated, and only the heat of the screw shaft dissipates into the ambient air.The transient state thermal characteristic of the screw shaft during the free cooling phase can be expressed as follows: Where indicates the forced convection heat transfer coefficient during the cooling down stage.
Similarly, an exponential decay model is obtained to describe the temperature change during the cooling down stage by solving the differential equation: The exponential model that describes the thermal characteristic of the ball screw during the hating up and cooling down phases [16,20,21]:

THEORY AND CALCULATION
Usually for investigation of thermal error, discrete temperature sensors, such as thermocouples or resistance thermometers (Pt100, Pt1000) are attached on the machine surface to measure the temperature [18].Some of these sensors are so small that they can be installed in the machine structure very close to the heat source.However, temperature measurement using surface attached sensors typically face the presence of noise and time delay in the measured data.Noise can be caused by several reasons, typically resulting from failures in acquiring data, due to hardware faults or software error.There is another problem arises when the rate of temperature change is low as compared with the speed of response of thermal displacement and also where surface-mounted sensors do not reflect the slower-changing internal temperature.So, numerical predicting of the machine temperature field is a promising alternative way for this study.
Virtual sensor approaches can reduce the complexity of wiring and interface effort.They use a mathematical model of the system to estimate a projected sensor value from other measurements, or convert a control value (e.g.feed rate or spindle speed) into another value (e.g.temperature data).The objective of using virtual sensing approach is to estimate the targeted monitoring value (e.g.ball screw temperature) which cannot be measured on-line or only measureable with delays.
Exponential laws are common to a wide variety of problems in the physical, biological, and social sciences.Many physical phenomena are described by firstorder differential equations whose solution is an exponential growth or decay [19].
When the axis feed rate of the machine reciprocates at a feed rate of 21 m/min, it can be seen that the thermal displacement of the ball screw is naturally exponential (see Figure 2).It can be seen from Figure 2 that the ball screw thermal displacement shows a stable exponential growth during the warm-up phase.It increases sharply in the initial warm-up phase and gradually slows down until a steady state.The exponential growth is due to the fact that the heat convection rate is related to the temperature difference between the ball screw and the ambient air.The larger the temperature difference is, the higher the heat convection rate becomes.Therefore, as the ball screw temperature rises constantly with warm-up time, the heat convection rate would accelerate progressively while the friction heat generation rate remains constant, so the ball screw temperature variation rate is lowered gradually to a steady state.The exponential growth and decay model of ball screw can be described by following equations [16,20,21]: Where, : is the ball screw growth over time , : is the ball screw displacement at time 0, : is the steady state ball screw displacement for a particular feed rate, and is the time constant for the ball screw growth (which is different from the the ball screw is contracting during its cooling down).
There are two unknown parameters when building the model: first, the correct time constant has to be determined and second, the right relationship between and the feed rate should be determined.
In order to compensate the thermal error of ball screws, an accurate measurement of the temperature of the ball screw is required.Assuming an equal temperature distribution, the thermal expansion of the ball screw at measured position can be calculated as: (7) where is the thermal expansion coefficient; is the length of the screw shaft; and, is the temperature change of the ball screw.Consequently, the ball screw temperature during the warm-up and cool-down stage can be calculated.After translating the physical phenomena into mathematical terms, some essential parameters must be determined.The steady state and time constant values were found from the conducted experimental tests on the machine.The next step was to evaluate the steady-state ball screw displacements at different feed rates and different ambient conditions.Fuzzy modelling approach has been inspired on complex multi-physical systems.In addition, it has inherent abilities to deal with imprecise or uncertain data.Thus, it can be considered as knowledge based able to give certain output value as a response of specific input values combination.In this work, fuzzy modelling approach will be used to obtain the optimal estimates, for more information the reader can see [22]. Figure 3 illustrates the whole proposed system.

RESULTS AND DISCUSSION
The temperature sensor cannot be attached to the screw shaft while the machining is in progress.Alternatively, the temperature of the nut surface can be measured.However, using nut surface temperature to describe the thermal characteristics of the ball screw is not feasible, due to irregular movement of the nut during the machining process.To measure the temperature of ball screw system, a portable temperature sensor with magnetic base can be used.It could be attached to the ball screw/nut surface in a short time, and then quickly removed after measuring the required data [17].However, instead of installing a portable temperature sensor after each machining process, the ball screw temperature can be estimated from available controller values by creating a virtual sensor model using knowledge about the machining process.
To identify the ball screw temperature, the measured thermal displacement of Figure 2 is fitted using the proposed exponential growth/decay model as defined in Equation, and the result is shown as follows: During machining, a screw shaft will expand due to an increase in the internal temperature caused by heat sources.Assuming an equal temperature distribution, the thermal expansion of the ball screw at measured position can be calculated as: (9) Were is the thermal expansion coefficient; is the length of the screw shaft; and, is the temperature change of the ball screw.Since the ball screw, which has a length of 800 mm, is made out of steel (thermal expansion coefficient of steel -ball screw‖: typically about ⁄ ⁄ ).Consequently, the ball screw temperature during the warm-up and cool-down stage can be calculated as follows: Figure 4 illustrates the virtual ball screw temperature during the warm-up and cool-down stage.specific heat of the ball screw.This is true since it takes longer to heat-up or cool-down a large mass of ball screw, especially when it has a large specific heat value.
It can be noticed that the advantages of using the exponential growth and decay variable as input to the thermal error model are:  The variable is robust against observation noises, because no feedback of the noises exists. The previous state of the machine has been considered. Valuable information about the machining process such as spindle speed, feed rate can be considered. Reduction of the sensors placement effort, because spindle speed and feed rate are directly derived from the machine controller.

CONCLUSIONS
It is well known that if a measurement of the ball screw temperature field can somehow be obtained, the corresponding thermal deformation can be calculated.However, it is difficult to measure the ball screw temperature directly owing to the circulating nut and rotating of screw shaft.So, numerical predicting of the ball screw temperature field is a promising alternative way for this study.Virtual sensor approaches can reduce the complexity of wiring and interface effort.
They use a mathematical model of the system to estimate a projected sensor value from other measurements, or convert a control value into another value (e.g.temperature data).Virtual sensors could be used when the targeted monitoring or control value is not directly or only expensively measureable (e.g.ball screw temperature), or only measureable with delays.

Volume ( 6 )
Issue 5 (December 2021) model.Experimental results indicated that the diameter error of the workpiece could be reduced from 23 to 10 µm after compensation.

Figure 1 :
Figure 1: Schematic of heat sources of a ball screw system.

Figure 2 :
Figure 2: Thermal displacement of the ball screw system.

Figure 3 :
Figure 3: The whole proposed system.

Figure 4 :Volume ( 6 )
Figure 4: The ball screw temperature during the warm-up and cool-down stage.