## 2 Error Tooth Surface Model of Cycloid Gear and Pin
According to gear conjugate theory and coordinate transformation principle, the coordinates of the element control points of the cycloid gear and pin considering PMs and MEs are given as:  
\[\left[ \begin{array}{c}X_{\text{c}2}^{n_{c}i_{c}j_{c}}\\ Y_{\text{p}}^{n_{c}i_{c}j_{c}}\\ Z_{\text{p}}^{n_{c}i_{c}j_{c}}\end{array} \right]=\left[ \begin{array}{c}\big{(} R_{\text{p}}+\Delta R_{\text{p}}\big{)}\cos\left(\phi_{\text{p}}^{n_{c}i_{c}j_{c}} /z_{\text{c}}\right)-\big{(}R_{\text{rp}}+\Delta R_{\text{rp}}+\delta^{n_{c}i_ {c}j_{c}}\big{)}\cos\left(\alpha-\phi_{\text{p}}^{n_{c}i_{c}j_{c}}/z_{\text{c} }\right)-e\cos\left(z_{\text{p}}\phi_{\text{p}}^{n_{c}i_{c}j_{c}}/z_{\text{c} }\right)\\ \big{(}R_{\text{p}}+\Delta R_{\text{p}}\big{)}\sin\left(\phi_{\text{p}}^{n_{c} i_{c}j_{c}}/z_{\text{c}}\right)+\big{(}R_{\text{rp}}+\Delta R_{\text{rp}}+\delta^{n_{c}i_ {c}j_{c}}\big{)}\sin\left(\alpha-\phi_{\text{p}}^{n_{c}i_{c}j_{c}}/z_{\text{c} }\right)-e\sin\left(z_{\text{p}}\phi_{\text{p}}^{n_{c}i_{c}j_{c}}/z_{\text{c} }\right)\\ B_{\text{c}}-B_{\text{c}}(i_{\text{c}}-1/2)/n_{1\text{c}}\end{array} \right], \tag{4}\]  
\[\left[ \begin{array}{c}X_{\text{p}}^{n_{p}i_{p}j_{p}}\\ Y_{\text{p}}^{n_{p}i_{p}j_{p}}\\ Z_{\text{p}}^{n_{p}i_{p}j_{p}}\end{array} \right]=\left[ \begin{array}{c}\big{(} R_{\text{p}}+\delta_{\text{Rp}}\big{/}2\big{)}\cos\left[2\pi(n_{\text{p}}-1 )\big{/}z_{\text{p}}+\sum\limits_{z=1}^{n_{\text{p}}}f_{\text{pt}}^{2}\big{/} \big{(}R_{\text{p}}+\delta_{\text{Rp}}/2\big{)}\right]+\big{(}R_{\text{rp}}+ \delta^{n_{\text{rp}}i_{\text{p}}j_{p}}\big{)}\cos\left[2\pi(j_{\text{p}}-1/2) \big{/}n_{2\text{p}}\right]\\ \big{(}R_{\text{p}}+\delta_{\text{Rp}}/2\big{)}\sin\left[2\pi(n_{\text{p}}-1 )\big{/}z_{\text{p}}+\sum\limits_{z=1}^{n_{\text{p}}}f_{\text{pt}}^{2}\big{/} \big{(}R_{\text{p}}+\delta_{\text{Rp}}/2\big{)}\right]+\big{(}R_{\text{rp}}+ \delta^{n_{\text{rp}}i_{\text{p}}j_{p}}\big{)}\sin\left[2\pi(j_{\text{p}}-1 /2)\big{/}n_{2\text{p}}\right]\\ B_{\text{p}}-B_{\text{p}}\big{(}i_{\text{p}}-1/2\big{)}/n_{1\text{p}}\end{array} \right], \tag{5}\]  
where the subscript c2 in Equation (4) represents the tooth surfaces of a cycloid gear with PMs and MEs, and the superscripts \(n_{\text{p}}\), \(i_{\text{p}}\), and \(j_{\text{p}}\) indicate the \(i_{\text{p}}\times j_{\text{p}}\) element on the \(n_{\text{p}}^{\text{th}}\) pin, and \(\delta^{n_{c}i_{c}j_{c}}\) and \(\delta^{n_{c}i_{c}j_{c}}\) and \(\delta^{n_{c}i_{c}j_{c}}\) are the profile deviation of each element of the cycloid gear and pin, respectively. \(B_{\text{p}}\) is the tooth width of a pin, and \(f_{\text{pt}}^{2}\) is the single pitch deviation of the \(z^{\text{th}}\) pin. It is known that the MEs of a gear are distributed according to a probability in their tolerance ranges. Thus, \(\delta^{n_{c}i_{c}j_{c}}\), \(\delta^{n_{p}i_{p}j_{p}}\), \(f_{\text{pt}}^{2}\), and \(\delta_{\text{Rp}}\) can be obtained through different probability distribution functions according to their tolerance ranges. Additionally, the pitch deviation of the pin (\(f_{\text{pt}}^{z}\)) must also meet the tolerance range of the total cumulative pitch deviation (\(F_{\text{p}}\)). The part of the tooth surface of cycloid gear considering PMs and MEs is shown in Figure 3a, and it is composed of multiple discrete elements with different distances from the perfect tooth surface. Similarly, the tooth surface of the pin considering MEs has the same characteristics. Figure 3b shows the definition of the AEs in this study. The AEs of cycloid gear and pin are equivalently transferred to the axis position of the cycloid gear to simplify the error tooth surface model. \(AB\) is the theoretical axis position of the cycloid gear without AEs, and \(A_{\text{cae}}B_{\text{cae}}\) is the new axis position of the cycloid gear when the AEs are considered. The AEs are indicated by four parameters, where \(\Delta x\) and \(\Delta y\) are called the center distance deviations, and \(\varphi\) and \(\gamma\) are the misalignment deviations on the \(XBZ\)-plane and the \(YBZ\)-plane, respectively.