Virtual Sensor for Calibration of Thermal Models of Machine Tools

Machine tools are important parts of high-complex industrial manufacturing.Thus, the end product quality strictly depends on the accuracy of these machines, but they are prone to deformation caused by their own heat.The deformation needs to be compensated in order to assure accurate production. So an adequatemodel of the high-dimensional thermal deformation processmust be created and parameters of this model must be evaluated. Unfortunately, such parameters are often unknown and cannot be calculated a priori. Parameter identification during real experiments is not an option for these models because of its high engineering and machine time effort. The installation of additional sensors to measure these parameters directly is uneconomical. Instead, an effective calibration of thermal models can be reached by combining real and virtual measurements on a machine tool during its real operation, without additional sensors installation. In this paper, a new approach for thermal model calibration is presented. The expected results are very promising and can be recommended as an effective solution for this class of problems.


Introduction
In high-complex industrial manufacturing processes the endproduct quality depends strictly on the accuracy of relevant machine tools.
When a machine tool operates, heat is produced by motors, points of friction like gears and bearings, and so forth. The heat spreads through the other parts of the machine and leads (via thermal expansion) to deformation of the machine tool. This deformation is often a reason of insufficient quality of produced goods. In particular, the accuracy of the "tool center point" (TCP) estimation is important for exactness of production. Since it is often not possible or too expensive to avoid this deformation (by constructional solutions or by additional cooling), the alternative solution should be aware of the deformation and compensate it by adjusting the tool or work piece position. This adjustment can occur inside a suitable machine tool control system (e.g., "computer numerical control" (CNC)).
Unfortunately, the deformation value cannot usually be measured during production directly (i.e., online) because of economic and technical reasons. So an adequate model of thermal deformations in a machine tool can be used for the prediction of the TCP deviation. After the current TCP deviation is estimated, an appropriate adjustment will occur inside the CNC.
In [1] an extended state-of-the-art review of thermal deformation modeling for complex physical systems is described. In this review, two general approaches, namely, principle-based (or white-box) and empirical-based (or black-box), are considered. The advantages of principlebased models are their high precision in the estimation of thermal deformation. On the other hand, such models are very time consuming in the development. In case of significant changes of the environmental or tool properties, a new deformation model should be used or a self-adaption procedure should be implemented. Next, the already existing white-box deformation models (e.g., based on the "finite element method" (FEM), see also [2], or on the basis of analytical models, see also [3]) cannot be used online by a machine tool control system.  The most popular empirical models according to [1] are based on the multivariable regression analysis (MRA), adaptive neurofuzzy inference system (ANFIS), or artificial neural network (ANN). A comparative study of empirical-based models for thermal error compensation on CNC machine tools is given in [4]. In these articles, the different model structures were considered and very promising results are presented. Unfortunately, in the described solutions only temperatures as model inputs were considered, but it also could be very helpful to measure additional machine parameters like spindle speed or motor moments to improve the prediction accuracy, on the one hand, and, on the other hand, to improve the generalization ability of the model. Also the considered model structures were highly complex (e.g., a threelayer feed-forward neural network with 15 inputs and 15 hidden and 6 output neurons was used for predicting thermal errors caused only by the spindle and lead-screw).
In the collaborative research project "Transregio 96" (founded by the German Research Foundation DFG), the use of different simplified deformation models is investigated. Such models should be able to deal with real machine tool control systems also in online mode.
Unfortunately, some parameters of simplified FEM based models are unknown and cannot be calculated a priori, for example, if they depend on the installation (e.g., the preload force) and if they are distributed or time-variant. However, it is very important to know the values of all (significantly influencing) physically grounded model parameters, because tool center point compensation based on an inaccurate temperature model can make the quality of production even worse.
The goal can also be specified as a virtual calibration task for the thermal deformation model of a machine tool. In Figure 1, the idea of model calibration using VS is presented. The resulting solution should provide enough performance for being executed in real-time (i.e., online) and be at the same time enough precise. Hence, in our approach, we intend to combine the power of the principle-based models (e.g., on the basis of simplified FEM) with the calibration by data-driven virtual sensors. Our proposal is to use the simplest possible virtual sensors (VS) for the estimation of the unknown parameters for simplified FEM based models, as this allows both the most economic and practically realizable solutions.

Definition, Classification, and Design
Steps. A virtual sensor (VS) after Habtom is "a system which infers values of complex process variables by integrating information from easily made measurements" [5]. A similar definition is given by Fortuna: virtual sensors "focus on the process of estimation of any system variable or product quality by using mathematical models, substituting some physical sensors and using data acquired from some variables" [6]. There are also other denotations for the VS term, like "virtual metrology, " "soft sensors, " or "inferential measurements"; see, for example, [7][8][9]. The main idea of the virtual measurements is shown in Figure 2.
Classification of VS is usually done on basis of the the model building type (data-driven or first-principle VS models) and the implementation approach (hardware or software VS). The most cost-effective VS solutions are data-driven and are implemented as an application software [7].
Data-driven VS development consists of several main steps: (i) data collection and preprocessing (including experiment planning), (ii) choosing the relevant input variables, (iii) VS model building (choice of the most reliable model type and structure), (iv) identification of the VS model parameters, (v) checking the VS model quality (model validation).

Application
Fields. The use of VS is reasonable when one of the following conditions is fulfilled: (i) the process variable cannot be measured by a physical sensor (the sensor environment is too hostile); (ii) a physical sensor cannot be installed at the machine (the sensor installation is too expensive); (iii) a physical sensor is too slow or is too far downstream (dead-time problem).
The use of virtual sensors is already established in several application areas. The most popular areas for VS application  are automotive [10][11][12], biotechnology and chemical process engineering [8,13], and robotics [14], as well as building and room automation [15,16].
In the area of mechanical engineering, which also includes the machine tool development, the amount of VS solutions is significantly smaller. However, the most popular VS applications are vibration estimation and suppression [17,18] and prediction of the machine precision [19].

Objectives.
The main objective is to design a method for a cost-effective parameter calibration for high-complex deformation models of a machine tool. The main idea is based on the development of simple data-driven models for parameter calibration using already existing sensor measurements, collected during simple and short machine experiments before the production process starts.

Application Example for the First Prototype Solution.
Our first application example is the prediction of the internal bearing temperature bearing (nonmeasurable on direct way) in the spindle bearing inside the machine tool. The value of this temperature is an important state variable in a high-complex deformation model of the machine tool. The correct calibration of this variable can significantly increase the accuracy of the TCP deviation estimation.
As input values for the VS, only the easily measurable variables should be used (see Section 3.3.1). Figure 3 shows a part of the machine tool as an application example for the first calibration solution prototype.

VS Design.
The "standard" steps of the VS design have already been explained in [6,7,20]. Next, the main design decisions about this concrete application will be shortly described.

Data Collection and Preprocessing (Including Experiment
Planning). Experiments were prepared for the measurements collecting in different machine operation points (characterized by varied motor speed V ). The directly measurable variables (with sampling time = 5 s) are listed in Table 1.   These variables were measured on the machine using stationary sensors. So the temperature measurements were done by the built-in sensors on the basis of PT100 thermocouples with an absolute accuracy of 0.1 K. The motor speed was measured internally by the CNC with a relative accuracy of 2%. The motor moment was estimated on the basis of the 4 Advances in Artificial Neural Systems Inner bearing temperature (this parameter will be a VS output in our application example) 2 axis , ∘ C Spindle axis temperature motor current, measured by the CNC, and adjusted using specifications from the motor manufacturer. Furthermore, because of the expected low relative accuracy (less than 5%), the motor moment and the spindle beam in bending moment were not considered for being an input for the VS. Spindle preload force was measured using a special calibrated measuring tape with the absolute accuracy of 25 N. The measurements of the target variables (later: model outputs) are more complicated and were made using custombuilt portable temperature sensors (on the basis of the same PT100 thermocouples with an absolute accuracy of 0.1 K). Because of rotating parts of the machine, these measurements had to be done during short stops of the spindle motor. The inner bearing temperature bearing.i was measured on the bearing ring nearby the spindle axis and the outer bearing temperature bearing.o was measured on the bearing ring nearby the bearing chassis; see also Figure 3. After the measurement, the machine was started again for further working in the desired operation point.
Each measurement of chassis , bearing.o , and bearing.i (see sensor placements number 1 and number 2 in Figure 3) as well as flange and axis was made in two different geometrical points. Because of the high correlation of these measurements, we only consider the data from the first rolling bearing (i.e., the variables # 3, 5, 7, 10, and 12 are not considered).
The nondirectly measurable variables are listed in Table 2. The measurement sampling time of target parameters was much greater than (ca. 1.5 min). To make the data-driven model identification possible, we resampled the collected measurements for the unified sampling time unified = 5 s using interpolation. The used interpolation models are exponential (in time domain, see also (1)), which is equivalent to a first-order transfer function in frequency domain: In this equation, ( ) is the interpolated temperature, 0 is the temperature at the experiment start, is the time, is a gain factor, and 1 is an appropriate time constant. In Table 3, the parameters of the interpolation models are given. Figure 4 shows the application of this approach for 5 different experiment parts (i.e., machine working points). The data sets from different experiment parts are connected together. The present outliers were corrected.

Choice of the Relevant Input Variables. The correlation
analysis of the process variables shows that many of them are highly correlated (see Figure 5). From a big amount of possible VS inputs, we have chosen the temperature of the bearing chassis chassis (variable #6 in Figure 5) and the motor speed V (#18). The other variables are either highly correlated with these variables or not or lowly correlated with the desired VS output (inner bearing temperature bearing.i , #4). The easiness of the input variable measurement was an additional criterion for this selection.

VS Model Building and Parameter Identification.
In our approach, only simple model structures and identification procedures will be applied. So we consider two data-driven model building strategies: (i) linear regression models, identified by the method of least squares, (ii) static and dynamic artificial neural networks (ANN) with training using back propagation of errors.
The simulation environment was prepared using MATLAB. Additionally, the Neural Network Toolbox was used for ANN model training and test.

Model Validation.
Regarding model validation, the cross validation strategy was used. Therefore, the available data sets were divided in to 2 subsets.
(1) Training and Validation Data Set. This data set was used for the identification of model parameters for all model types (ca. 70% of total data volume).
(2) Test Data Set. This data set was not used for the identification task, that is, only for the simulation of the estimated models (ca. 30% of total data volume). The model quality was estimated quantitatively as a RMSE (root mean square error), 2 (coefficient of determination), and MAPD (mean absolute percentage deviation) values for both training and test data sets. Additionally, the model quality was checked using residual analysis (see an example in Figure 10).

Results and Discussion
At first, the parameters of a linear regression model were identified. Assumptions for the use of linear regression are (1) linearity of the relationship between dependent and independent variables; (2) independence of the prediction errors; and  241  361  484  599  719  834  949  1064  1185  1317  1432  1557  1684  1799  1914  2029  2162  2280  2400  2521  2636  2765  2880  2995  3110  3228  3353  3475  3597  3723  3838  3953  4068  4202  4326  4454  4586  4711  4834 4949 5064 Figure 4: Resampling of test measurements using exponential functions. The bias-free input variables * chassis and V * are calculated by subtracting a constant bias value (i.e., the minimum values in each measured time series) from the input data set: * The simulation results for the identified regression model are shown in Figure 6.
The quantitative values of the simulation are presented in the final comparison in Table 4. The simulation results (including residual analysis) showed that the model quality needs some improvement. The reaon is that the assumptions about the applicability of linear regression model were not met. The improvement of the model quality could be reached by use of nonlinear model structures.
Thus, a two-layer feed-forward static artificial neural network with back propagation was created and trained. Figure 7(a) shows the corresponding static ANN model structure. As the training function, the Levenberg-Marquardt algorithm was used (trainlm from MATLAB Neural Network Toolbox) and the was used as the training performance criterion. Use of a nonlinear activation function (tansig) also allows dealing with nonlinear relationships between dependent and independent variables.
The simulation results for the trained static ANN model are shown in Figure 8.
The quality characteristics for the estimated static ANN model on the basis of the residual analysis are shown in Figure 10(a). It is obvious that the residuals contain not only normally distributed random values. That means that the chosen static structure cannot interpret all important process relationships. So, to improve the VS model quality, also other model structures should be considered. The use of a dynamic ANN model can improve the VS ability of dealing with the changes between different working points and the prediction performance in general. Figure 10(b) shows the model quality improvement by use of a dynamic ANN. For that purpose, a two-layer feedforward input time-delay back propagation ANN was used, shown in Figure 7(b). The model structure corresponds with the structure from Figure 7 additional inputs (e.g., chassis ( ), chassis ( −1), and chassis ( − 2)). The simulation results for the trained dynamic ANN model are shown in Figure 9.
In Table 4, the comparison of the simulation results for the considered VS model types is resumed. One can see that the use of a dynamic ANN model provides better prediction accuracy than a regression model or a static ANN model. The fact that the accuracy values for the test data set are sometimes better than those for the training data set can be explained by the choice of the data set splitting, as there is no change between different working points in the test data set.

The Vision: An Automated VS Development Using Ontology Models
In the moment, the VS design is very time consuming and expensive, because most steps are done manually; specific expert knowledge is necessary; there are no systematic adjustment methodology, no supporting tools, and no automation of the parameter identification. So it would be advantageous to use tool support (an assistance system) for tasks which can be automated. Tool support is desired for planning and setting up the VS identification process itself, for evaluating measured data, and for computing the parameters. This would have three possible advantages: (i) time for experiments can be used more effectively (machine time is very expensive); (ii) time for experiments can be reduced; (iii) experiment planning and data evaluation time can be reduced.
Our vision is to automate the VS design process as far as possible. From a computer science point of view, two new VS design steps are necessary to achieve this overarching goal.
(i) Define an extensible ontology which allows describing all necessary steps for VS model identification and the possible solutions for each of these steps. (ii) Use an evolutionary design algorithm (automated design) to combine the appropriate steps for each given machine application to be modeled.
The goal is not to unify or restrict the popular models or methods and steps of VS design. Instead, it is to allow the integration of any models and methods by describing their interfaces and properties semantically and in a unified form. Ontologies are well suited to describe such complex dependencies. Furthermore, ontologies can be used by an assistance system using formal, automated queries. An evolutionary algorithm can then be used to optimize the identification procedure.
It is clear that this goal can never be fulfilled completely as continuously new or updated methods are developed which require new definition of properties and interfaces. Nevertheless, the authors expect that this approach leads to higher acceptance in practice than limiting the allowed tools in the step chain. Additionally, not all decisions can be automated and experience from building automation shows that it is usually better accepted to make suggestions to the user than to decide automatically [21][22][23].
Our intention is to simplify the VS design process as much as tasks can be automated. The two proposed methods (ontologies and automated design) are very versatile for reaching that goal, but a complete automation will probably never be possible as it needs too much development. For single VS designs, the ontology creation is not economic but with increasing information content of the ontologies the level of automatic design support can increase.

Conclusions
In this paper, a novel calibration approach for high-complex deformation models of a machine tool was described, using the output of a virtual sensor. For this purpose, a virtual sensor using different static model types was developed and tested. The simulation results showed that the VS on ANN basis can be used for calibration of deformation models with an accuracy of 1.0-2.3% (MAPD). The vision of the VS development optimization is an automated VS development using ontology models.