Abstract

This paper proposes a new method for predicting spindle deformation based on temperature data. The method introduces the adaptive neurofuzzy inference system (ANFIS), which is a neurofuzzy modeling approach that integrates the kernel and geometrical transformations. By utilizing data transformation, the number of ANFIS rules can be effectively reduced and the predictive model structure can be simplified. To build the predictive model, we first map the original temperature data to a feature space with Gaussian kernels. We then process the mapped data with the geometrical transformation and make the data gather in the square region. Finally, the transformed data are used as input to train the ANFIS. A verification experiment is conducted to evaluate the performance of the proposed method. Six Pt100 thermal resistances are used to monitor the spindle temperature, and a laser displacement sensor is used to detect the spindle deformation. Experimental results show that the proposed method can precisely predict the spindle deformation and greatly improve the thermal performance of the spindle. Compared with back propagation (BP) networks, the proposed method is more suitable for complex working conditions in practical applications.

1. Introduction

Manufacturers should promote the performance of the components of machine tools to improve the quality and accuracy of their workpieces. Among all of the components of machine tools, the spindle plays the most crucial role in machining operations because it provides the cutting speed of the tool and is a part of the force chain between the machine tool structure and the tool or the workpiece [1]. The spindle and its bearings greatly affect the total heat generation and the resulting deformations [2]. However, heat causes thermoelastic deformations to the spindle, which ultimately lead to geometric inaccuracies of the workpieces.

Thermal deformations are the main sources of errors in machine tools and of geometrical errors of machined workpieces [3]. Thermal deformations are responsible for more than 50% of the overall error [2]. The error induced by heat is a nonlinear and time-varying procedure caused by the nonuniform temperature variation in machine structures. A complex thermal behavior is produced by the interaction among heat sources, the thermal expansion of components, and the heat conduction between components. In establishing accurate thermal error compensation models, key temperature points that directly influence the model are difficult to identify. Therefore, many modeling approaches have been proposed to overcome the difficulty.

Weck et al. [2] have published a keynote paper on the error reduction and compensation of machine tools. For the deformation induced by heat, error compensation techniques are categorized into direct and indirect compensations [2]. Direct compensation approaches periodically measure the thermal displacements of the tool relative to the workpiece. However, such measurements are often difficult because measuring the deflections is not always possible during machining. Sensors can be exposed to hot chips and the lubricant. Therefore, indirect compensation is more convenient and easier than direct compensation. Indirect compensation procedures based on auxiliary values such as temperature measurements build physical or mathematical models that reveal the relationship between temperature variables and thermal deformation. Various methods, such as finite element analysis [4, 5], regression analysis [6, 7], neural networks [8, 9], and grey system theory [10, 11], or the combination of two or three of these methods [12, 13], have been applied to build error compensation models. Thermal deformations are calculated using representative temperature measurement points in the machine structure. The calculated deformations are compensated by the CNC control system [14]. Our team has conducted substantial research on this field. For example, Junyong and Xuexiang have investigated the thermal dynamics characteristics of the feed system [1517], and Jin has explored the heat generation modeling of bearings [1820].

The majority of existing studies have focused on using artificial neural networks (ANNs) to build thermal error compensation models based on discrete temperature data. Unlike other mathematics models, ANNs have the advantages of information distribution saving, parallel processing, and self-learning ability. In recent years, different kinds of ANNs have been developed for thermal error compensation models, including back propagation (BP) [21], radial basis function (RBF) [8, 22], Elman [23], grey neural [12], cerebellar model articulation controller (CMAC) neural [24], and integrated recurrent neural networks [25]. However, these neural-modeling approaches have a high probability of being affected by external noise and poor generalization capability. In addition, the learning process may be trapped in the local minima for random initialized weights, and some neurons may be pushed into saturation [26]. Thus, traditional ANNs are not suitable for modeling the nonlinear and time-varying procedure of thermal error.

In this paper, we propose a new thermal error predictive model for spindle deformation. The model integrates the kernel and geometrical transformation and the adaptive neurofuzzy inference system (ANFIS). The kernel and geometrical transformation is used for transforming temperature variables into the input space of ANFIS. The ANFIS model is trained by using two transformed temperature variables as input and the spindle deformation as output. After the training, the output of the model is used for predicting spindle deformation. A thermal error experiment for the spindle is implemented to evaluate the performance of the model. The results show that the model has high prediction accuracy and robustness, and it has a better machining performance than BP networks in practical applications.

ANFIS combines neural network adaptive capabilities and fuzzy logic qualitative characteristics. Therefore, it is more flexible in terms of network structure and it can approximate a highly nonlinear surface more effectively than traditional ANNs. As a neurofuzzy modeling approach, it has been widely applied for different purposes, including prediction [27, 28], pattern recognition [29], control system [30, 31], and knowledge discovery [32].

The remaining of this paper is organized as follows. Section 2 briefly provides the ANFIS description. Section 3 describes the experimental setup and measurement results. Section 4 presents the new thermal error predictive model that combines the kernel and geometrical transformation with ANFIS. Section 5 describes the training and validation results of the proposed model and compares the model and the BP network. Finally, Section 6 presents our conclusions.

2. Adaptive Neurofuzzy Inference System (ANFIS)

ANFIS [33], which uses fuzzy reasoning and neural network learning algorithms to map inputs into an output, is a multilayer feed-forward network. It is a fuzzy inference system (FIS) implemented in the framework of adaptive neural networks. Figure 1 illustrates that the ANFIS architecture used in this paper employs the first-order Sugeno fuzzy model. It contains two inputs associated with two membership functions, four rules, and one output, and the nodes of the same layer have similar functions.

Using the first-order Sugeno fuzzy model for the output of each rule, the rule set with four fuzzy if-then rules is as follows:Rule 1: if is , is , then ;Rule 2: if is , is , then ;Rule 3: if is , is , then ;Rule 4: if is , is , then ;where (or ) and (or ) are the linguistic labels for the input variables and in the antecedent, respectively. () are crisp functions in the consequent, and , , and are the consequent parameters.

ANFIS consists of five layers that perform different actions. We define the output of the layer node as , where () denotes the node position along the downward vertical direction. ANFIS is detailed below.

Layer 1. This layer is the input layer, which uses square nodes to represent adaptive nodes. The outputs of this layer are the membership grades of the input variable (or ) that can be expressed as where (or ) is the crisp input to the nodes and (or ) are the linguistic labels (such as small and large) represented by appropriate member functions (MFs), which can be triangular MFs, trapezoidal MFs, Gaussian MFs, generalized bell MFs, and so on. In this paper, we employ generalized bell MFs defined by where () and () are the membership functions’ parameter sets, which are referred to as premise parameters.

Layer 2. This layer is the rule layer, which uses circle nodes to represent fixed nodes. Each node in this layer is labeled as , whose output is the product of the incoming signals: The output of each node represents the firing strength of a rule, which is the weight degree of the if-then rules in the antecedent.

Layer 3. This layer is the normalized layer, which uses fixed circle nodes labelled . Each node normalizes the firing strengths by calculating the ratio of the rule’s firing strength to the sum of all rules’ firing strengths. Therefore, the outputs of this layer are represented as which are called normalized firing strengths.

Layer 4. This layer is the consequent layer, which uses square adaptive nodes with a node function. The output of each node is the product of the normalized firing strength and a first-order polynomial based on the first-order Sugeno model. Thus, the outputs of this layer are obtained by The parameters in this layer are referred to as consequent parameters.

Layer 5. This layer is the output layer, which uses circle fixed nodes labelled and computes the summation of all incoming signals as the overall ANFIS output. It can be given by

Figure 1 shows that the ANFIS has two adaptive layers with square nodes, namely, Layers 1 and 4, which have fitting parameters , , and , respectively. The number of fitting parameters is 24, including 12 premise parameters , and 12 consequent parameters . The task of the learning algorithm for the ANFIS is to tune the membership function shape and the first-order polynomials of the first-order Sugeno model to achieve the desired input-output mapping.

ANFIS training employs the hybrid learning algorithm combining the least-square and gradient descent methods, which consist of the forward and backward passes. In the forward pass, the least-squares method is used to optimize consequent parameters with premise parameters fixed. When the optimal consequent parameters are obtained, the backward pass begins immediately. In the backward pass, the gradient descent method is employed to optimize premise parameters with consequent parameters fixed. When the output error is less than a specified value or the maximum number of iterations is reached, the iteration stops.

3. Experimental Setup and Measurement Results

3.1. Experiment Setup

As illustrated in Figure 2, the experiment equipment consists of the spindle system, sensing units, and data process system. In the spindle system, the spindle is driven by a servomotor and uses a V-type belt to transmit power, and the maximum spindle speed is 8000 rpm. The sensing units include six Pt100 thermal resistances and a laser displacement sensor. Pt100 thermal resistances, with the advantages of high accuracy and fine calibration, were used as thermal sensors to monitor the temperature variations of the spindle. The laser displacement sensor was used for detecting the spindle deformation along the -axis.

In the spindle, because of the friction between the rolling elements and the inner and outer raceways, the bearings generate a large amount of heat and it is the main thermal error source of the spindle. The heat is dependent on the speed, preload, and lubrication. Faster speeds lead to higher contact forces, hence, higher friction and more heat.

A spindle has two groups of bearings to support the mandrel. They are arranged as follows: face-to-face angular contact bearing at the spindle nose and double row roller bearing at the rear of the spindle. As shown in Figure 2, six Pt100 thermal resistances were embedded in the holes near the two groups of bearings in the spindle housing. Each group has three Pt100 thermal resistances uniformly arranged along the circumference. They are separated by 120 degrees in the circumferential directions, and the sensors between the groups are aligned. The laser displacement sensor is mounted on the work table.

3.2. Data Process System

As illustrated in Figure 3, the data process system consists of a high-precision data acquisition card PXI-4351, a data acquisition system PXI-1024, and a personal computer (PC). The data from the sensing units are acquired using the PXI-4351. Using the commercial software Labview, we wrote the data process program that runs on a PXI-1024. The data are analyzed by the data process program and PXI-1024 outputs the results to the PC monitor. The entire process is controlled by the PC.

3.3. Experiment Conditions

To investigate the spindle’s thermal behavior, the experiment was performed throughout the entire machining process. The spindle speed used for training the proposed ANFIS model is shown in Figure 6(a). The spindle speed has an important influence on heat generation.

According to the installed position of the Pt100 thermal resistances, the six measurement points were divided into two groups: the front and the rear. The temperatures for each group are illustrated in Figure 6(b). As shown in Figure 6(c), the blue curve is the actual deformation of the spindle and the pink curve is the predictive deformation of the spindle.

4. Building the Thermal Error Predictive Model

4.1. Data Description

In this paper, 4500 training data pairs used in the proposed model contain the input vector and the output data , where , .

We calculate the average curve of the temperatures in Figure 6(b) as the input vectors , and they are obtained by sampling the average temperature curves every second. The outputs are acquired by sampling the spindle deformation in Figure 6(c) every second.

4.2. Building the ANFIS Model

As can be seen from Figure 4, the input vectors are mapped into a feature space with Gaussian kernels, and a learning algorithm is designed to discover the linear relations in the feature space. Then, the mapped vectors are processed by the geometrical transformation and gathered in the square region . The transformed vectors are used as the inputs to the ANFIS and the square region is used as the rule input space partition of ANFIS. The ANFIS model is described in detail as follows.

Step 1. Using the Gaussian kernels below, it maps the input vector to the feature space. According to the kernel definition, it haswhere is a mapping from the input data to the feature space and and denote the images of and , respectively. Equation (7) can directly compute the inner product based on , in the feature space.

Step 2. Discovering linear relations among the images in the feature space, it can use the ridge regression method to solve the optimization for the loss function :where , which defines the relative trade-off between loss and norm, controls the degree of regularization and is the coefficient of the linear equation in the feature space. We can determine the optimal value of by taking the derivatives of the loss function in terms of and setting them to the zero vector. It is obtained as follows:where denotes the matrix whose rows are the vectors and denotes the vector . Equation (9) can be written in terms of to obtainwhere . Hence,where or . Combining (12) with (7), can be obtained and can be calculated by (10).

Step 3. Transforming the original data to the input space of the ANFIS model performs the geometrical transformation and interval normalization for the dataset in Cartesian coordinates , where . By rotating around the -axis and around the -axis, the geometrical transformation is implemented. Finally, the plane , which denotes the relations of the dataset , coincides with plane . equals the supplementary angle between plane and the plane defined by the normal vector of the plane and the axial vector . It can be written aswhere is the normal vector of plane . equals the angle between plane and the plane obtained by transforming . It can be expressed aswhere is the normal vector of plane . Therefore, the transformed dataset . It can be given bywhere is a geometrical transformation matrix from the original data space into the input space of the ANFIS model.
Interval normalization includes the translation and scaling operations for dataset . First, it evaluates the minimum (or ) and the range (or ) of the vector (or ) components. Then, vector (or ) subtracts the minimum (or ) and is divided by the range (or ). Finally, we obtain the new dataset .

Step 4. We train the ANFIS with two inputs, four rules, and one output. The inputs and output are obtained from dataset . The input space is partitioned into grids, and each fuzzy region corresponds to a rule. After the training process, we can use the model to predict the spindle deformation along the -axis.

5. Results and Discussion

5.1. Training and Validating the ANFIS Model

Data transformation maps the training data pair to the square region where the dataset is gathered. Then, the transformed dataset is used as the training dataset of ANFIS with two inputs, four rules, and one output. Using the learning algorithm, we can obtain the optimal parameters for the transformation of the training dataset. For the training process of the ANFIS model, we set the initial step size as and the error of the convergent criterion as 0.02 μm.

Figure 5 illustrates the initial and final MFs before and after training. The obvious changes are encountered in the initial MFs after 300 steps. The comparison of the spindle deformation along the -axis between the ANFIS output and the measured data is shown in Figure 6(c).

We obtain the testing dataset from a new cutting condition used for validating the ANFIS model, and the cutting condition is shown in Figure 8(a). The comparison between the ANFIS output and the measured data is shown in Figure 8(c). The prediction error of the spindle deformation along the -axis can be up to less than 6 μm. It shows that the ANFIS model can predict the spindle deformation along the -axis well, even under new conditions.

5.2. Comparisons with BP Network

For the comparison between different models, we construct the BP network with the 2-5-1 topology structure. As shown in Figure 7, it consists of the input, hidden, and output layers, where two input neurons receive the average of the two groups of temperature variations from the Pt100 thermal resistances, five hidden neurons process the data with Sigmoid functions, and one output neuron predicts the spindle deformation along the -axis. We set the learning rate to and the mean square error as 0.01.

To compare the performances of the ANFIS model and BP network, we employ the following evaluation criteria.

Root mean squared error (RMSE): where and denote the actual and predicted deformations, respectively, and denotes the number of datasets.

Mean absolute percentage error (MAPE):

Correlation coefficient (): where and . From these evaluation criteria, we know that the smaller the RMSE and the MAPE and the larger , the better the predicted performance. Table 1 presents the performances of the ANFIS model and BP network. We can see from Table 1 that the ANFIS model has a smaller RMSE and MAPE and a bigger than the BP network.

Using the BP network based on the training and testing datasets, we predict the spindle deformation along the -axis, and the results are illustrated in Figures 6(d) and 8(d), respectively. We can see from Figures 6(d) and 8(d) that the output of the BP network tends to have a larger deviation from the actual spindle deformation during the warming-up stage. Only when the temperature increases smoothly, and the heat equilibrium of the spindle reaches a stable state, does the prediction accuracy of the BP network improve.

Because of the change in working conditions, the measured values of the spindle deformation in intervals , , , and are much bigger, and the curves in these intervals are more steep in comparison with the other sampling points, as shown in Figure 8(c). In the intervals above, we can deduce from Figures 8(c) and 8(d) that the ANFIS model can respond more quickly than the BP network; thus it can produce smaller prediction error.

6. Conclusions

This paper proposes a new method for establishing the relationship between temperature data and spindle deformation along the -axis. In the proposed method, the original temperature data is first preprocessed using data transformation. Then the ANFIS model is trained with the transformed data, and then the trained ANFIS model outputs the prediction results. The following conclusions are obtained:(1)With the use of data transformation, the temperature data is gathered in the square region. The ANFIS model can conveniently partition the input space and effectively reduce the number of rules. In addition, the transformation procedure can reduce the randomness of the temperature data and the influence of unpredictable noises.(2)Experimental validation was implemented. The experimental results indicate that the proposed method could precisely predict the spindle deformation and greatly improve the thermal performance of the spindle. Under the new condition, the prediction error of the spindle deformation along the -axis can be up to less than 6 μm.(3)According to the evaluation criteria, the ANFIS model outperforms the BP network. Under the new cutting condition, the MAPE of the ANFIS model is less than 0.7%, whereas the MAPE of the BP network is greater than 3.5%. The ANFIS model can respond more quickly than the BP network, and it can produce smaller prediction error. Unlike the BP network, ANFIS is transparent rather than a black box. Its if-then rules are easy to understand and interpret.(4)By nature, BP network is a black box, and the relationships between its inputs and outputs are difficult to interpret. By contrast, ANFIS is transparent, and its if-then rules are very easy to understand and interpret. However, the ANFIS model has the imperfection of only modelling a single output, whereas the BP network can have several outputs. Overall, the ANFIS model has better performances than the BP network, and it is more suitable for modelling the spindle deformation caused by heat.

Conflict of Interests

The authors declare that there is no conflict of interests regarding the publication of this paper.

Acknowledgment

The work here is supported by Collaborative Innovation Center of High-End Manufacturing Equipment, the State Key Basic Research Program of China (no. 2011CB706803).