# A Self-Calibration Method for Robot End-Effector Using Spherical Constraints
## 3 Parameter Identification  
### Spherical Constraint Model  
For a typical 6-DOF serial robot, due to the presence of errors, the homogeneous transformation matrix of the end-effector coordinate frame relative to the base frame can be expressed as Equation (23).  
\[\prescript{0}{t}T^{R}=\Big{(}T_{1}^{N}+\mathrm{d}T_{1}\Big{)}\Big{(}T_{2}^{N}+ \mathrm{d}T_{2}\Big{)}\cdots\Big{(}T_{6}^{N}+\mathrm{d}T_{6}\Big{)}T_{t} \tag{23}\]  
By ignoring higher-order terms, we obtain Equation (24).  
\[\prescript{0}{t}T^{R}=\prescript{0}{t}T^{N}+\sum_{i=1}^{6}\prescript{0}{t-1}T^{N} \Delta_{i}\Big{(}\prescript{0}{i-1}T^{N}\Big{)}^{-1}\prescript{0}{t}T^{N}= \prescript{0}{t}T^{N}+\Delta_{t}^{0}T^{N} \tag{24}\]  
The above equation can also be expressed as follows as Equation (25):  
\[\begin{bmatrix}R^{R}&\mathbf{p^{R}}\\ 0^{T}&1\end{bmatrix}=\begin{bmatrix}R^{N}&\mathbf{p^{N}}\\ 0^{T}&1\end{bmatrix}+\Delta\begin{bmatrix}R^{N}&\mathbf{p^{N}}\\ 0^{T}&1\end{bmatrix} \tag{25}\]  
where \(R\) is the rotation matrix, \(p\) is the translation vector and \(\Delta\) represents the differential operator matrix. The self-calibration method proposed in this paper establishes constraint equations based on spherical constraints, requiring only the positional information of the end-effector coordinate frame without the need for orientation data. The actual position of the end-effector coordinate frame can be expressed as Equation (26).  
\[\begin{bmatrix}p_{x}^{R}\\ p_{y}^{R}\\ p_{z}^{R}\end{bmatrix}=\begin{bmatrix}1&0&0&0&p_{z}^{N}&-p_{y}^{N}\\ 0&1&0&-p_{z}^{N}&0&p_{x}^{N}\\ 0&0&1&p_{y}^{N}&-p_{x}^{N}&0\end{bmatrix}\begin{bmatrix}\mathrm{d}x\\ \mathrm{d}y\\ \mathrm{d}z\\ \delta x\\ \delta z\end{bmatrix}+\begin{bmatrix}p_{x}^{N}\\ p_{y}^{N}\\ p_{z}^{N}\end{bmatrix} \tag{26}\]  
Substituting Equation (22) into this, we obtain Equation (27).  
\[\mathbf{p^{R}}=AX+\mathbf{p^{N}} \tag{27}\]  
The matrix \(A\) represents the pose error at the robot's end-effector and is a 3 \(\times\) 25 matrix. The physical constraint introduced in this paper is a spherical constraint. During the calibration process, a calibration sphere with a known diameter is used. When the robot's end-effector contacts the surface of the calibration sphere, its actual position must satisfy the following Equation (28).  
\[\Big{(}p_{x}^{R}-x_{c}\Big{)}^{2}+\Big{(}p_{y}^{R}-z_{c}\Big{)}^{2}+\Big{(}p_{ z}^{R}-z_{c}\Big{)}^{2}=R^{2} \tag{28}\]  
Here, \(x_{c}\), \(y_{c}\) and \(z_{c}\) represent the unknown coordinates of the calibration sphere in the base coordinate frame, while \(R\) is the known radius of the calibration sphere. By substituting these variables into Equation (27) and treating \(x_{c}\), \(y_{c}\) and \(z_{c}\) as parameters to be identified, we derive Equation (29).  
\[\mathbf{p^{R}}-\mathbf{p_{c}}=\widetilde{A}\widetilde{\mathbf{X}}+\mathbf{p^{N}} \tag{29}\]  
Here, \(\mathbf{p_{c}}=[x_{c},y_{c},z_{c}]^{T}\) represents the coordinates of the calibration sphere, \(\widetilde{A}=[A|-I_{3\times 3}]\) is the augmented matrix of the robot's end-effector error pose transformation matrix, and \(\widetilde{\mathbf{X}}=\big{[}\mathbf{X}^{T}\mathbf{p_{c}}^{T}\big{]}\) contains all the parameters to be identified, including the coordinates of the calibration sphere. From the constraint Equation (28), we obtain Equation (30).  
\[\left(\widetilde{A}\widetilde{\widetilde{\mathbf{X}}}+\mathbf{p}^{\mathbf{N}}\right)^{T} \left(\widetilde{A}\widetilde{\widetilde{\mathbf{X}}}+\mathbf{p}^{\mathbf{N}}\right)=R^{2} \tag{30}\]