# Vertical Machining Center Feed Axis Thermal Error Compensation Strategy Research
## 2 Research Object and Methodology
### Based on Data-Driven Model of Thermal Errors in the Feed Axis of CNC Machine Tools  
3.1 Optimization Model of Temperature-Sensitive Point Selection Based on Clustering and Correlation Analysis  
1. Temperature data extraction based on limit filtering and Kalman filtering  
Making a good choice of temperature-sensitive points is the basic premise of thermal error modeling. Due to the complex workshop environment, the temperature data extracted by a single bus has abnormal and missing phenomena. Therefore, it is necessary to preprocess the temperature data extracted from each channel to ensure the validity and  
Figure 5: Block diagram of the thermal error compensator hardware circuit. stability of the data. This paper uses a combination of limit and Kalman filtering for data preprocessing [18]. Furthermore, gray-scale correlation analysis and clustering algorithms extract temperature-sensitive points to reduce the time complexity and covariance between temperature-sensitive points and thermal error values caused by the increased number of temperature-sensitive points. Define the temperature data acquired by the temperature sensor on sensor \(i\) at moment \(t\) as \(Temp_{i}(t)\), and for the temperature data collected before the current moment define \(Temp_{i}(t-1)\). When the detected temperature value is abnormal, it can be judged according to the following equation. Where \(|Temp_{i}(t)-Temp_{i}(t-1)|>LimitTemp\) indicates that the current temperature value in the last second of the temperature value of the state mutation range, take \(LimitTemp=2\). \[Temp_{i}(t)=\left\{ \begin{aligned} Temp_{i}(t-1),& |Temp_{i}(t)-Temp_{i}(t-1)|>LimitTemp\\ Temp_{i}(t),&|Temp_{i}(t)-Temp_{i}(t-1)|<LimitTemp \end{aligned} \right. \tag{1}\]  
As shown in Figure 6's initial temperature data, the upper and lower fluctuations of the temperature data after processing were significantly suppressed, and the trend of temperature change in each measured temperature point could be characterized. However, there are still small fluctuations in temperature, and the time series of change trends are inaccurate. In the reverse interception of the deviation of the above temperature values, the importance of the statistics is in line with the trend of normal distribution, the selected statistical  
Figure 6: Raw temperature data and limit filtering. (**a**) initial temperature data; (**b**) temperature data after limiting filtering. interval of 0.001 \({}^{\circ}\)C, \(Temp_{i}(t)\in[TempMin,TempMax]\). The number of temperature values in each interval range is recorded, as shown in Figure 7; the deviation is approximately Gaussian white noise, so the Kalman filter can be used to preprocess the temperature data. Assume that the temperature value of the near heat source to be measured is the object of observation. Kalman-filtered in a continuous-time system, the estimated value of the system \(Temp_{k}\) has deviations, and this process noise is denoted as \(W_{k}\). The signal collected in the detection process contains noise and interference signals, which conform to Gaussian white noise, characterized by \(V_{k}\). \[\left\{ \begin{array}{rl}Temp_{k}&=A\times Temp_{k-1}+B\times U_{k}+W_{k-1} \\ ObservationTemp_{k}&=H\times Temp_{k}+V_{k}\end{array} \right. \tag{2}\]  
Equation (2) is a discrete-temperature linear dynamic system model, where \(Temp_{k}\) denotes the system state input, \(ObservationTemp_{k}\) denotes the state matrix observation, \(A\) is the state transfer matrix, \(H\) is the state observation matrix, \(B\) is the control input matrix, \(W_{k-1}\) is the process noise, and \(V_{k}\) is the measurement noise; note that the control value \(U_{k}=0\) in the above equation. The Kalman filter has a complete system, and the filtering process can be divided into two parts: the state update is performed mainly to obtain the a priori estimate of the next moment, and the measurement update is performed to obtain the posterior estimate through the a priori estimate and the measured value. \[\left\{