## 3 Establishment and Simulation of the Error Model
### Ray Tracing and Error Representation
#### 3.2.1 Angular Positioning Error and Tilt Motion Error around Y Axis  
When calculating the six DOF motion errors of a rotary axis according to the relationship between the ray tracing method and the spatial geometric coordinates, it is necessary to transform all rays, reflection surfaces, and receiving surfaces into the same coordinate system by using the matrix coordinate transformation. The exit light of autocollimator AC1 is defined in CS4, and its reflection surface of the polyhedral prism is defined in CS3. The incident light of AC1 can be obtained by converting the outgoing light of AC1 to the reflection in CS3, and then converting the reflected light to CS4. The coefficient matrix of the incident light is shown in Equation (7).  
\[LoutLP=LPT^{0}_{4}T^{1}_{1}T^{2}_{2}T^{3}_{R}P^{3}_{2}T^{1}_{2}T^{0}_{1}T^{3}_ {4} \tag{7}\]  
The plane where the incident light is received by AC1 is x = \(L_{r}\). The coordinate SC\((X_{SC},Y_{SC},Z_{SC})\) of the autocollimator's incident point can be obtained from the incident ray and the receiving surface. The reflection surface of the polyhedral prism is defined x = \(Pin^{3}_{x}\) in CS3, which can be transformed into CS4 and expressed as shown in Equation (8).  
\[\left[\begin{array}{ccccc}1&0&0&-Pin^{3}_{x}\\ \end{array}\right]T^{4}_{3}\left[\begin{array}{c}X^{4}\\ Y^{4}\\ Z^{4}\\ 1\\ \end{array}\right]=0 \tag{8}\]  
In CS4, the coordinates of the reflection point PH can be obtained from the incident light and the reflector. The rotation angle around the \(Z\) axis measured by AC1 is denoted as \(\theta_{SCz}\). According to the geometric position relationship, \(\theta_{SCz}\)=\(\frac{|Y_{SC}-P^{4}_{y}|}{2|X^{4}_{BH}-X^{4}_{SC}|}\).  
The rotation angle \(\theta\) is zero at the initial timepoint. We can eliminate some of the system errors by setting all errors' initial values to zero, so as to obtain the rotation angular positioning error:  
\[\varepsilon_{z}=\theta_{SCz}-\theta_{SCz(t=0)}+\varepsilon_{pz}-\varepsilon_{ pz(t=0)} \tag{9}\]\(\theta_{SCz(t=0)}\) is the value of the autocollimator AC1 at the initial timepoint \(\varepsilon_{pz(t=0)}\) is the manufacturing error of the first working surface of the polyhedral prism.  
Only the manufacturing error \(\varepsilon_{pz}\) will affect the angular positioning error, and the influences of the installation errors and manufacturing errors of other components can be neglected. The manufacturing errors of each working surface of the polyhedral prism are constant values, which does not affect repeatability. The measurement data can be compensated by measuring the manufacturing errors of each working surface.  
Similarly, the tilt motion error of a rotary axis around the \(Y\)-axis can be obtained:  
\[\varepsilon_{y}=\theta_{SCy}-\theta_{SCy(t=0)}-\varepsilon_{py}cos\theta+ \varepsilon_{py(t=0)}-\varepsilon_{xbc}sin\theta-\varepsilon_{ybc}cos\theta+ \varepsilon_{ybc} \tag{10}\]  
In the formula, \(\theta_{SCy}\) is the angle value of the Y direction measured by the AC1.  
The perpendicularity error \(\varepsilon_{py}\) and the installation errors \(\varepsilon_{xbc}\) and \(\varepsilon_{ybc}\) have an effect on the measurement of the tilt motion error around the Y axis and are related to the rotation angle of the target rotary axis. Among them, \(\varepsilon_{py}cos\theta\), \(\varepsilon_{xbc}sin\theta\), and \(\varepsilon_{ybc}cos\theta\) are trigonometric function terms, and \(\varepsilon_{py(t=0)}\) and \(\varepsilon_{ybc}\) are constant terms. These errors can be compensated by the triangular fitting method.