An Online Simultaneous Measurement of the Dual-Axis Straightness Error for Machine Tools

: Vertical straightness errors are the key factor that affects the ﬂatness of the workpiece during vertical machining. Traditionally, the individually measured and ﬁtted vertical straightness errors of the X and Y axes are used to compensate the Z axis and, thus, obtain the ﬂatness of the working table of the machine tool. However, it is difﬁcult to measure and compensate the vertical straightness error of the desired position on the working table, not to mention the centroid variation effect of the working table on the measured data. In this study, an online dual-axis measurement system with repeatability (3 σ ) of 2.46 µ m is developed to simultaneously measure X -axis and Y -axis straightness errors of the desired position of a working table. Furthermore, the measured data are utilized to establish a ﬂatness error model to reduce the vertical straightness error of the working table such that the repeatability (3 σ ) of the measured ﬂatness may be kept within a range of 0.65 µ m.


Introduction
Straightness, linear positioning and angular errors exist in every linear movement system [1], and the straightness of a moving platform can be measured by using a displacement indicator according to ISO230-1. The industry compensation method employed for straightness error measurements is usually conducted by using a single-axis mechanism with a laser interferometer and an optical mirror/prism that moves the other axis to the center of the measured axis, and then establishes the compensation data for vertical straightness with the measured Xand Y-axis straightness errors.
Fan et al. [2] proposed a low-cost straightness measurement system using a laser source and a quadrant detector. Lin et al. [3] integrated a dual-linear reflector, a Wollaston prism, and a corner cube to establish a measurement system of repeatability (3σ) of 1 µm. In a similar way, Feng [4] and Kuang [5] utilized a single-mode fiber-coupled laser module as the reference line for straightness measurements. Hwang et al. [6] proposed a three-probe system for measuring the parallelism and straightness of a pair of rails for ultra-precision guideways. Iqbal et al. [7] first described how randomly arising illumination noises produce unpredicted variations in the position sensing detector (PSD) output. You et al. [8] proposed a straightness error measurement approach based on common-path compensation in order to eliminate the laser beam drift by utilizing an optical module with a PSD and a quadrant detector (QD).
Huang et al. [9] developed a new measurement method based on a phase sensitive detection technique, which consists of a single-mode fiber pigtailed laser diode, a collimator, a PSD, and a corner cube. To eliminate the influence of background light, the laser diode was modulated by a sinusoidal wave current and the PSD signal phase was demodulated by using the sensitive detection 2 of 16 technique. Borisov et al. [10] replaced the laser interferometer with a customized taut-wire module and successfully developed a straightness measurement system with a standard deviation of 1.5 µm over a measuring range of 1.5 m.
Liu et al. [11] also replaced the laser interferometer with a high-power fiber-coupled light emitting diode (LED) as a light source for measuring straightness errors within a limited detecting range. Feng et al. [12] developed a fast and accurate system for gantry type milling centers by real-time modeling one serial of straightness errors using B-spline curves.
The X and Y axes of a machine tool need to be moved during the machining process; however, the vertical straightness errors are compensated by using the individually measured vertical straightness errors of X or Y axis. The single-axis mechanism utilized in above mentioned literature may result in compensation error for vertical straightness due to the variation of center-of-gravity, especially for machine tools of long-travelling distance or high-loading operation conditions. In this study, a dual-axis measurement system based on a single-axis mechanism via the least squares method, is developed. Its advantage is that the system can simultaneously measure and compensate both vertical straightness and flatness errors for the moving working table of the machine tool.
The PSDs are dual-lateral detectors calibrated with a laser interferometer (Agilent 5529A, Agilent Tech., Santa Clara, CA, USA) and used to obtain the correct relationship between voltage and beam position projected on the PSD, as shown in Figures 1 and 2 corner cube. To eliminate the influence of background light, the laser diode was modulated by a sinusoidal wave current and the PSD signal phase was demodulated by using the sensitive detection technique. Borisov et al. [10] replaced the laser interferometer with a customized taut-wire module and successfully developed a straightness measurement system with a standard deviation of 1.5 μm over a measuring range of 1.5 m. Liu et al. [11] also replaced the laser interferometer with a high-power fiber-coupled light emitting diode (LED) as a light source for measuring straightness errors within a limited detecting range. Feng et al. [12] developed a fast and accurate system for gantry type milling centers by realtime modeling one serial of straightness errors using B-spline curves.
The X and Y axes of a machine tool need to be moved during the machining process; however, the vertical straightness errors are compensated by using the individually measured vertical straightness errors of X or Y axis. The single-axis mechanism utilized in above mentioned literature may result in compensation error for vertical straightness due to the variation of center-of-gravity, especially for machine tools of long-travelling distance or high-loading operation conditions. In this study, a dual-axis measurement system based on a single-axis mechanism via the least squares method, is developed. Its advantage is that the system can simultaneously measure and compensate both vertical straightness and flatness errors for the moving working table of the machine tool.
The PSDs are dual-lateral detectors calibrated with a laser interferometer (Agilent 5529A, Agilent Tech., Santa Clara, CA, USA) and used to obtain the correct relationship between voltage and beam position projected on the PSD, as shown in Figures 1 and 2.

System Configuration
Two proposed single-axis straightness measurement sub-systems (i.e., 1st and 2nd laser optical modules) were installed, respectively, on the X-and Y-axis of the machine tool and tested in order to clarify the vertical variation of XY plane of the working table, as shown in Figure 3.
First, PSD-1 was installed on the working table of the machine tool, Laser Source-1 (LS-1) and PSD-2 were installed on the X-axis, and Laser Source-2 (LS-2) was installed aside as shown in Figure  4. Secondly, beam paths were adjusted according to the distance between beam spots projected on PSD. For the two straightness measurement systems had no mutual effect on each other, it was unnecessary to pay attention to the adjustment order of beam paths.
With regard to the beam path adjustment principle, the distance between start and end points of the projected beam spot on PSD had to be kept less than 10√2 μm in order to reduce the cosine error, as shown in Figure 5. Since LS-1 was not set on a rigid stage, but on the saddle edge of the machine tool, there will exist a pitch angle error when the working platform was moved close to LS-1 along the X-axis direction, as shown in Figure 6.
In order to compensate the pitch angle error, an angle sensor mounted on the lab-developed beam-path adjustment module was set aside of LS-1 for detecting the angle variation caused by the movement of the working platform, see Figure 4. The measured data were analyzed by using the least squares method in order to obtain more accurate vertical straightness of the working table.

System Configuration
Two proposed single-axis straightness measurement sub-systems (i.e., 1st and 2nd laser optical modules) were installed, respectively, on the Xand Y-axis of the machine tool and tested in order to clarify the vertical variation of XY plane of the working table, as shown in Figure 3.
First, PSD-1 was installed on the working table of the machine tool, Laser Source-1 (LS-1) and PSD-2 were installed on the X-axis, and Laser Source-2 (LS-2) was installed aside as shown in Figure 4. Secondly, beam paths were adjusted according to the distance between beam spots projected on PSD. For the two straightness measurement systems had no mutual effect on each other, it was unnecessary to pay attention to the adjustment order of beam paths.
With regard to the beam path adjustment principle, the distance between start and end points of the projected beam spot on PSD had to be kept less than 10 √ 2 µm in order to reduce the cosine error, as shown in Figure 5. Since LS-1 was not set on a rigid stage, but on the saddle edge of the machine tool, there will exist a pitch angle error when the working platform was moved close to LS-1 along the X-axis direction, as shown in Figure 6. In order to compensate the pitch angle error, an angle sensor mounted on the lab-developed beam-path adjustment module was set aside of LS-1 for detecting the angle variation caused by the movement of the working platform, see Figure 4. The measured data were analyzed by using the least squares method in order to obtain more accurate vertical straightness of the working table.

System Configuration
Two proposed single-axis straightness measurement sub-systems (i.e., 1st and 2nd laser optical modules) were installed, respectively, on the X-and Y-axis of the machine tool and tested in order to clarify the vertical variation of XY plane of the working table, as shown in Figure 3.
First, PSD-1 was installed on the working table of the machine tool, Laser Source-1 (LS-1) and PSD-2 were installed on the X-axis, and Laser Source-2 (LS-2) was installed aside as shown in Figure  4. Secondly, beam paths were adjusted according to the distance between beam spots projected on PSD. For the two straightness measurement systems had no mutual effect on each other, it was unnecessary to pay attention to the adjustment order of beam paths.
With regard to the beam path adjustment principle, the distance between start and end points of the projected beam spot on PSD had to be kept less than 10√2 μm in order to reduce the cosine error, as shown in Figure 5. Since LS-1 was not set on a rigid stage, but on the saddle edge of the machine tool, there will exist a pitch angle error when the working platform was moved close to LS-1 along the X-axis direction, as shown in Figure 6.
In order to compensate the pitch angle error, an angle sensor mounted on the lab-developed beam-path adjustment module was set aside of LS-1 for detecting the angle variation caused by the movement of the working platform, see Figure 4. The measured data were analyzed by using the least squares method in order to obtain more accurate vertical straightness of the working table.

Measurement Principle
As shown in Figure 7, the measurement path was inspired by previous study [13]. The straightness variation of the moving working table is detected by PSDs. The laser beam of the 2nd module is utilized not only as the reference line projected on PSD-2 for measuring the vertical straightness errors of the Y-axis, as shown in Figure 3, but also as the connection for linking the errors measured by the 1st module. The reference-point of the machine tool is at the left down corner, and the measurement was performed in horizontal motion along the X-Y plane of the machine tool. The moving direction of PSD-1 along the X-axis was from machine position X-100 mm to X-900 mm (measurement distance: 800 mm), and the PSD-1 along Y-axis was from Y-100 mm to Y-500 mm (measurement distance: 400 mm). The vertical straightness error Zσ can be expressed as the sum of the measured X-and Y-axis vertical straightness and : The equation for the least-squared plane can be expressed as follows: where A, B, and C are constants; X, Y, and Z are coordinates on the least-squared plane.

Measurement Principle
As shown in Figure 7, the measurement path was inspired by previous study [13]. The straightness variation of the moving working table is detected by PSDs. The laser beam of the 2nd module is utilized not only as the reference line projected on PSD-2 for measuring the vertical straightness errors of the Y-axis, as shown in Figure 3, but also as the connection for linking the errors measured by the 1st module. The reference-point of the machine tool is at the left down corner, and the measurement was performed in horizontal motion along the X-Y plane of the machine tool. The moving direction of PSD-1 along the X-axis was from machine position X-100 mm to X-900 mm (measurement distance: 800 mm), and the PSD-1 along Y-axis was from Y-100 mm to Y-500 mm (measurement distance: 400 mm).

Measurement Principle
As shown in Figure 7, the measurement path was inspired by previous study [13]. The straightness variation of the moving working table is detected by PSDs. The laser beam of the 2nd module is utilized not only as the reference line projected on PSD-2 for measuring the vertical straightness errors of the Y-axis, as shown in Figure 3, but also as the connection for linking the errors measured by the 1st module. The reference-point of the machine tool is at the left down corner, and the measurement was performed in horizontal motion along the X-Y plane of the machine tool. The moving direction of PSD-1 along the X-axis was from machine position X-100 mm to X-900 mm (measurement distance: 800 mm), and the PSD-1 along Y-axis was from Y-100 mm to Y-500 mm (measurement distance: 400 mm). The vertical straightness error Zσ can be expressed as the sum of the measured X-and Y-axis vertical straightness and : The equation for the least-squared plane can be expressed as follows: where A, B, and C are constants; X, Y, and Z are coordinates on the least-squared plane. The vertical straightness error Z σ can be expressed as the sum of the measured Xand Y-axis vertical straightness X σ Z and Y σ Z : The equation for the least-squared plane can be expressed as follows: where A, B, and C are constants; X, Y, and Z are coordinates on the least-squared plane. The vertical straightness error of every sampling point Ei can be expressed as: And the squared error E is given by: The minimum value of the squared error can be obtained by taking partial derivatives of E with respect to A, B and C, setting these derivatives to zero, and then solving for A, B, and C: Equation (5) can be expressed in a matrix form: The constants A, B and C are obtained from Equation (6). Thus, the Z-axis coordinate on the least-squared plane Z i can be calculated by substituting A, B and C back into Equation (2), and then the vertical straightness error of every sampling point E i can be calculated by subtracting Z i from Z σ i of Equation (3). Finally, the plane flatness is given by using the extremum of E i : If the plane of interest is in close proximity to the horizontal plane, i.e., (7) can be simplified to:

Uncertainty Analysis
System errors are mainly originated from environmental variation, modules setup, signal jamming, etc., and the uncertainty analysis represents the distribution range of measured data which include systematic and/or random errors in most cases. Therefore, the uncertainty of measured data should be analyzed as possible to recognize the key factors that may improve the measurement accuracy or to remove potential factors causing inaccuracy of the proposed system.

Vibration Error of the Laser Source
In an ideal environment, Laser source 2 set on the ground is utilized as the measurement baseline, which is supposed to be kept at a static state without any vibration. However, in an actual measurement environment, there may exist an angle error due to the vibration of Laser Source-2 caused by nearby machine operation, crane movement in the factory, staff walking, etc., as shown in Figure 8. The laser vibration error can be expressed as: where is the laser vibration error, is the distance between laser source and PSD, and is the angle error generated by environmental vibration. Table 1 shows the result of error analysis.

PSD Setup Error
During the PSD setup process, a pitch/yaw angle error could exist due to PSD fixture, machine operation, misalignment, and so on, which may result in a cosine error in the X-or Y-axis, as shown in Figure 9. The PSD setup error can be expressed as: where is the PSD setup error, is the angle error due to PSD setup, and is the distance between the beam spot and the center point of PSD detection area. Table 2 shows the PSD setup error.  The laser vibration error can be expressed as: where E Sh is the laser vibration error, D LP is the distance between laser source and PSD, and θ Sh is the angle error generated by environmental vibration. Table 1 shows the result of error analysis.

PSD Setup Error
During the PSD setup process, a pitch/yaw angle error could exist due to PSD fixture, machine operation, misalignment, and so on, which may result in a cosine error in the Xor Y-axis, as shown in Figure 9. The PSD setup error can be expressed as: where E Pθ is the PSD setup error, θ Ps is the angle error due to PSD setup, and L Por is the distance between the beam spot and the center point of PSD detection area. Table 2 shows the PSD setup error.

Uncertainty of Dual-Axis Measuring
For the 1st straightness measurement module was set on the X-axis of the machine tool; therefore, the vertical straightness error of X-axis ( , i = 1~n) can be expressed as follows: where 1 is the measurement of PSD-1, is the distance between the beam spot and the PSD center, is the measurement of the angle sensor, is the vibration error of LS-1, and is the setup error of PSD-1.
The vertical straightness error of X-axis ( , i = 1~n) can be expressed as follows: where 2 is the measurement of PSD-2, is the vibration error of LS-2, and is the setup error of PSD-2.
The vertical straightness error of machine tool , which can be observed during the moving of working table, is the most critical factor of vertical straightness and flatness measurements, and is given by: where is the vertical straightness error of X-axis, and is the vertical straightness error of Y-axis of the machine tool.
The compensation of each measured point of the machine tool, Lsm , can be obtained by substituting into the least-squares equation: The original surface flatness data of workpiece can be obtained by introducing the measurement of triangulation laser : Figure 9. PSD setup error.

Uncertainty of Dual-Axis Measuring
For the 1st straightness measurement module was set on the X-axis of the machine tool; therefore, the vertical straightness error of X-axis (Ex z i , i = 1~n) can be expressed as follows: where P1 z i is the measurement of PSD-1, D LP 1i is the distance between the beam spot and the PSD center, θ AS i is the measurement of the angle sensor, E Sh 1 i is the vibration error of LS-1, and E Pθ 1 i is the setup error of PSD-1.
The vertical straightness error of X-axis (Ex z i , i = 1~n) can be expressed as follows: where P2 z i is the measurement of PSD-2, E Sh 2 i is the vibration error of LS-2, and E Pθ 2 i is the setup error of PSD-2.
The vertical straightness error of machine tool WP z i , which can be observed during the moving of working table, is the most critical factor of vertical straightness and flatness measurements, and is given by: where Ex z i is the vertical straightness error of X-axis, and Ey z i is the vertical straightness error of Y-axis of the machine tool. The compensation of each measured point of the machine tool, LsmWP z i , can be obtained by substituting WP z i into the least-squares equation: The original surface flatness data of workpiece W pD i can be obtained by introducing the measurement of triangulation laser TL i : The workpiece flatness W pF can then calculated by the relation of the maximum and minimum of LsmW pD i which is obtained by substituting W pD i into the least-squares equation: Equation (13) represents the sum of vertical straightness errors of X-axis and Y-axis originated from the motion of the working table during the machining process, which is the most critical to the system uncertainty, and can be rewritten by combining Equations (9)- (12): Taking partial derivatives of WP z with respect to the uncertainty factors D LP 1 , θ Ps 1 , D LP 2 , and θ Ps 2 , we obtain: ∂ f ∂θ Ps 2 = sec θ Ps 2 tan θ Ps 2 L Por 2 (23) Finally, the system uncertainty, σ, is given by: The system uncertainty analysis result is listed in Table 3, and the most critical single factors is dD LP 1 which is originated from the manual setup error of the distance between LS-1 and PSD-1. Meanwhile, although the individual contributions of θ AS and θ Sh 1 are less effective than dD LP 1 , yet the combination contribution, i.e., , is equal to dD LP 1 . This finding reveals that the pitch angle and vibration of LS-1 have to be limited in order to minimize measurement uncertainties.

Verification of Vertical Straightness Measurements
The verification of the vertical straightness of the proposed system was conducted by using the laser interferometer, which was also utilized for PSD calibration, as a reference to measure the vertical straightness errors of the in-house-developed three-axis machine tool in an air-conditioned laboratory, as shown in Figures 10 and 11.

Verification of Vertical Straightness Measurements
The verification of the vertical straightness of the proposed system was conducted by using the laser interferometer, which was also utilized for PSD calibration, as a reference to measure the vertical straightness errors of the in-house-developed three-axis machine tool in an air-conditioned laboratory, as shown in Figures 10 and 11. Figures 12 and 13 show the vertical straightness errors and repeatability of single-axis straightness measurements, and Figures 14 and 15 show those of dual-axis straightness measurements. Table 4 compares vertical straightness verification results of the laser interferometer and the proposed system. The repeatability (3σ) of the laser interferometer and the proposed system were 2.32 μm and 2.32 μm for single-axis measurements, and 2.32 μm and 2.46 μm for dual-axis measurements. Figure 10. Verification setup of single-axis measurements. Figure 10. Verification setup of single-axis measurements. Figures 12 and 13 show the vertical straightness errors and repeatability of single-axis straightness measurements, and Figures 14 and 15 show those of dual-axis straightness measurements. Table 4 compares vertical straightness verification results of the laser interferometer and the proposed system. The repeatability (3σ) of the laser interferometer and the proposed system were 2.32 µm and 2.32 µm for single-axis measurements, and 2.32 µm and 2.46 µm for dual-axis measurements.

Verification of the Flatness Measurement System
The flatness error verification of dual-axis measurement system was conducted by measuring the flatness of a surface-scraped cast-iron workpiece (300 mm × 97 mm × 33.9 mm) using a three-axis vertical milling machine tool (KSC-611, KENT, New Taipei city, Taiwan) equipped with a triangulation laser (LK-H020, Keyence Co., Osaka, Japan) in an air-conditioned laboratory, as shown in Figure 4.
The triangulation laser was mounted on the spindle head (i.e., Z-axis) of the machine tool, which was utilized for ball-screw profile detection and flatness measurement in previous study [13,14]. Up to the present, there is no commercial instrument capable of conducting dual-axis straightness measurements on the proposed system, therefore, the feasibility of the proposed system is determined according to the repeatability of the flatness measurement. Figure 16 shows the vertical straightness error model and corresponding flatness of X-Y plane on the moving working table detected by the proposed system, which could be regarded as the surface topography to a certain extent. The measurement interval of both axes is 50 mm, and the measurement ranges of the X-and Y-axes are 800 mm and 400 mm, respectively. The average flatness and repeatability (3σ) of the proposed system was 12.43 μm and 0.65 μm, respectively.
Obviously, the vertical straightness errors measured along the X-axis with a varied Y-axis position were totally different, and their distribution were generally uneven. These finding prove that vertical straightness error cannot merely rely on the fitting results of individually-measured X-

Verification of the Flatness Measurement System
The flatness error verification of dual-axis measurement system was conducted by measuring the flatness of a surface-scraped cast-iron workpiece (300 mm × 97 mm × 33.9 mm) using a three-axis vertical milling machine tool (KSC-611, KENT, New Taipei city, Taiwan) equipped with a triangulation laser (LK-H020, Keyence Co., Osaka, Japan) in an air-conditioned laboratory, as shown in Figure 4.
The triangulation laser was mounted on the spindle head (i.e., Z-axis) of the machine tool, which was utilized for ball-screw profile detection and flatness measurement in previous study [13,14]. Up to the present, there is no commercial instrument capable of conducting dual-axis straightness measurements on the proposed system, therefore, the feasibility of the proposed system is determined according to the repeatability of the flatness measurement. Figure 16 shows the vertical straightness error model and corresponding flatness of X-Y plane on the moving working table detected by the proposed system, which could be regarded as the surface topography to a certain extent. The measurement interval of both axes is 50 mm, and the measurement ranges of the Xand Y-axes are 800 mm and 400 mm, respectively. The average flatness and repeatability (3σ) of the proposed system was 12.43 µm and 0.65 µm, respectively.
Obviously, the vertical straightness errors measured along the X-axis with a varied Y-axis position were totally different, and their distribution were generally uneven. These finding prove that vertical straightness error cannot merely rely on the fitting results of individually-measured Xand Y-axis vertical straightness errors using the traditional single-axis method, for the X-axis vertical straightness errors are indeed varying with the Y-axis position.
Before the workpiece flatness being measured, the upper surface of scrapped workpiece was placed on a blue-painted standard plate for marking high points on the scrapped surface. The workpiece was first placed in the detection range of the triangulation laser; thereupon, the proposed system was set on the three-axis machine tool. During the measurement process, the workpiece was moved by the working table according to the requested detection path; in addition, the flatness was obtained via the least-squares analysis.
With the errors compensated by the proposed system, the matched high-points in the dash windows was conspicuously improved, evidencing the cancellation of vertical straightness errors originated from the moving working-table could be a significant benefit for surface topography measurements. Furthermore, both the average flatness and accuracy repeatability (3σ) were also improved from 64.65 µm to 52.14 µm and from 2.13 µm to 1.46 µm, respectively, as shown in Table 5, which proves the system's feasibility for increasing the accuracy and precision of surface flatness measurements.
Conclusively, it is shown that simultaneously online measurements of the proposed system could be utilized to compensate both the vertical straightness error and the plane flatness of the working table after it being moved to the desired position and this, in turn, increased the machining accuracy. and Y-axis vertical straightness errors using the traditional single-axis method, for the X-axis vertical straightness errors are indeed varying with the Y-axis position. Before the workpiece flatness being measured, the upper surface of scrapped workpiece was placed on a blue-painted standard plate for marking high points on the scrapped surface. The workpiece was first placed in the detection range of the triangulation laser; thereupon, the proposed system was set on the three-axis machine tool. During the measurement process, the workpiece was moved by the working table according to the requested detection path; in addition, the flatness was obtained via the least-squares analysis.
With the errors compensated by the proposed system, the matched high-points in the dash windows was conspicuously improved, evidencing the cancellation of vertical straightness errors originated from the moving working-table could be a significant benefit for surface topography measurements. Furthermore, both the average flatness and accuracy repeatability (3σ) were also improved from 64.65 μm to 52.14 μm and from 2.13 μm to 1.46 μm, respectively, as shown in Table  5, which proves the system's feasibility for increasing the accuracy and precision of surface flatness measurements.
Conclusively, it is shown that simultaneously online measurements of the proposed system could be utilized to compensate both the vertical straightness error and the plane flatness of the working table after it being moved to the desired position and this, in turn, increased the machining accuracy.

Conclusions
This paper addressed the problems that traditional measurement will have when measuring the vertical straightness on the machine tool. An online simultaneous dual-axis measuring system was developed for improving the machining accuracy by compensating vertical straightness errors of the moving working table using real-measured data, rather than by traditional curve fittings. The proposed system was verified by commercial instrument. The features of the proposed system are described as follows: 1.
The vertical straightness of the Xand Y-axes of machine tools can be measured simultaneously with repeatability (3σ) as low as 2.46 µm.

2.
The measurements of the proposed system could be utilized to establish the error model for monitoring and compensating the vertical straightness errors of machine tools, especially for vertical milling machines.

3.
The surface topography of the workpiece could be significantly improved by vertical straightness error compensation.

4.
The flatness of the moving working-table could be compensated by the proposed system with repeatability (3σ) being reduced to as low as 0.65 µm.