Abstract

This paper proposes a new combined model to predict the spindle deformation, which combines the grey models and the ANFIS (adaptive neurofuzzy inference system) model. The grey models are used to preprocess the original data, and the ANFIS model is used to adjust the combined model. The outputs of the grey models are used as the inputs of the ANFIS model to train the model. To evaluate the performance of the combined model, an experiment is implemented. Three Pt100 thermal resistances are used to monitor the spindle temperature and an inductive current sensor is used to obtain the spindle deformation. The experimental results display that the combined model can better predict the spindle deformation compared to BP network, and it can greatly improve the performance of the spindle.

1. Introduction

Accuracy of machined work pieces is one of the most critical considerations for any manufacturer. In all components of machine tools, the spindle is the most important component because it provides cutting power and is part of the force chain between the machine tool structure and the tool. It directly affects the accuracy of work pieces and is one of the main error sources in terms of its contribution to the total heat generation and the resulting deformations [1]. Hence, the performance of the spindles directly determines the machine tools entire performance [2].

The accuracy of machine tools depends on positioning errors. In the overall position errors, thermal errors caused by internal heat sources and environment are up to 70% [3]. Thermal error is a time-varying and nonlinear procedure induced by nonuniform temperature variation. The interactions between the thermal expansion of components, heat sources, and heat conduction produce complex thermal behavior. For machine tools, constructing a precise structure model is extremely difficult, very costly, and time-consuming, and much easier methods are to use error compensation [4]. With effective compensation, using medium precise machine tools can manufacture work pieces with higher accuracy [5]. Thermal error compensation has become a cost-effective method to improve accuracy of machine tools, especially with the increasing demand for machining accuracy in recent years.

Since the two keynote papers, the first about thermal effects from [6] and the second about error reduction and compensation of machine tools from [1], a lot of research in this area has been performed. For the error caused by the heat deformation, compensation methods are divided into direct and indirect compensation. Direct compensation directly measures the drift displacements between the tool and the work piece to compensate positioning errors. Indirect compensation uses mathematical or physical models to find the relationship between auxiliary values (such as temperature variables) and thermal deformation. The output of the models is used to compensate positioning errors. In many situations, direct compensation is often quite difficult because the measurement of the drift is not always possible during the machining process. Hence, indirect compensation is more convenient and easier. Researchers have developed many indirect compensation methods, such as finite element analysis [79], regression analysis [1012], fuzzy logic [13, 14], neural networks [1517], and the combination of two or three methods [1820].

Currently, most current research focuses on using ANNs (artificial neural networks) to build error compensation models based on temperature variables. Compared with other models, ANNs has the advantages of parallel processing, information distribution saving, and self-learning ability. In recent years, different types of ANNs have been developed, including radial basis function (RBF) network [15, 21], feed-forward neural networks [22], backpropagation (BP) network [23], grey neural network [19], Elman network [24], integrated recurrent neural network [25], and cerebellar model articulation controller (CMAC) neural network [26]. However, these neural-modelling methods have poor generalization capability and are sensitive for external noise. For the random initialized weights, the learning course may trap in local minima, and some neurons may give rise to saturation. So traditional ANNs is not fit for modelling the time-varying and nonlinear procedure of thermal error.

Adaptive neurofuzzy inference system (ANFIS) used in this paper is a neurofuzzy approach. It combines the fuzzy logic qualitative characteristics and neural network adaptive capabilities. Therefore, it is more flexible on structure, and it can more effectively approximate a highly nonlinear surface than traditional ANNs. As a neurofuzzy modelling method, it has been widely used in different fields, such as prediction [27, 28], knowledge discovery [29], control system [30, 31], and spattern recognition [32].

In this paper, we propose a new combined model to predict the spindle deformation, which combines the grey model and the ANFIS model. The grey models are used to preprocess the original data, and the ANFIS model is used to adjust the combined model. To evaluate the performance of the model, the experiment for the spindle is implemented. The results show that the combined model has high prediction accuracy, and it has better performance than BP networks.

The paper is organized as follows. Section 2 presents our proposed model combining the grey models and the ANFIS model. Section 3 describes the experimental setup. Section 4 describes the experimental results and performs comparisons of the combined model and BP network. Finally, conclusions are presented in Section 5.

2. Building the Predictive Model

2.1. Data Preprocessing

In order to reduce the randomness of the original data and the influence of unpredictable noises, we use the grey model to preprocess the original data, namely, the measured data of the spindle. Grey system theory is a kind of systematic and scientific theory developed originally by Deng [33] in the 1980s.

Based on the original data of the spindle, we establish the grey model GM, which is a first-order grey model with variables. The following steps are performed.

Step 1. Create the original data sequence containing the temperature and thermal deformation of the spindle and it is expressed as follows:where is the thermal deformation data sequence, is the temperature data sequence, and is the sample size of the data.

Step 2. Using the accumulated generating operation (AGO), we convert chaotic series into monotonously increasing series , and it is given bywhere is calculated by

Step 3. With the following first-level mean generating operation (MGO), we create the background series from , and it is expressed as follows:

Step 4. Establish the grey differential equation of the grey model GM, and it is expressed as follows:where the parameters can be obtained by using the least-square method as follows:where

Step 5. Set up the grey model GM as follows:where is the prediction value at a time . Using the first-level inverse accumulated generating operation (IAGO), we can obtain the output of the grey model GM:In the data preprocessing, we use the data sequence where , to predict , namely, the thermal deformation of the spindle. We employ three groups of grey models, which have different length of the data sequence. The outputs of the grey models are used as the inputs of our proposed ANFIS model, together with the measured thermal deformation used as the output, to train the ANFIS model.

2.2. Model Adjustment Using ANFIS

For getting better predictive effect, we use ANFIS to perform the adjustment of the combined model. ANFIS is a fuzzy inference system (FIS) implemented as a neural network, firstly proposed by Jang [34] in 1993, and then has been widely used [3537]. It is a five layered feed-forward neural network structure and uses fuzzy reasoning and neural network learning algorithms to map inputs into an output. The ANFIS architecture used in this paper is shown in Figure 1. It uses the first-order Sugeno fuzzy model and has three inputs linked with three membership functions (MFs), eight rules, and one output.

For the first-order Sugeno fuzzy model, the rule set with eight fuzzy if-then rules can be expressed as follows:Rule  1:If is , is , and is ,then .Rule  2:If is , is , and is ,then .Rule  3:If is , is , and is ,then .Rule  4:If is , is , and is ,then .Rule  5:If is , is , and is ,then .Rule  6:If is , is , and is ,then .Rule  7:If is , is , and is ,then .Rule  8:If is , is , and is ,then .where , , and are the inputs, (or ), (or ), and (or ) are the fuzzy sets, () are crisp functions in the consequent, and , , , and are consequent parameters determined during the training process.

The ANFIS has five layers, where nodes of the same layer have the similar function. We define the output of the node of the layer as , where denotes the node position in the vertical direction. It is detailed as follows.

Layer 1. In this layer, all nodes are adaptive nodes and use square nodes to represent the membership function. The outputs of this layer are the fuzzy membership grade of the input (or ), which is defined bywhere (or , ) is the crisp input to nodes and (or , ) is a fuzzy set linked with this node, characterized by the shape of MFs, and MFs can be any continuous and piecewise differentiable functions, such as Gaussian, generalized bell shaped, trapezoidal shaped, and triangular shaped functions. We employ generalized bell functions as MFs, which are defined bywhere (), (), and () are premise parameters, governing generalized bell MFs accordingly.

Layer 2. This layer is the rule layer using circle nodes to represent fixed nodes. Each node in this layer is labelled as , indicating that they perform as a simple multiplier. The outputs of this layer are represented as follows:The outputs denote the firing strength of rules and is the weight degree of if-then rules in the antecedent.

Layer 3. The nodes are also fixed nodes labelled , indicating that they play a normalization role to the firing strengths from the previous layer. The outputs of this layer are expressed as follows:which are the so-called normalized firing strengths.

Layer 4. This layer is the consequent layer using square adaptive nodes. The output of each node is simply the product of the normalized firing strength and a first-order polynomial based on the first-order Sugeno model. The outputs of this layer are given byParameters in this layer are referred to as consequent parameters.

Layer 5. This layer is only single fixed node labelled with . This node performs the summation of all incoming signals. Hence, the overall output of the model is given by

2.3. Hybrid Algorithm

The task of the learning algorithm for the ANFIS model is to tune all the fitting parameters, namely, premise parameters and consequent parameters, and make the ANFIS model achieve a desired input/output mapping.

As shown in Figure 1, there are two adaptive layers in the ANFIS model, namely, Layers 1 and 4. They have fitting parameters , , , and . The number of fitting parameters is 50, including 18 premise parameters , , and and 32 consequent parameters .

The learning algorithm for the ANFIS model is the hybrid algorithm combining the gradient descent and least-squares method, which contains the forward pass and backward pass. In the forward pass, fixing premise parameters, it uses the least-squares method to optimize consequent parameters. When the consequent optimal parameters are found, the backward pass begins. In the backward pass, fixing consequent parameters, it uses the gradient descent method to optimize premise parameters.

Forward Pass. Fixing premise parameters, the output of the ANFIS model can be expressed as follows:Substituting the fuzzy if-then rules into (16), it becomesAfter rearrangement, the output can be written as follows:which is a linear combination of the fitting consequent parameters . The least-squares method is used to identify the optimal parameters. Once the consequent optimal parameters are found, the backward pass starts immediately.

Backward Pass. Fixing consequent parameters, it uses the gradient descent method to optimize the premise parameters corresponding to the fuzzy sets in the input domain. The output of the ANFIS model is calculated by using the consequent parameters found in the forward pass. The output error is controlled to optimize the premise parameters by means of a standard backpropagation algorithm. It has been proven that the algorithm is highly efficient in the training process [34].

3. Experiment Setup

The experiment was implemented on a vertical machining center to verify the effectiveness of our proposed method. Figure 2 shows that the experimental setup is equipped with a spindle driven by a built-in AC motor through a precision gear box, maximum spindle speed 6000 rpm, high-speed tool holders using standard HSK, and a standard ceramic ball is installed to the tool holder of the spindle. An inductive current sensor fixed on the worktable, together with an analog data acquisition system, was used to measure the spindle deformation along -axis. Analyzing the spindle structure, we know that it has three heat sources directly affecting the effective length of the spindle: the first is the front bearing of the spindle, the second is the driving box located in the back of the spindle housing, and the third is the AC motor providing the power for the spindle. The sensor placement strategy is as close as possible to heat sources, and it facilitates to monitor the temperature fluctuation of heat sources. Therefore, three Pt100 thermal resistances are attached on the housing surface of the spindle close to heat sources.

As shown in Figure 2, the data process system was composed of data acquisition card PXI-4351, data acquisition system PXI-9230, and a personal computer (PC). The data from sensors were obtained by PXI-4351. Using software Labview, we wrote the data process program that runs on PXI-9230. The data were analyzed by the program, and the results are output on the PC monitor. The entire process was controlled by the PC.

In order to enhance the robustness of our proposed model, the training dataset should spread throughout the entire running stage, including the warming-up stage, machine tool pause, and the thermal equilibrium stage. The thermal deformation and temperature data were recorded at a sampling interval of 1 min, and it had 300 groups covering 300 min. They were divided into two groups used for training and testing the model. The spindle speed, temperature profiles from three Pt100 thermal resistances, and the thermal deformation of the spindle are illustrated in Figures 4 and 6.

4. Results and Discussion

4.1. Training and Validating the Combined Model

In training, we use the training dataset to train the combined model. Using the grey models, we preprocess the original data, namely, the temperature data and the thermal deformation of the spindle. The outputs of the grey models, together with the measured thermal deformation of the spindle, are used to train the ANFIS model. For the training process of the ANFIS model, we choose the initial step size as 0.01 and the error of the convergent criterion as 0.1 μm. Using the hybrid algorithm, we can obtain the optimal parameters for the ANFIS model. Figure 3 shows the initial and final MFs before and after training. We can see from the figure that it has big changes for initial MFs. The comparison between the output of the combined model and the measured data of the spindle deformation is illustrated in Figure 4(c).

In testing, we use the testing dataset to validate the effectiveness of the combined model. The comparison between the output of the combined model and the measured data of the spindle deformation is shown in Figure 6(c). We can see from the figure that the residual error of the spindle deformation along -axis can be greatly reduced from 45 μm to less than 6 μm. It shows that the combined model has a good adaptability, even if under different conditions.

4.2. Comparisons with BP Network

For the comparisons between different models, we built the backpropagation (BP) network that has the topology structure of 3-7-1. As illustrated in Figure 5, it is composed of input layer, hidden layer, and output layer. Three input neurons receive temperature data from three Pt100 thermal resistances, seven hidden neurons deal with the data by Sigmoid functions, and one output neuron predicts the spindle deformation along -axis.

In order to compare the performance of the combined model and BP network, we use the following evaluation standard.

Root mean squared error (RMSE):where denotes the actual deformation, denotes the predicted deformation, and denotes the number of the dataset.

Mean absolute percentage error (MAPE):

Correlation coefficient ():where and . We can see from the three evaluation standards that when RMSE and MAPE are smaller, larger have better performance.

As shown in Table 1, the performance of BP network and the combined model are listed. We can know from Table 1 that the combined model has smaller RMSE/MAPE and bigger than BP network.

Using BP network to predict the spindle deformation along -axis, the results of training and testing are shown in Figures 4(d) and 6(d), respectively. We can see from these figures that BP network have larger deviation for the actual spindle deformation during the warming-up stage. Only when the temperature smoothly increases and the heat equilibrium of the spindle reaches a stable status, BP network has a good effect.

Due to the change of the spindle speed, the fluctuation of the spindle deformation in these intervals , , and is much bigger. In contrast with other intervals, the curve in the above intervals becomes more steep, as illustrated in Figure 6(c). In these intervals, we can see that the combined models have more quick response speed than BP network; thus, it has smaller residual error.

5. Conclusions

This paper presents a new combined model to predict the spindle deformation along -axis. In the combined model, the grey models are employed to preprocess the original data, and the ANFIS model is used to adjust the combined model. The following conclusions are drawn:(a)Using the grey model to preprocess the original data, it can reduce the randomness of the original data and the influence of unpredictable noises.(b)Experimental validation was carried out. It can be known from the experimental results that the combined model could improve the thermal performance of the spindle and precisely predict the spindle deformation. Under the new spindle speed, the residual error of the spindle can be decreased from 45 μm to less than 6 μm.(c)Comparing the results of the combined model and BP network, it shows the superiority of the combined model in the aspect of the prediction of the spindle deformation. Under the new spindle speed, MAPE of the combined model are less than 0.6%, and MAPE of BP network are greater than 3%, and the combined model can more quickly respond than BP network, and it can receive smaller residual error.(d)In nature, BP network is a black box, and the relationships between inputs and outputs are difficult to interpret, but ANFIS is transparent, and the if-then rules are easy to understand and interpret.

Competing Interests

The authors declare that they have no competing interests.

Acknowledgments

The work here is supported by the National Natural Science Foundation of China (no. 51575209, no. 51575208, and no. 51475185).