# An Online Simultaneous Measurement of the Dual-Axis Straightness Error for Machine Tools
## 3 Uncertainty Analysis
### Uncertainty of Dual-Axis Measuring  
For the 1 st 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:  
\[Ex_{z_{i}}=P1_{z_{i}}+D_{LPR_{i_{i}}}\tan\bigl{(}\theta_{AS_{i}}\bigr{)}+E_{Sh_{ i_{j}}}+E_{P\theta_{i_{j}}} \tag{11}\]  
where \(P1_{z_{i}}\) is the measurement of PSD-1, \(D_{LPR_{i}}\) is the distance between the beam spot and the PSD center, \(\theta_{AS_{i}}\) is the measurement of the angle sensor, \(E_{Sh_{i_{j}}}\) is the vibration error of LS-1, and \(E_{P\theta_{i_{j}}}\) 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:  
\[Ey_{z_{i}}=P2_{z_{i}}+E_{Sh_{2_{i}}}+E_{P\theta_{2_{j}}} \tag{12}\]  
where \(P2_{z_{i}}\) is the measurement of PSD-2, \(E_{Sh_{2_{i}}}\) is the vibration error of LS-2, and \(E_{P\theta_{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:  
\[WP_{z_{i}}=Ex_{z_{i}}+Ey_{z_{i}} \tag{13}\]  
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, Lsm\(WP_{z_{i}}\), can be obtained by substituting \(WP_{z_{i}}\) into the least-squares equation:  
\[\text{Lsm}WP_{z_{i}}=WP_{z_{i}}-AX_{i}-BY_{i}-C \tag{14}\]  
Figure 9: PSD setup error. The original surface flatness data of workpiece \(WpD_{i}\) can be obtained by introducing the measurement of triangulation laser \(TL_{i}\):  
\[WpD_{i}=TL_{i}-\text{Lsm}WP_{z_{i}} \tag{15}\]  
The workpiece flatness \(WpF\) can then calculated by the relation of the maximum and minimum of \(\text{Lsm}WpD_{i}\) which is obtained by substituting \(WpD_{i}\) into the least-squares equation:  
\[\text{Lsm}WpD_{i}=WpD_{i}-AX_{i}-BY_{i}-C \tag{16}\]  
\[WpF=\frac{\left(\text{Lsm}WpD_{i}\right)_{max}-\left(\text{Lsm}WpD_{i}\right) _{min}}{\sqrt{1+A^{2}+B^{2}}} \tag{17}\]  
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):  
\[ \begin{array}{c}WP_{z}=P1_{z}+D_{LP_{1}}\tan(\theta_{AS})+D_{LP_{1}}\tan( \theta_{Sh_{1}})+\sec(\theta_{Ps_{1}})L_{Por_{1}}-L_{Por_{1}}+P2_{z}\\ +D_{LP_{2}}\tan(\theta_{Sh_{2}})+\sec(\theta_{Ps_{2}})L_{Por_{2}}-L_{Por_{2}} \end{array}  \tag{18}\]  
Taking partial derivatives of \(WP_{z}\) with respect to the uncertainty factors \(D_{LP_{1}}\), \(\theta_{Ps_{1}}\), \(D_{LP_{2}}\), and \(\theta_{Ps_{2}}\), we obtain:  
\[ \begin{array}{c}\triangle WP_{z}=\triangle f\approx df=\ \ \frac{\partial f}{ \partial D_{LP_{1}}}dD_{LP_{1}}+\frac{\partial f}{\partial\theta_{Ps_{1}}}d \theta_{Ps_{1}}+\frac{\partial f}{\partial D_{LP_{2}}}dD_{LP_{2}}+\frac{ \partial f}{\partial\theta_{Ps_{2}}}d\theta_{Ps_{2}}\end{array}  \tag{19}\]  
\[ \begin{array}{c}\frac{\partial f}{\partial D_{LP_{1}}}=\tan(\theta_{AS})+ \tan(\theta_{Sh_{1}})\end{array}  \tag{20}\]  
\[ \begin{array}{c}\frac{\partial f}{\partial\theta_{Ps_{1}}}=\sec(\theta_{Ps_ {1}})\tan(\theta_{Ps_{1}})L_{Por_{1}}\end{array}  \tag{21}\]  
\[ \begin{array}{c}\frac{\partial f}{\partial D_{LP_{2}}}=\tan(\theta_{Sh_{2}}) \end{array}  \tag{22}\]  
\[ \begin{array}{c}\frac{\partial f}{\partial\theta_{Ps_{2}}}=\sec(\theta_{ Ps_{2}})\tan(\theta_{Ps_{2}})L_{Por_{2}}\end{array}  \tag{23}\]  
Finally, the system uncertainty, \(\sigma\), is given by:  
\[