## 2 Methods
### Regionalized Calibration of TCP  
Since the calibration error of frames is hard to eliminate, we use \([BR]\), \(\{[WR]\) and \([TR]\) to represent the actual base, wrist and TCP frames, which can be fitted by measuring apparatus. \([B]\), \(\{W\}\) and \([T]\) represent the theoretical frames of the robot, which cannot be obtained by measurement. The transformation relationships between the frames are represented as  
\[\begin{array}{c}\text{World }T_{\text{BR}}\cdot\text{}^{\text{BR}}\,T_{\text{WR}} \cdot\text{}^{\text{WR}}\,T_{\text{TR}}=\text{World}\,T_{\text{TR}}\\ \text{World }T_{\text{B}}\cdot\text{}^{\text{B}}\,T_{\text{W}}\cdot\text{}^{\text{W}} \,T_{\text{T}}=\text{World}\,T_{\text{T}}\end{array} \tag{16}\]  
Assuming that the desired TCP frame of the robot is \([TD]\) when the TCP moves to the desired position, the following equation holds,  
\[\begin{array}{c}\text{TR}\text{T}_{\text{TD}}=\begin{bmatrix}\mathbf{I}_{3 \times 3}&\mathbf{O}_{3\times 1}\\ \mathbf{O}_{1\times 3}&1\end{bmatrix}\end{array} \tag{17}\]  
In other words, should the TCP reach the desired position, \([TR]\), which coincides with \(\{[TD]\), Equation (17) must be strictly satisfied. However, because of the calibration error of the base frame \(\Delta\,^{\text{World}}\,T_{\text{B}}\), TCP frame \(\Delta\,^{\text{W}}\,T_{\text{T}}\) and robot kinematics error \(\Delta\,^{\text{B}}\,T_{\text{W}}\), Equation (17) is hard to hold strictly. The relationship between actual frames, theoretical frames and errors can be formulated as  
\[\begin{array}{c}\text{World }T_{\text{B}}\cdot\Delta\,^{\text{World}}\,T_{\text{B}} =\text{World}\,T_{\text{BR}}\\ \text{}^{\text{B}}\,T_{\text{W}}\cdot\Delta\,^{\text{B}}\,T_{\text{W}}=\text{ }^{\text{BR}}\,T_{\text{WR}}\\ \text{}^{\text{B}}\,T_{\text{W}}\cdot\Delta\,^{\text{W}}\,T_{\text{T}}=\text{ }^{\text{WR}}\,T_{\text{TR}}\end{array} \tag{18}\]  
Substituting Equation (18) into Equation (16), one can obtain  
\[\begin{array}{c}\text{World }T_{\text{B}}\cdot\Delta\,^{\text{World}}\,T_{\text{B}} \cdot\text{}^{\text{B}}\,T_{\text{W}}\cdot\Delta\,^{\text{B}}\,T_{\text{W}} \cdot\,^{\text{W}}\,T_{\text{T}}\cdot\Delta\,^{\text{W}}\,T_{\text{T}}=\text{ World}\,T_{\text{TR}}\end{array} \tag{19}\]  
As mentioned in Section 2.1, the error similarity of the robot in the whole workspace is reduced due to the existence of TCP calibration error. To solve the problem above, regionalized error similarity is proposed. The robot workspace can be divided into several regions to be calibrated. Assuming that the positioning error at the center of each region can be reduced as much as possible, the positioning error of all desired positions in this area can be reduced. In order to realize the assumption, control \([TR]\) to make it as close to the center of the region as possible. Afterward, calibrate the \([WR]\) by the relationship between \(\{[B]\) and \(\{W\}\). Then calibrate \(\{TR\}\) at the center point denoted as \(\{TDR\}\). Finally, calculate the relationship between \(\{TDR\}\) and \(\{WR\}\) by  
\[\begin{array}{c}\text{World }T_{\text{BR}}\cdot\text{}^{\text{B}}\,T_{\text{W}} \cdot\text{}^{\text{WR}}\,T_{\text{TDR}}=\text{World}\,T_{\text{TDR}}\end{array} \tag{20}\]  
By combining Equations (18), (19) and (20), one can obtain  
\[\begin{array}{c}\text{World }T_{\text{TR}}=\text{}^{\text{World}}\,T_{\text{TDR}} \\ \text{WR }T_{\text{TDR}}=\Delta\,^{\text{B}}\,T_{\text{W}}\cdot\text{}^{\text{W}} \,T_{\text{T}}\cdot\Delta\,^{\text{W}}\,T_{\text{T}}\end{array} \tag{21}\]  
Equation (21) shows that when \(\text{}^{\text{WR}}\,T_{\text{TDR}}\) is used as \(\text{}^{\text{W}}\,T_{\text{T}}\), although actual frames \([BR]\) and \(\{WR\}\) cannot coincide with theoretical frames \([B]\) and \(\{W\}\), it eliminates the kinematics error and TCP calibration uncertainties. As a result, the positioning error of TCP reduces in the whole region.