# Joint Stiffness Identification Based on Robot Configuration Optimization Away from Singularities
## 2 Kinematic and Stiffness Modeling
### Kinematic Modeling  
As shown in Figure 1, link frames based on the DHm model are established, numbered 0 to 6. Among them, the Frame 0 is the base frame, which origin is located at the robot base and is solidly connected to the ground as a reference frame to describe the poses of other joints of the robot. The DHm parameters of the KUKA KR60-3 robot are shown in Table 1. The link frames are defined as:  
1. \(\mathbf{A}_{i}\) is axis \(i\). 2. \(\mathbf{Z}_{i}\) is along joint \(i\), and the \(\mathbf{X}_{i}\) is along the common normal between \(\mathbf{A}_{i}\) and \(\mathbf{A}_{i-1}\). The choice of \(\mathbf{X}_{i}\) is not unique if the axes \(\mathbf{Z}_{i}\) and \(\mathbf{Z}_{i+1}\) are parallel. For convenience, direction from \(\mathbf{A}_{i}\) to \(\mathbf{A}_{i+1}\) is provided. 3. \(\mathbf{Y}_{i}\) is chosen to form a right-handed coordinate system. \begin{table}
\begin{tabular}{c c c c} \hline
**Link \(i\)** & \(\mathbf{d_{i}/mm}\) & \(\mathbf{a_{i-1}/mm}\) & \(\mathbf{a_{i-1}}^{\mathrm{o}}\) \\ \hline
1 & 815 & 0 & 0 \\
2 & 0 & 350 & \(-90\) \\
3 & 0 & 850 & 0 \\
4 & 820 & 145 & \(-90\) \\
5 & 0 & 0 & 90 \\
6 & 170 & 0 & \(-90\) \\ \hline \end{tabular}
\end{table} 
Table 1: DHm parameterization of KUKA KR60-3. The Jacobian matrix \(\mathbf{J}\) of the robot describes the relationship between the end-effector linear and angular velocities and the joint velocities [27]. The differential kinematics equation is  
\[\mathbf{v}_{e}= \begin{bmatrix}\dot{\mathbf{p}}_{e}\\ \mathbf{\omega}_{e}\end{bmatrix} =\mathbf{J}(\mathbf{q})\dot{\mathbf{q}} \tag{1}\]  
where Equation (1) expressed the end-effector linear velocity \(\dot{\mathbf{p}}_{e}\) and angular velocity \(\mathbf{\omega}_{e}\) as a function of the joint velocities \(\dot{\mathbf{q}}\). The \((6\times n)\) Jacobian matrix \(\mathbf{J}\) is the geometric Jacobian:  
\[\mathbf{J}= \begin{bmatrix}J_{P}\\ J_{O}\end{bmatrix}  \tag{2}\]  
where \(\mathbf{J}_{P}\) and \(\mathbf{J}_{O}\) are the \((3\times n)\) matrices relating the contribution of \(\dot{\mathbf{q}}\) to \(\dot{\mathbf{p}}_{e}\) and \(\mathbf{\omega}_{e}\), respectively. Equation (2) is the joint variables' function in general. The \((3\times 1)\) column vectors \(\mathbf{J}_{Pi}\) and \(\mathbf{J}_{Oi}\) as follows can be used to divide the Jacobian:  
\[\mathbf{J}= \begin{bmatrix}J_{P1}&\cdots&\mathbf{J}_{Pn}\\ \vdots&\ddots&\vdots\\ J_{O1}&\cdots&J_{On}\end{bmatrix}  \tag{3}\]  
where  
\[ \begin{bmatrix}J_{Pi}\\ J_{Oi}\end{bmatrix} = \begin{cases}\begin{bmatrix}z_{i-1}\\ \mathbf{0}\end{bmatrix}&\text{prismatic joint}\\ \begin{bmatrix}z_{i-1}\times(\mathbf{p}_{e}-\mathbf{p}_{i-1})\\ z_{i-1}\end{bmatrix}&\text{revolute joint}\end{cases}  \tag{4}\]  
where \(\mathbf{z}_{i-1}\) is the unit vector of the joint \(i\) axis. Considering \(n=6\), the Jacobian matrix can be divided into four \((3\times 3)\) matrix parts:  
\[\mathbf{J}= \begin{bmatrix}\mathbf{J}_{11}&\mathbf{J}_{12}\\ \mathbf{J}_{21}&\mathbf{J}_{22}\end{bmatrix}  \tag{5}\]  
Figure 1: Link frames of KUKA KR60-3. where the expressions of the two right parts are as follows, respectively, since the outer three joints are revolute:  
\[\mathbf{J}_{12}= \begin{bmatrix}\mathbf{z}_{3}\times(\mathbf{p}_{e}-\mathbf{p}_{3})&\mathbf{z}_{4} \times(\mathbf{p}_{e}-\mathbf{p}_{4})&\mathbf{z}_{5}\times(\mathbf{p}_{e}-\mathbf{p}_{5})\end{bmatrix}  \tag{6}\]  
\[\mathbf{J}_{22}= \begin{bmatrix}\mathbf{z}_{3}&\mathbf{z}_{4}&\mathbf{z}_{5}\end{bmatrix}  \tag{7}\]  
Singularities are irrelevant to the choice of the frames to describe the kinematics, which are dependent on the mechanical structure. Therefore, select the origin of the EE frame at the intersection of the wrist axes and choose \(\mathbf{p}=\mathbf{p}_{w}\) which leads to  
\[\mathbf{J}_{12}= \begin{bmatrix}\mathbf{0}&\mathbf{0}&\mathbf{0}\end{bmatrix}  \tag{8}\]  
For \(i=3,4,5\), no matter how the frame is chosen, all vectors \(\mathbf{p}_{w}-\mathbf{p}_{i}\) are parallel to the unit vector \(\mathbf{z}_{i}\).