# Calibration of Rotary Encoders Using a Shift-Angle Method
## 2 Theory and Configuration  
### Shift-Angle Method for Polygon  
Figure 1a shows a schematic of the calibration setup. An autocollimator is placed in front of a rotary encoder. A 24-faced polygon is mounted at the center of the rotary encoder. The 24-faced polygon is used in this study to illustrate the related theory and to conduct experiments [15]. A polygon with any number of faces can be used in practice. The polygon has 24 reflecting faces as the measuring faces. The autocollimator is aligned and collimated to reflect the faces of the polygon. In the ideal polygon, the measuring faces are the same as the nominal faces. The measuring face (R) and the nominal face (N) are slightly tilted with respect to each other, as indicated in Figure 1b. For the 24-faced polygon, it is assumed that one full circle is divided into 24 nominal faces. The angle interval between two consecutive nominal faces is  
Figure 1: (**a**) Diagram of the 24-faced polygon. (**b**) Enlarged view of the red circle highlighted in (**a**). \(15^{\circ}\), which is called the nominal pitch angle. The pitch angle deviation \(\beta_{\mathrm{i}}\) is the difference between the angle values of two adjacent measuring faces and the nominal pitch angle of \(15^{\circ}\). Each measuring face has a different pitch angle deviation. Therefore, in our case, the 24-faced polygon exhibits 24 angle deviations. According to the circle closure principle, the summation of all the angle deviations must be zero. \[\sum_{\mathrm{i=1}}^{24}\beta_{\mathrm{i}}=0 \tag{1}\]  
The rotary encoder is calibrated to determine the angle error \(\alpha\) (\(\theta\)), which is the angle deviation between the measured and true angles. As illustrated in Figure 2, the angle error \(\alpha\) (\(\theta+S\)) is the angle error of the rotary encoder at (\(\theta+S\))\({}^{\circ}\), where \(S\) is the shift-angle. Traditionally, the 24-faced polygon can be used to measure rotary encoder angles \(\theta\) of \(0^{\circ}\), 15\({}^{\circ}\),..., 345\({}^{\circ}\) in steps of 15\({}^{\circ}\). In contrast, with the proposed shift-angle method, rotary encoder angles of \(0^{\circ}+S\), 15\({}^{\circ}+S\),..., 345\({}^{\circ}+S\) in steps of 15\({}^{\circ}\) can be measured. According to the circle closure principle, the summation of the angle errors \(\alpha\) (\(\theta+S\)) for a full circle must be zero:  
\[\sum_{\mathrm{i=1}}^{24}\alpha\{\ (\mathrm{i-1})\times 15^{\circ}+\mathrm{S}\ \}=0 \tag{2}\]  
The angle error of the rotary encoder cannot be measured directly by using an autocollimator and a polygon, because the measured values using an autocollimator contain the angle error of the rotary encoder, the pitch angle deviation of the 24-faced polygon, and setup errors. The misalignment between the rotary encoder and the polygon causes setup errors, which remain constant at different angle positions. The rotary encoder is rotated with \(0^{\circ}+S\) as the starting angle. The first face of the 24-faced polygon, as the starting face, is adjusted to a starting angle of \(0^{\circ}+S\). The autocollimator measures the angle error \(\alpha\) (\(0^{\circ}+S\)), the pitch angle deviation \(\beta_{\mathrm{1}}\), and the setup error \(U_{\mathrm{1}}\). The rotary encoder is rotated in one step at 15\({}^{\circ}\). The autocollimator then measures the angle error \(\alpha\) (\(15^{\circ}+S\)), the summation of the pitch angle deviations (\(\beta_{\mathrm{1}}+\beta_{\mathrm{2}}\)), and the setup error \(U_{\mathrm{1}}\). Overall, the rotary encoder rotates to an angle of 345\({}^{\circ}+S\) in 23 steps. In this case, the autocollimator measures the angle error \(\alpha\) (345\({}^{\circ}+S\)), the summation of the pitch angle deviations of the first to the 24 th faces, and the setup error \(U_{\mathrm{1}}\). When the measurement starts from the \(j\)th face, the polygon has to be shifted on the rotary encoder so that different setup errors \(U_{\mathrm{j}}\) depending on the \(j\) number occur. Figure 2: Schematic of the calibration value determination.