## 3 Robot Error Prediction and Accuracy Compensation Method
### Anisotropy Analysis of Robot Positioning Error Distribution in Configuration Space  
The spatial correlation of robot errors in configuration space can be represented through semivariograms based on the joint angle dataset \(\mathbf{Q}\) and the corresponding positioning error dataset \(\mathbf{E}\). Furthermore, utilizing the semivariogram to establish a semivariance map, calculate the covariance vector, and solve for the error weights enables an effective approach for the unbiased estimation of robot errors at any position [20; 31; 32]. To achieve this objective, it is essential to first define the range of the task workspace based on the operational requirements and actual environmental constraints of the robot. According to this defined range, uniform sampling of joint angles is performed in the configuration space, following the method shown in Figure 9, and the actual robot errors at these sampled points are measured. While the task workspace defined in Cartesian space has a regular shape, its uniformly sampled joint angles in configuration space often exhibit irregular distributions. To eliminate the scale differences in the sampling points across different joints, the mean values \(\mathbf{\mu}^{joint}\), \(\mathbf{\mu}^{error}\) and the standard deviations \(\sigma^{joint}\), \(\mathbf{\sigma}^{error}\) of the datasets \(\mathbf{Q}\) and \(\mathbf{E}\) are calculated. Then, the joint angles and positioning errors are standardized to produce \(\mathbf{Q}^{std}\) and \(\mathbf{E}^{std}\). To establish an empirical semivariogram for the standardized sampling data, the distance \(\mathbf{H}\) between the joint angles of any two points is first calculated as  
\[\mathbf{H}=\left\{h_{ij}\middle|h_{ij}=\left\|\mathbf{Q}_{i}^{std}-\mathbf{Q}_{j}^{std} \right\|,0\leq i<j\leq n\right\},\;\mathbf{H}\in\mathbb{R}^{n(n-1)/2} \tag{12}\]  
and, based on the range of values in \(\mathbf{H}\), 20 equally spaced intervals are set. The midpoints of these intervals are defined as \(\mathbf{h}=[h_{0},h_{1},\ldots,h_{20}]\), where \(h_{0}=\mathbf{H}_{min}\) and \(h_{20}=\mathbf{H}_{max}\). The empirical semivariance value in the interval \([h_{l},h_{l+1}]\) of the positioning error components along the x-axis, y-axis, and z-axis is denoted as  
\[\gamma_{x,y,z}(h_{l})=\frac{1}{2N(h_{l},h_{l+1})}\sum_{i,j:h_{ij}\in[h_{l},h_ {l+1}]}\left(\mathbf{e}_{i(x,y,z)}^{std}-\mathbf{e}_{j(x,y,z)}^{std}\right)^{2} \tag{13}\]  
According to the semivariograms of the robot errors distributed in configuration space, as shown in Figure 10a, the semivariance at the starting point of the joint angles distance is close to zero, indicating a small nugget effect. And the semivariance gradually increases with the distance, showing that the components of positioning errors along the x-, y-, and z-axis exhibit significant spatial similarity in configuration space. However, due to the serial layout of the robot rotation joints, the six dimensions of joint angles have a notably strong correlation in the position errors of TCP. Therefore, despite the error spatial similarity observed in Cartesian space generally showing consistent distribution characteristics across the x, y, and z dimensions [18], the error spatial similarity observed in configuration space may exhibit significant anisotropy across different joint angle dimensions. To verify this hypothesis, the robot errors are separately expanded along the six joint dimensions, and the empirical semivariance distribution characteristics of the robot errors in each of the six joint dimensions are analyzed. The semivariograms of robot errors in configuration space, where **(a)** shows the semivariogram of the x-, y-, and z-axis error components with respect to the distance of joint angles; **(b)** shows the semivariogram of the X-axis error component expanded across the six joint dimensions; **(c)** shows the semivariogram of the Y-axis error component expanded across the six joint dimensions; **(d)** shows the semivariogram of the Z-axis error component expanded across the six joint dimensions.