A New Method for On-line Measurement of the Straightness Error of Machine Tools Using an Acceleration Sensor

: In order to improve the poor efficiency in the measurement of the geometric error of machine tools ’ linear axes, this paper has presented a method to measure and restructure the geometric error of linear axes that is based on accelerometers. This method takes advantage of the phenomenon that when acceleration is measured under different measuring speeds, different frequencies and amplitudes are produced. The measurement data of the high signal-to-noise ratio for various velocities was fused together and the straightness error of the measured axis was obtained by integrating the acceleration twice. In order to remove the trend terms error in the integration, a zero phase IIR Butterworth filter was designed, which guarantees the signal ’ s phase invariance after filtering. The data was continued with the AR model to eliminate the endpoints ’ effect in the filtering. The proposed method was verified by numerical values and experiments. The results showed that the proposed method has better robustness, a wider bandwidth and a higher efficiency than the methods of measuring by laser interferometer. It is also able to measure the geometric error of linear axes with an accuracy that reaches the micron scale.


Introduction
The straightness error, which is crucial to machine tools, will directly affect the machining quality.During the service life, the machine tools' accuracy may decline due to pitting, wear, corrosion and cracks [1] .As the degradation increases, the machine tools gradually become unable to meet the processing requirements of the production.What is more, machine tools working in conditions of poor accuracy may lead to increased wear of key parts of the machine tools or even lead to the machine tools being scrapped [2] .However, the law of the decline of machine tools is elusive and hard to find.In order to compensate for and maintain the accuracy of machine tools, the straightness error of machine tools must be measured regularly.The commonly used instruments for measuring the accuracy of a linear axis are laser interferometers, collimators or ball bars [3] , which all have their drawbacks.The disadvantages of the laser interferometer are its large size, high cost, long run time, complex testing process and so on.The collimator can only test machine tools in assembly, and it is not suitable for already assembled machine tools.The shortcomings of the ball bar are its small range and poor accuracy of the results obtained from the separation model.Therefore, there is an urgent need to develop an on-line measurement system for the linear axis, as well as shorten the downtime, improve production quality, and enhance the efficiency of the measurement of the geometric accuracy of the linear axis [4][5][6][7][8] .
On-machine high-efficiency measurement of a machine tool's linear axis accuracy has been studied by relevant scholars.Y. T. Lou et al. [9,10] designed an on-line laser measuring device which can measure six errors of the linear axis at the same time.The device can measure the straightness, the angle and the positioning simultaneously, improve measuring efficiency, but it is too expensive and complicated.W. Y. Jywe et al. [11] proposed a method for measuring the straightness errors of the X-axis and the Y-axis, based on the consideration of the flatness of the work piece.The method also used a laser interferometer, however, only considered the measurement of the straightness error in the vertical direction.In addition to using laser interferometers, other sensors have also been used for displacement measurement.S. Swavik et al. [12] realized submicron displacement measurement based on inertial components, but the accuracy did not meet the requirement of the straightness error measurement of machine tools.R. Sato et al. [13] used acceleration sensors to measure the dynamic motion error of a machine tool, but it was not applied to the static geometric error test.L. X. Liao et al. [14] proposed an evaluation method of the degradation of the precision based on the fixed cycle test.G. W. Vogl et al. [15,16] proposed a linear axis accuracy detection scheme based on acidometers, but the trend term in the integration process was not fully considered.Through the above research, it can be found that there are problems with the current straightness error measurement.Methods with a laser interferometer are always expensive, complicated and time-consuming.There are also shortcomings with the new sensor measurements, such as inadequate measurement accuracy and immature methods.In conclusion, there is currently no effective on-line measurement method for straightness measurement.
Acceleration sensors have the advantages of low cost, small volume and high resolution; however it is easy to mix high frequency noise in the actual testing process, and the displacement obtained by integrating the test data twice is prone to include the trend term error.In this paper, a new method of machine tool straightness on-line measurement has been studied by using an acceleration sensor on a three-axis machining center.A multi-speed test data fusion method was used to improve the signal-to-noise ratio and remove the high-frequency noise.The integration results have been extended with the AR model at the end points to resist the end points effect.The zero phase high pass filter was designed to remove the trend term of the integration error and ensure the accuracy of the integration results.Finally, an on-line, low cost and high precision straightness error measurement method has been realized.

Straightness measurement scheme
Straightness is a spatial curve, which is usually projected onto two vertical planes parallel to the ideal axis for the convenience of description.Taking the X-axis as an example, there are two linear errors of the X-axis, one is the linearity error of the X-axis in the Y direction, and the other is the linearity error of the X-axis in the Z direction.As shown in Fig. 1, two uniaxial accelerometers are used, a uniaxial accelerometer As1 and a uniaxial accelerometer As2.The measurement direction of the uniaxial accelerometers As1 and As2 are Y and Z respectively.When the table moves uniformly along the X-axis, the acceleration sensor can measure the acceleration of the table due to the X-axis straightness error.The straightness error in the two directions of the X-axis can be obtained by integrating the algorithm.Acceleration needs to be measured under the condition of uniform movement of the worktable.The uniform speed measurement is convenient for locating the position of the error in the X direction of the straight axis.The speed of the worktable determines the magnitude and frequency of the acceleration signal.The faster the speed of the movement is, the larger the amplitude and the higher the frequency of the acceleration signal measured will be.The optimum frequency response range of the acceleration sensor is limited.A wider measurement bandwidth can be obtained under multiple measure speeds.Sensor drift can be reduced and the signal-to-noise ratio can be improved in high-speed measurements.A higher spatial frequency can be measured in low-speed measurements.
When driving the table in the X direction at high speed, , medium speed, , and low speed, , their relationships are： (1)   where， is the maximum safe feed speed in the X-direction.Acceleration perpendicular to the axis of motion was measured by acceleration sensors As1 and As2 respectively.The acceleration subset of the X-direction's moving axes under three measuring velocities can be obtained as follows: ( where， k is the sensor label， val is the measurement speed，X is the measurement direction; represents the signal obtained from the sensor k under measuring velocity val.represents the measurement time of the signal under measurement velocity val.
Based on spatial band continuity, the acceleration subset measured at high, medium and low speed are filtered and fused.The low frequency band of the spatial error, , in the high-speed measurement signal is retained.The medium frequency band of the spatial error, , in the medium-speed measurement signal is also retained.The high frequency band of the spatial error, , in the slow-speed measurement signal is also retained; in which, .Then, the upper and lower time-frequency limit frequencies of three kinds of velocity lower acceleration signal filtering can be obtained, as shown in Equation ( 3): where， is the upper time-frequency limit frequency, is the lower time-frequency limit frequency, and represents the measurement speed condition.
The high signal-to-noise ratio (SNR) data can be obtained by filtering; then the accelerations are integrated twice to obtain the displacements.Finally, the displacements are combined to obtain the final measurement error, as shown in Figure 2.

Elimination of the Integral Error Trend Term
The displacement signal can theoretically be obtained by integrating the acceleration signal twice.However, the collected acceleration signal actually has zero bias and a non-linear trend term with the temperature change.What is more, the initial velocity of the measurement point is unknown.The combination of these factors will lead to a serious deviation in the integral's results.Therefore it is necessary to establish an appropriate algorithm to remove the DC term of the collected acceleration signal and the trend term of the integral displacement error caused by the unknown Supposing the acceleration signal collected can be expressed as in equation ( 4): (4)   where， is the measurement of the acceleration at time t; is the true value of the acceleration at time t; is the error value of the acceleration at time t; is the trend term of the acceleration signal; and is the DC component.The displacement signal can be obtained by integrating the acceleration signal twice: (5) From equation ( 5), it can be seen that the displacement signal directly obtained from the two time-domain integration of the collected acceleration signal includes the difference terms ( ) of the sensor drift term, the trend term ( ) and the constant term (x 0 ) caused by the zero drift.If these errors cannot be effectively suppressed and eliminated, the integration results will often produce serious distortion.
Most of the trend errors in the integration results can be attributed to low-frequency errors, which can be filtered by high-pass filters.The designed filter needs to ensure that the low-frequency error can be removed effectively and that the phase of the signal will not be changed.Based on this, a zero-phase high-pass filter has been designed in this paper.
The Butterworth filter has good flatness and monotonous amplitude-frequency characteristics [17] .In this paper, a Butterworth filter was used to design the zero-phase high-pass filter.The pass ability of the Butterworth high-pass filter is mainly affected by the filter order N and the cut-off frequency W n .The higher the filter order, the faster the stopband attenuation, and the closer the filter is to the ideal filter.The cut-off frequency is an important parameter when designing high-pass filters.Usually, the cut-off frequency is located at -3db of the filter's frequency response amplitude curve.The Butterworth high pass filter was designed as shown in Figure 3. Considering the calculation accuracy, an 8th-order filter was chosen in this paper to filter the signal.The method used to realize zero phase filtering was to filter the signals in sequence first, then reverse the results after sequential filtering, and then output the results again after reverse filtering.The flow chart of this has been shown in Figure 4.

Elimination of the Endpoint Effect
A zero-phase filter has the endpoint effect at both ends of the filtering result, which affects the accuracy of the result.The AR model (Auto Regression model) is used for data continuation to deal with the endpoint effect caused by bidirectional filtering.The AR model continuation guarantees that the slope of the extended waveform will be unchanged at the boundary point, retaining the change trend of the original signal, providing smoothing and continuity, retaining the spectral characteristics of the original signal, and not adding any new frequency characteristics.The idea of the AR model is to deduce the predicted value of the next data point from the previous data point.The expression of the AR model is as follows: (6)   where, is an estimated value of , which can be derived from past values, .The prediction coefficients, , can be obtained by solving the regular equation of the AR model.The regular equation of the AR model has been shown in equation ( 7): (7)   Corresponding to the forward prediction, the backward prediction is the prediction of earlier data from known data, which can be expressed as: (8)   Fig. 5. Data extension The extended data can be filtered through the designed high-pass filter, and then the zero-phase filtering result with optimized endpoints can be obtained.

Numerical verification
Taking the straightness error E yx , the X-axis' straightness in the Y direction, as an example.E yx is a function of the linear axis changing with the X transformation in the Y direction.Supposing the function can be expressed as follows: (9)   where, , , , represent the space's low frequency error term, the intermediate frequency error term and the high frequency error term, respectively.Then represents the whole length of the measurement.As the measurement is performed at various speeds v, x can be replaced by: (10) mm/s， corresponds to the measurement time, s.Then by substituting formula (10) into formula (8), the corresponding function of the straightness with respect to time can be obtained: (11) The acceleration signal generated by the straightness error in the measuring process can be obtained by calculating the derivative of equation ( 11) twice, as shown in equation ( 12): (12)   Noise and the DC component exist in the acceleration measurement due to the environment and the sensor itself.Supposing the measurement noise is Gaussian white noise which is proportional to the amplitude and the velocity of the measurement then the simulated acceleration can be expressed as .The DC component will be removed from the measured signal at low, medium and high speeds.The direct integration and the integration after the data fusion algorithm are then performed.The integral error control algorithm proposed in this paper was then used to remove the trend error.The results have been shown in Fig. 6 8.8 sin 2 2.2 sin 2 0.55 sin 2  From Figure 6, it can be seen that the linear axis straightness error can be effectively reconstructed by de-DC processing, integration and the de-trend term of the acceleration signal with the noise signal.Due to the relatively long measurement cycle, the measured data drift during the low-speed measurement.The computation results of the medium and high speed measurement data were improved compared with the low speed measurement data, but additional high frequency errors were introduced in the medium and high speed measurement data compared with the low speed measurement data, which affected the accuracy of the straightness error reconstruction.The multi-speed measurement signal fusion algorithm mentioned in this paper has good robustness and has more advantages than a single measuring speed.It can also improve the signal-to-noise ratio and more accurately restore the straightness error.

Evaluation of the straightness error reconstruction
In order to quantify the accuracy of the error reconstruction, the maximum deviation of the straightness error (MD) and the root mean square error (RMSE) are used to evaluate the deviation of the error reconstruction value and the reference value under various measurement speed conditions.The error formulas are: where, is the reconstructed straightness error; is the target straightness error，and N is the number of measuring points.The formula ( 13) is used to evaluate the accuracy of the reconstructed straightness at various measurement speeds.The evaluation results have been shown in Figure 7.The measurement scheme based on multi-speed acquisition and data fusion can effectively improve the signal-to-noise ratio of the measured signal, enhance the robustness of the measurement and reduce the measurement error.

Measurement of the Anthropological Errors
In order to further study the application of the straightness error reconstruction algorithm in practical measurements, an experimental device was built on a KVC850M three-axis machining center as shown in Figure 8.Some parameters of the sensor have been shown in Table 1.
Table 1.Partial parameters of the sensors used for the experiment Range Bandwidth(±5％) Resolution Noise(1~100Hz) ±5g 0.06~450Hz 0.00003m/s 2 rms 2.9(μm/s 2 )/ √Hz~0.4(μm/s 2 )/ √Hz The specific form of the straightness error is simulated by controlling the combined motion of the X-axis and Y-axis.In this experiment, the type of the straightness error of the sinusoidal curve was simulated by controlling the combined motion of the X-axis and the Y-axis.A sinusoidal error curve with amplitudes of 10,20, 40, 60, 80 and 100 microns, and a space period length of 80 mm and a total length of 800 mm was simulated as the ideal error curve as shown in Figure 9.The simulated straightness error was relatively large in order to eliminate the influence of the straightness error of the machine tool itself and explore the factors affecting the accuracy of the straightness measurement.As the simulation error was a fixed single frequency, measurement can be done at a single speed.In this case, 200 mm/s was selected for the measurement, the measurement was repeated 10 times, and the average value was calculated to reduce the impact of accidental factors.The sampling frequency was 1024 Hz. 720mm was intercepted in the actual measurement to ensure the actual stroke of the intercepting uniform motion stage.The DC component was removed from the test signal, and the trend term caused by the integration was removed by the integral error control algorithm.The result has been shown in Fig. 10.From the comparison of the figures, it could be found that the straightness error reconstruction algorithm in this paper was in good agreement with the target curve.The maximum offset and root mean square error were used to evaluate the degree of deviation of the measured error curve from the simulated error curve.The results have been shown in Fig. 11.

The influence of the installation error
The installation angle error may occur during the installation of the acceleration sensor, as shown in Fig. 12.In which, n is the direction of the sensitive axis of the accelerometer, the X axis is the measured axis, the Y axis is the direction of deviation of the straightness error.The installation error may cause the deviation angle between the direction Y and the sensitive axis direction n.  Fig. 12. Acceleration sensor installation error When affected by the installation error, the measured acceleration can be expressed as: (14)   where, is the acceleration in the Y-axis direction; is the acceleration in the X-axis direction.The carrier moves uniformly along the X axis when measuring the straightness error in the Y direction of the X axis.Therefore formula ( 14) can be simplified to: (15) In order to verify the accuracy of the influence of the installation angle, a comparative experiment was set up to offset the sensor's sensitive axis and the test direction by 0 o ，30 o , 45 o .In the experiment, the linearity error of the X axis in the Y direction was simulated as a sinusoidal error curve with an amplitude of 40 um, a space period length of 80 mm and a total length of 800 mm.The angle bias of the experimental device has been shown in Figure 13.The results showed that the measurement value of the straightness error and the installation angle error were trigonometric functions, as shown in equation ( 14).The installation errors in the actual installation process were mainly caused by the unevenness of the installation surface, which is usually small.According to the ISO standard [18] ， the tolerance of flatness was 0.03 mm, the tolerance of vertical error was 0.032 mm, the tolerance of deflection angle was 0.06 mm, when the length of the of work-table is 800 mm.All the infectors were taken in account, the installation error was within 0.1 degree.The installation error could cause measurement error less than one thousandth, which is negligible.

Error Measurement of Machine Tools
By controlling the worktable to move uniformly in the X-axis direction and the Y-axis direction, tests were carried out at high speed (320mm/s), medium speed (160mm/s) and low speed (80mm/s).The tests were repeated ten times for each speed to find the average value so as to reduce the impact of accidental factors.The acceleration signal generated by the machine tools' straightness error in the Y direction of the X-axis was measured.The data fusion algorithm was used to extract the high, medium and low speed test signals and extract the space [0.0025, 0.01], [0.01, 0.1], [0.1, 2] bands, respectively; according to the test speed, the corresponding time and frequency were calculated as [0.8, 3.2], [1.6, 16], [8, 160], respectively.The algorithm that has been proposed in this paper was used to fuse and remove the error of the integral trend term, and finally the corresponding straightness error curve was calculated.A laser interferometer was used to measure the straightness error of the Y direction of the X-axis as reference values.An eleven-point equidistant measurement was used to measure the position corresponding to the uniform motion stage of the acceleration sensors.The measurement site of the laser interferometer has been shown in Fig. 15.The straightness error of the machine tool, measured by the accelerometer, has been shown in Fig. 16, and the measurement result from the laser interferometer has Straightness mirrors Laser head Acquisition software also been shown.Based on the accuracy of the on-machine measurement method proposed in this paper, this result meets the requirements of machine tool accuracy detection.Compared with the laser interferometer measurement method, it has a higher sampling frequency and can restore the details of the machine tool straightness error.The quantitative deviation between the two measurements has been shown in Table 2.

Conclusion
Aimed at the problem of the on-line measurement of the standard straightness error being time-consuming and energy-consuming, a new on-line measurement method for machine tools' straightness error, based on an accelerometer, has been proposed.
(1) In order to increase the measurement bandwidth and improve the signal-to-noise ratio and the accuracy of the test data, error testing was carried out under a variety of test conditions.Spatial filtering and fusion were adopted to superimpose the data measured under different test speed conditions.
(2) The integral error was removed effectively.A zero-phase filter was designed which was able to remove the integral trend error effectively.Based on the AR model, the data were extended directionally, eliminating the endpoint effect in bidirectional filtering.
(3) A series of experiments including numerical simulation, a simulation error experiment, an angle offset experiment and a straightness error measurement were carried out.The experimental results were evaluated, and the validity of the measurement method was verified.The straightness error of machine tools can be measured at the micron level by this method.
Compared with the method of measuring straightness using a laser interferometer, the method proposed in this paper has the advantages of high efficiency and low cost.It can be used for on-line monitoring of the geometric errors of machine tools and to obtain the law of the declining accuracy of machine tools.

Fig. 2 .
Fig. 2. Multi-speed Fusion Measuring Scheme for the Straightness of Machine Tools

Fig. 3 .
Fig. 3. Frequency Response Curve of the Designed High-Pass Filter

Fig. 6 .
Fig. 6.Comparisons of the Integral Results of the Various Measured Velocity Signals

Fig. 7 .
Fig. 7. Accuracy Evaluation of the Error Reconstruction

Fig. 11 .
Fig. 11.Evaluation of the simulated experimental results

Fig. 16 .
Fig. 16.Measurement of the Straightness Error of the Machine Tool's X-axis

Table 2 .
Deviation of the measurement results