## 3 The Sphere-to-Sphere TCP Calibration Model  
The traditional TCP calibration method employs a point-to-point calibration method, with the general principles of the conventional 4-point calibration method outlined in the literature [12]. This method involves manipulating the robot to bring the TCP tip into contact with fixed points in at least four different orientations, and the industrial robot computes the TCP data based on the positional data of these points. The more calibration points are used, the higher the precision of the TCP points obtained through fitting. However, the point-to-point calibration method has some drawbacks, including the difficulty of strictly achieving point-to-point procedures manually, resulting in calibration and fitting inaccuracies. Therefore, the method may introduce accumulative errors in subsequent tool and workpiece coordinate system calibration, consequently affecting calibration accuracy. To overcome the inherent limitations of the traditional method, this paper employs a sphere-to-sphere calibration method as a replacement for the conventional point-to-point method, effectively mitigating errors arising from manual operations. This method uses a ruby probe sphere instead of a traditional tip pointed calibration rod, as illustrated in Figure 4. A standard sphere is mounted on a magnetic base, and the robot grips the probe. Through the calibration procedure, the robot moves in various orientations toward the standard sphere. Upon contact between the ruby sphere and the standard sphere, a trigger signal is generated, and the robot controller immediately records the current robot pose, accurately achieving the sphere-to-sphere calibration process. Different from the point-to-point calibration method, when calibrating using standard spheres. The traditional solving methods cannot be applied due to \(\frac{B}{E}\mathbf{T}\cdot\frac{E}{\text{tool}}\mathbf{P}\
eq\frac{B}{E} \mathbf{T}\cdot\frac{E}{\text{tool}}\mathbf{P}\). A calibration model is established with the standard sphere as the reference target. \[(X_{Pi}-X_{0})^{2}+(Y_{Pi}-Y_{0})^{2}+(Z_{Pi}-Z_{0})^{2}=(R+r)^{2} \tag{1}\]  
where \((X_{0},Y_{0},Z_{0})\) is the position of the standard sphere center in the base coordinate, with its value unknown; \(R\) and \(r\) are the radius of the standard sphere and the ruby probe; \((X_{Pi},Y_{Pi},Z_{Pi})\) is the position of the probe TCP in the robot base coordinate [B], with  
Figure 3: The schematic of contact probe calibration. \(i\) representing the number of calibration contact points. After the calibration process is completed, the TCP position can be further expressed as  
\[ \begin{bmatrix}x_{T}\\ y_{T}\\ Z_{T}\\ 1\end{bmatrix} = \begin{bmatrix}X_{P}\\ Y_{P}\\ Z_{P}\\ 1\end{bmatrix}  \tag{2}\]  
where \((X_{T},Y_{T},Z_{T})\) is the TCP position parameter to be determined for the ruby probe; \(\frac{E}{B}P\) is the homogeneous transformation matrix from the robot wrist end tool\({}_{0}\) coordinate [E] to the robot base coordinate [B], which can be obtained from the robot controller. Equation (2) can be expressed as  
\[ \begin{bmatrix}n_{x}&o_{x}&a_{x}&X_{Tool}\\ n_{y}&o_{y}&a_{y}&Y_{Tool}\\ n_{z}&o_{z}&a_{z}&Z_{Tool}\\ 0&0&0&1\end{bmatrix}\begin{bmatrix}X_{T}\\ Y_{T}\\ Z_{T}\\ 1\end{bmatrix} = \begin{bmatrix}X_{P}\\ Y_{P}\\ Z_{P}\\ 1\end{bmatrix}  \tag{3}\]  
After expanding Equation (3), it can be simplified to  
\[ \begin{bmatrix}n_{xi}\cdot X_{Ti}+o_{xi}\cdot Y_{Ti}+a_{xi}\cdot Z_{Ti}+X_{Tool }\\ n_{yi}\cdot X_{Ti}+o_{yi}\cdot Y_{Ti}+a_{yi}\cdot Z_{Ti}+Y_{Tool}\\ n_{zi}\cdot X_{Ti}+o_{zi}\cdot Y_{Ti}+a_{zi}\cdot Z_{Ti}+Z_{Tool}\\ \end{bmatrix} = \begin{bmatrix}X_{Pi}\\ Y_{Pi}\\ Z_{Pi}\end{bmatrix}  \tag{4}\]  
After transforming Equation (1), we can establish the objective function as follows:  
\[f(i)=\sqrt{\left(X_{Pi}-X_{0}\right)^{2}+\left(Y_{Pi}-Y_{0}\right)^{2}+\left( Z_{Pi}-Z_{0}\right)^{2}}-\left(R+r\right) \tag{5}\]  
In theory, the more measurement points available, the higher the precision of the TCP obtained through the least squares method.