## 2 Principle and Model
### Error Model Establishment and Analysis  
Various errors will be inevitably introduced in the measurement process. The data from the detectors (QD1, QD2, PSD1, PSD2, and D1) are affected by the six DOF motion errors, installation errors, manufacturing errors, etc. An error model was established to improve the accuracy of our measuring device. The error sources and influences on the measurement results were analyzed using the model, and the corresponding compensation methods were studied. Figure 1: Measurement principle. Figure 2: Schematic diagram of the tracking process. The model was established in a three-dimensional space. The measuring device mainly includes the target rotary axis A, the reference rotary axis B, the error-sensitive unit C, and the measurement unit. The coordinate systems \"1\" to \"4\", fixed to the corresponding parts and moving with them, were established, respectively, as shown in Figure 3. The world coordinate system \"0\" was established, and the initial state of coordinate system, \"1\", coincides with the coordinate system \"0\". The HTM \(T_{n}^{m}\) between the adjacent coordinate systems was established. This matrix can be used to simulate the motion of rotary axes and to realize the coordinate transformation [12]. \(T_{n}^{m}\) represents the transformation matrix from the coordinate system \(m\) to the coordinate system \(n\). We assume that the coordinate system \"1\" is obtained after a series of motions of the coordinate system \"0\". The order of the motions is as follows: first translate \(\delta_{x}\), \(\delta_{y}\), and \(\delta_{z}\); then rotate \(\varepsilon_{x}\), \(\varepsilon_{y}\), and \((\theta+\varepsilon_{z})\). This process defines the six DOF errors. The coefficient matrix \(LC^{4}\) of the output beam equation is defined in the coordinate system \"4\", and the reflection matrix \(R\) is defined in the coordinate system \"3\" [12]. According to Equation (1), the coefficient matrix \(LoutC^{4}\) of the reflected light can be calculated using the HTMs and the reflection matrix. Based on the structure of the measuring device and the ray tracing principle, the expressions of the six DOF motion errors of the rotary axis can be obtained. \[LoutC^{4}=LC^{4}T_{4}^{0}T_{1}^{1}T_{2}^{2}T_{3}^{3}RT_{3}^{2}T_{1}^{1}T_{1}^{0 }T_{0}^{4} \tag{1}\]  
In the error model, angular errors are generally expressed in \(\varepsilon\), and translational errors are expressed in \(\delta\). Different subscripts are used as a distinction. The specific variables and their naming rules are shown in Table 1.  
The data in the horizontal and vertical directions of the detectors are represented by \(Y\) and \(Z\), respectively. PSDs and QDs are distinguished by the subscript. For example, \(Y_{\text{PSD1}}\) is the data in the horizontal direction of PSD1. (\(\theta=0\)) is added, which represents the initial value of the measurement. For example, \(Y_{\text{PSD1}}\) (\(\theta=0\)) is the initial value in the vertical direction of PSD1. The naming of other \begin{table}
\begin{tabular}{c c} \hline
**Error Variables** & **Naming Rules** \\ \hline Motion error & The subscript is the name of the coordinate axis (i.e., \(\varepsilon_{z}\)). \\ \hline \multirow{3}{*}{Installation error} & The name of the axis and two lowercase letters (\(a\), \(b\), and \(c\)) are used as the \\  & subscript (i.e., \(\varepsilon_{\text{sup}}\) denotes the angular error around the \(y\) axis between A and B). \\  & The subscript of the measurement unit is \(L\) (i.e., \(\varepsilon_{yL}\)). \\ \hline Manufacturing error & The subscript is the name of the axis and the letter \(c\) (i.e., \(\varepsilon_{yc}\)). \\ \hline Laser beam drift error & The subscript is the name of the axis and the letter \(t\) (i.e., \(\varepsilon_{yt}\)). \\ \hline \end{tabular}
\end{table} 
Table 1: Error variables and the naming rules. Figure 3: Schematic diagram of the experimental setup and coordinate systems.