Keywords

1 Introduction

There is an ongoing trend in the machine tool industry for more productive machine tools and higher workpiece quality, while reducing the environmental machine footprint. This trend is initiated by industry branches like the aerospace industry or the automotive industry which need to cut costs to be competitive, but also need to meet requirements for energy efficiency and reliability.

To keep up with the demand for more accurate machine tools, manufacturers need to reduce error influences impacting the machining quality. One of the most dominant errors when machining is the thermo-elastic error. During operation, external and internal heat sources warm up the machine structure, which leads to a deformation of the structure resulting in a displacement of the TCP. This effect is even more dominant when the machine tool operates with higher productivity, since this implies higher axis speeds, which result in an increased heat generation causing a higher TCP displacement.

Current research approaches are seeking to reduce the resulting thermo-elastic TCP displacement. The approaches can be clustered into error compensation methods, which focus on reducing heat introduced into the machine structure and error correction approaches, which focus on modeling the TCP displacement to correct it using the machine tool control. The error compensation methods center around the machine coolant system. Donmez et al. were able to reduce the spindle axial spindle drift by up to 36% using a novel approach to control the machine structure temperature using compressed air and silicon tubing [1]. The error compensation approaches show a reliable performance in machine tools. However, cooling the structure components leads to an additional energy usage [2]. This is not compatible with the effort to reduce machine energy consumption to lower the CO2 footprint of the industrial sector triggered by economic, social and governance stakeholders.

A less energy-consuming way to reduce the thermo-elastic TCP error is the error correction using the machine control. Hence, the majority of ongoing research focusses on modeling the thermo-elastic error. Wennemer models the thermo-elastic error using low-order delay elements [3]. To parametrize the elements, four laserTRACERs are installed in a machine tool. Correcting the TCP position using this method delivers good results. However, the parametrization is time-consuming and the measurement equipment is expensive.

Another commonly used method to model the thermo-elastic TCP error focuses on finite element (FE) methods. Galant et al. use an FE model in combination with model order reduction (MOR) techniques to compute the thermo-elastic deformation of a machine structure component with high accuracy and a low computation time [4]. The same technique is used by Brecher et al. when simulating the machine spindle [5], reaching similar results.

While the computation of thermo-elastic displacement of machine components is already well progressed, the computation of the whole machine structure still shows drawbacks. Here, either the computation time is high or the accuracy is low [6, 7]. The low computation accuracy of FEM models arises from the complexity of the calculation and the large number of unknown boundary conditions. Heat convection parameters can vary notably depending on the surface conditions. To address these issues, new approaches focus on modeling the thermo-elastic TCP error using machine learning techniques. An advantage of using machine learning is the lack of the need for a profound knowledge of the complex physical heat transfer and deformation processes. Most research done in this area relies on temperature as input data to the neural network [8,9,10,11,12]. The results achieved using this method are promising. The machine learning techniques determine the thermo-elastic TCP error accurately. Guo et al. were able to reduce the TCP error of an inclined bed turning machine from 33 µm to 8 µm using an ant colony algorithm-based back propagation neural network [8]. The downside of the neural networks in the literature is their dependence on error-prone temperature sensors. The sensors need to be installed, maintained and in case of failure, they can influence the TCP correction resulting in machining errors on the workpiece. To address this issue, a model is presented in this paper, that only relies on machine internal data as input by using interaction of the encoder difference and the thermo-elastic machine error. This correlation is described in the following chapter.

2 Encoder Difference

Most linear machine tool axes are equipped with two position measurement systems. A standard setup of the measurement systems in a machine tool axis is shown in Fig. 1.

Fig. 1.
figure 1

Schematic view of a linear machine tool axis

Machine tools with rotary motors use a ball screw to drive the axis. The motor that turns the ball screw has a rotary encoder mounted onto the end, which measures the rotary position of the Motor and thus the ball screw. This measurement is used in the position control loop. By counting the rotations of the ball screw, the rotary encoder indirectly measures the axis position. To increase the positioning accuracy of the machine tool, most machine tools also have a linear encoder, which is mounted on the machine bed to measure the axis position directly.

Without error influences the position information of the two measurement systems is redundant. However, due to geometric errors of the ball screw, the measured position from the rotary encoder always deviates from the position measured using the linear encoder. Another influence leading to a deviation between the two position measurements is a thermal expansion of the components close to the axis. If any components marked in Fig. 1 (measurement distance) deform due to thermal influences, this affects the difference between the two encoder values. Thus, the encoder difference measures the thermo-elastic deformation close to the machine axis. Since the deformation directly influences the thermo-elastic TCP error, the encoder difference serves as a promising data point to model the thermo-elastic TCP error. However, no research has been conducted, which investigates the correlation between the encoder difference and the thermo-elastic TCP error. Therefore, in this paper, a model is created that computes the thermo-elastic TCP error based on the encoder difference. Since it is assumed that the relationship between the two values is complex and difficult to describe analytically, artificial neural networks will be used to model the TCP error.

3 Methods

This paper analyses a model of the thermo-elastic TCP error using the encoder difference as input data. The models are based on data gathered from a five axes double spindle machining center. The following chapter introduces the measurement setup and the load cases used to generate the data. It concludes by presenting the model architectures of the models presented, to model the thermo-elastic TCP error.

3.1 Measurement of Model Inputs and Model Outputs

The previous chapter has shown, that the encoder difference can be used to model the TCP error. However, apart from the encoder difference, there are also other machine internal data, that correlate with the thermo-elastic TCP error. Some of the main heat sources in a machine tool are the motors. The heat generated during operation flows into the machine tool structure. The amount of heat generated is dependent on the motor current. Therefore, there is a dependency between the motor current and the thermo-elastic TCP error. The motor current is available as a machine internal data point and will be used as model input.

The moving axis components are connected by guide rails. Heat is transferred through the guide rails into the adjacent machine components. The position of the TCP defines the position on the guide rail, where the heat flows. Therefore, the machine tool position will also be used as model input.

The environmental temperature also affects the thermo-elastic TCP error. To evaluate the model’s ability to compute the environmental influences on the TCP error only based on the encoder difference, two models will be created in this paper. The first network uses the environmental temperature as input data and the second only uses the encoder difference and other machine internal data. The environmental temperature is measured by a single thermal sensor.

A key question of the work is whether the encoder difference can model the TCP error, by giving an indication of the machine structure deformation close to the machine axis. To validate whether the model can compute the deformation of the machine structure, this deformation is measured using LVDT sensors and a rod made from Invar. Invar is a nickel-iron alloy with a low thermal expansion. The location of the measurement is marked as “LVDT” in Fig. 1. By fixing the rod on one end to the machine structure and measuring on the other end with the LVDT sensor, the thermal deformation underneath the rod is measured (compare Fig. 2) [13].

The right side of Fig. 2 shows an ETVE test following ISO 230-3 [14]. The ETVE test is used to measure the thermo-elastic TCP error in x, y, z, a and b direction which are the model outputs. The ETVE test is mounted in the left working area. The thermo-elastic TCP error is therefore measured in this central machine pose.

Fig. 2.
figure 2

Measurement setup the measurement of the structural deformation and the TCP error

3.2 Artificial Neural Networks

Since the relationship between the input data and the thermo-elastic TCP error is complex and hard to describe analytically, an artificial neural network is used. For modeling the TCP error, the time dimension is of great importance since a heat flow into the machine structure does not have an immediate effect on the TCP error. However, it influences the TCP error within the next couple of hours. To model this delay between the input and output variables, Hochreiter et al. present a long short-term memory (LSTM) network [15]. This type of network can “memorize” information over time, thus being able to model the aforementioned behavior. In the work of Liu et al., a LSTM network has shown good results in modeling the thermo-elastic TCP error [16]. A special form of LSTM networks are bidirectional LSTM networks (BiLSTM). Here, the input data is fed into the network forwards and backwards, which has shown to improve the accuracy of the network on big data sets [17] as well as the computation of the thermo-elastic TCP error [18]. The model architecture, as it is implemented for an LSTM and a BiLSTM network, is shown in Fig. 3.

Since the encoder difference has proven to be an indicator of the current thermo-elastic machine state, it may not be necessary to use the more computation-intense LSTM architecture. Therefore, a less computation intense backpropagation (BP) network is used as well. The architecture of the utilized BP network is shown in Fig. 4.

For all models the same input data set was used consisting of the encoder difference, the axis speed and axis position and the axis motor current of all three linear axe, resulting in twelve variables. The data is sampled in five minute intervals during the whole experiment resulting in 2,532 for the first and 3,936 data points for the second load case. The number of hidden neurons was optimized for each network using a bayesian optimizer with boundaries of 25 to 250 hidden neurons. The number of hidden neurons as optimized by the bayesian optimizer was typically between 100 and 140 hidden neurons.

Fig. 3.
figure 3

LSTM and BiLSTM architecture

Fig. 4.
figure 4

BP network architecture

3.3 Machine Loads

The models are tested for two different load cases. The first load case consists of straight axes movements. The machine moves on a linear path between two random positions in the working volume at a random speed for a random duration of up to 2 h. After approximately 6 h the machine stops for up to 5 h, thus simulating a cool-down phase due to workpiece setup or machine operator break times. During the whole test, the machine error is measured approximately every 5 min using the ETVE test. All translatory errors ΔX, ΔY and ΔZ as well as the derived rotary errors ΔA and ΔB were evaluated and used as output data for the networks. The test duration was 211 h, where the first 80% were used as training data and the last 20% at the end of each experiment as validation data.

The second load case is supposed to simulate a real production. For this load case, various geometry elements are implemented, representing real geometries that are often used when machining components, like pockets or holes. The timing for the measurement of the TCP error and the cool-down phases, as well as the ratio for training and validation data, are chosen equal to the ones of the first load case. The total test duration for the second load case was 328 h.

4 Results

In the following chapter, the results of the models are shown for the load cases listed in Sect. 3.3. First, the performance of the proposed neural networks in regards to computing the structural deformation close to the machine axes is evaluated. Then the models will be transferred to model the TCP error. Finally, the benefit of the environmental temperature as model input will be analyzed.

4.1 Structural Deformation Close to the Machine Axes

The basis of the proposed model is the dependency between the encoder difference and the structural deformation close to the machine axis. To validate this dependency, a LSTM, a BiLSTM and a BP network are used to compute the structural deformation based on the machine internal data. Figure 5 shows the result of the computation of the measured structural deformation ΔXS close to the x axis for the proposed models.

All three models can compute the measured structural deformation accurately. However, the BP network shows the largest deviation from the measurement. This is expected, since the BP network cannot memorize the historic data. The fact that the BP network can compute the deformation fairly accurately shows, that the encoder difference, which is the only input that indicates the current machine state, is a powerful value to compute the structural deformation. This can be derived from the results, since the other input data are not expected to be valuable in a BP network, which is not able to memorize information. Therefore, the results provide a proof of concept, that the encoder difference can be used as input data to derive the thermo-elastic structural deformation and thus the thermo-elastic machine error.

Fig. 5.
figure 5

Measured, modeled, and residual structural deformation close to the x axis for the validation data set

4.2 First Load Case

The correlation between the encoder difference and the TCP displacement in x direction is shown in Fig. 6. For a more comprehensive overview, Table 1 shows the correlation coefficient between the encoder differences of all axes and the TCP displacement and tilt errors. The correlation coefficients are calculated using Eq. 1.

$$\rho \left(A,B\right)=\frac{1}{N-1}\sum\nolimits_{i=1}^{N}\left(\frac{{A}_{i}- {\mu }_{A}}{{\sigma }_{A}}\right)\left(\frac{{B}_{i}-{\mu }_{B}}{{\sigma }_{B}}\right)$$
(1)

where μA and σAB and σB) are the mean and standard deviation of A (B).

Fig. 6.
figure 6

Correlation between the encoder difference and the TCP displacement in x direction for the first load case

Table 1. Absolute value of the correlation between the encoder difference and the TCP displacement

The correlation coefficients range from 0.23, indicating a bad correlation, to up to 0.76, indicating a good correlation. This shows, that there is a relationship between the values, that can be used, to compute the TCP error. However, it can not be modeled with a linear model. Therefore, it was assumed correctly, that a more complex model, such as an artificial neural network is required.

The three neural networks are used to compute the TCP error of the first load case. Figure 7 shows the result using the TCP error in y direction for the validation data.

Fig. 7.
figure 7

Measured, modeled and residual TCP error in y direction for the first load case

The figure shows, that all three models can reflect the measured TCP error. However, the BP neural network overshoots the measured displacement in many cases at the peaks. Furthermore, the BP neural network shows small erratic jumps at some positions. The LSTM and BiLSTM networks show a smooth course, following the TCP displacement. Table 2 summarizes the results by comparing the RMSE and the peak to valley (PV) error which is initially measured with the corresponding model error after correcting the TCP error mathematically, for the individual TCP errors. While an improvement of the RMSE shows that the correction generally improves the TCP error, an improvement in the PV error shows that the largest occurring errors are improved as well.

Table 2. RSME and peak to valley after correction with the corresponding model using only machine internal data input

The results show, that all models were able to improve the thermo-elastic TCP error. However, the LSTM network shows the best improvement in the average displacement and the error range. The BP network was able to improve the TCP error on average, however, the mentioned overshooting led to a minimal worsening of the TCP error in the z axis, thus making the model invaluable for practical use.

4.3 Second Load Case

The second load case represents a production scenario, as it would occur in standard industrial applications. Since ANN models are in general only valid for the type of load cases that it is trained with, a different correction ability is expected. The model results for the validation data set are shown in Fig. 8. The model was trained exclusively on the data set of the second load case.

Fig. 8.
figure 8

Measured, modeled and residual TCP error in Y direction for the second load case

The models show similar behavior for the second load case, as they do for the first load case. While the LSTM and BiLSTM networks compute the measured TCP error quite accurately, the BP network on the other hand shows erratic jumps and overshoots for the TCP error peaks. Table 3 summarizes the results by comparing the RMSE and the PV error, which is initially measured with the corresponding model error after correcting the TCP error mathematically.

Table 3. Residual error of the second load case after correction with the corresponding model using only machine internal data or adding the environmental temperature as an input

For the second load case, the networks were able to improve the RMSE of the thermo-elastic TCP error as well. An exception is the BiLSTM network for the TCP error in y direction. The reason for this may be the low initial RMSE. The observed RMSE is significantly lower for the models using the environmental temperature as an input parameter. The LSTM network, that does not use the environmental temperature reduces the RMSE on average by 79.8%. By adding the environmental temperature, this can be improved to 88.1%. This is an indication, that the encoder difference may not be sufficient as input data to model the environmental influence of the thermo-elastic TCP error completely. A solution for this problem may be the usage of the encoder difference at multiple machine poses. The encoder difference at different machine poses is mostly influenced by the thermal elongation of the ball screw. Since the ball screw has a large surface-to-volume ratio, its elongation is heavily influenced by environmental temperature. Therefore, this could improve the network performance regarding external thermal influences.

The second difference between the two load scenarios is the lower improvement of the peak to valley error. For all types of networks at least one error is higher than the initially measured error. The reason for this is the low initial peak to valley error in this load case. The peak to valley errors that are worse after correction only increase the corresponding error by a few micrometers.

5 Conclusion and Further Work

The work presented in the paper shows an approach of modeling the thermo-elastic TCP error using the encoder difference and artificial neural networks. Using two different load scenarios, it is shown, that the encoder difference can be used to model the thermo-elastic structural deformation close to the machine axes, as well as the thermo-elastic TCP error. While the used BP-ANN was able to show good results, the LSTM and BiLSTM networks can compute the TCP error more accurately. Using the LSTM network for the second load case, the RSME of the TCP error was reduced on average by 79.8%.

An even higher improvement of the thermo-elastic TCP error was achieved by adding the environmental temperature gathered by a single thermal sensor. Using this additional input data, the RSME was reduced on average by 88.1% using the LSTM network. This shows that the encoder difference is not able to fully compute the environmental influence on the thermo-elastic error accurately.

To improve the computation of the environmental influence on the machine tool, further work should focus on adding the encoder difference of different machine poses to the machine model. The ball screw is heavily influenced by the environmental temperature due to its large surface area and low volume. Adding the encoder difference at multiple positions along the ball screw could therefore improve the model accuracy under changing environmental conditions.

The presented model can compute the TCP error at a specific machine pose. In order to be more usable in industry applications, it is necessary to extend the model to be able to compute the volumetric machine error. To do this, the measurement system should be adapted to measure the volumetric error.