# Modeling and Compensation of Motion Errors for 6-DOF Robotic Manipulators
## 3 Trajectory Compensation Based on Stiffness Modeling
### Error Compensation Model for a 6-DOF Manipulator
#### 3.3.2 Manipulator Arm Link Stiffness  
For the joint link \(i\), its stiffness can be expressed as  
\[k_{i}=\left[\begin{array}{cccc}k_{ix}&k_{iy}&k_{iz}&k_{i\beta}&k_{i\gamma}&k _{i\varphi}\end{array}\right] \tag{21}\]  
where \(\left[k_{ix},k_{iy},k_{iz}\right]\) and \(\left[k_{i\beta},k_{i\gamma},k_{i\varphi}\right]\) represent translational stiffness and rotational stiffness, respectively. In addition, the force \(f\) on the joint link \(i\) can be expressed as  
\[f_{i}=\left[\begin{array}{cccc}f_{ix}&f_{iy}&f_{iz}&m_{ix}&m_{iy}&m_{iz}\end{array}\right] \tag{22}\]  
where \(f_{ix}\), \(f_{iy}\), and \(f_{iz}\) are the forces in the X direction, Y direction, and Z direction, respectively, and \(m_{ix}\), \(m_{iy}\), and \(m_{iz}\) represent the torque on the link. The force and torque transmitted from the end of the manipulator to arm link \(i\) can be calculated by the following formulas:  
\[\left\{\begin{array}{c}f_{ix}=\mathbf{n}\cdot\text{F}_{0}\\ f_{iy}=\mathbf{o}\cdot\text{F}_{0}\\ f_{iz}=\mathbf{a}\cdot\text{F}_{0}\end{array}\right. \tag{23}\]\[\left\{\begin{array}{l}m_{ix}=\cdot[F_{0}\times p+m]\\ m_{iy}=\cdot[F_{0}\times p+m]\\ m_{iz}=\cdot[F_{0}\times p+m]\end{array}\right. \tag{24}\]  
\(n=\left(n_{x},n_{y},n_{z}\right)\), \(o=\left(o_{x},o_{y},o_{z}\right)\), \(a=\left(a_{x},a_{y},a_{z}\right)\), and \(p=\left(p_{x},p_{y},p_{z}\right)\), can be obtained from Equation (2) when the generalized forces and generalized stiffness at the end of the manipulator are known; the generalized displacement deformation of the manipulator arm link is  
\[\delta_{i}=[\Delta x_{i1}\ \Delta y_{i1}\ \Delta l_{i}\ \Delta x_{i2}\ \Delta y_{i2}\ \phi_{i}] \tag{25}\]  
where \(\Delta x_{i1}=\frac{f_{ix}}{k_{ix}}\), \(\Delta y_{i1}=\frac{f_{ix}}{k_{y}}\), \(\Delta l_{i}=\frac{f_{iz}}{k_{z}}\), \(\Delta y_{i2}=\frac{m_{iy}}{k_{yz}}\), and \(\phi_{i}=\frac{m_{iz}}{k_{yz}}\).  
The displacement deformation \(\delta_{i}\) can be obtained by the following material mechanics formula, which is hard to apply to the quantitative measurement of the positioning error of the manipulator end, and will be replaced by the result of the finite element analysis.  
Thus, the error \(\delta_{l}\) caused by the stiffness of the total joint arm link can be calculated:  
\[\delta_{l}=\sum_{i=1}^{n}\delta_{i}(n=6) \tag{26}\]  
According to the deformation \(\delta_{1}\) caused by the stiffness of the manipulator link and the deformation \(\delta_{\theta}\) caused by the stiffness of the joint, the total deformation \(\delta\) of the industrial robot can be obtained:  
\[\delta=\delta_{l}+\delta_{\theta} \tag{27}\]  
The generalized force \(F\) on the operating end of the manipulator is  
\[F=\left[f_{x},f_{y},f_{z},m_{x},m_{y},m_{z}\right] \tag{28}\]  
where \(f_{x},f_{y}\), and \(f_{z}\) are the forces in the X direction, Y direction, and Z direction, respectively, and \(m_{x},m_{y}\), and \(m_{z}\), respectively, represent the torque on the link. \(F\) is the generalized force exerted on the end, \(\delta\) is the generalized deformation of the end, and then the total space stiffness of the manipulator can be obtained:  
\[k=\frac{F}{\delta} \tag{29}\]