# Modeling and Compensation of Motion Errors for 6-DOF Robotic Manipulators
## 4 Simulation Studies for a 6-DOF Manipulator
### Flexibility Elements in Six Directions  
The joint stiffness data were obtained based on the joint module specification and relevant parameters that are commonly employed in harmonic reducers [22]: \(K=diag(1.27e6,\ 1.27e6,\ 1.27e6,\ 3.3e7,\ 3.3e7)\) (unit: N\(\cdot\)mm/rad), where \(diag\big{(}k_{q1},k_{q2},\ldots,k_{qn}\big{)}\) represents the matrix whose diagonal elements are \(k_{q1},k_{q2},\ldots,k_{qn}\). The parameter \(K\) is defined by  
\[K=\frac{T}{\varphi} \tag{44}\]  
where \(T\) and \(\varphi\) are the load torque and elastic deformation angle, respectively, of the harmonic reducer.  
From Equation (15), the stiffness matrix \(C\) can be obtained. However, stiffness reflects the force caused by the change in the unit displacement, while flexibility reflects the displacement caused by the unit force. The research focus of this paper is the displacement error caused by insufficient stiffness. The derivation of the flexibility matrix \(C\) with the diagonal elements \(C_{11},C_{22},\cdots,C_{66}\) shows that the elements \(C_{11},C_{22},C_{33}\) represent the moving deformation caused by unit force in the X, Y, and Z directions, while \(C_{44},\ C_{55},\) and \(C_{66}\) represent the rotational deformation caused by the unit torque in the X, Y, and Z directions. When \(X=0.3\), Y and Z are at \((-0.3,0.3)\) (unit: m), the end attitude angles are \((-1.57,0,1.57)\) (unit: rad), the stiffness matrix can be solved, and the flexibility plane of \(C_{11},C_{22},\cdots,C_{66}\) is as shown in Figure 5  
Figure 4: Deformation of the manipulator under different loads in the Z direction: (**a**) 0 N, (**b**) 10 N, and (**c**) 20 N.  
Figure 5 shows the displacement changes at the end of the manipulator in the X, Y, and Z directions and the attitude angles (\(\alpha\), \(\beta\), and \(\gamma\)), which indicate that the stiffness is different when the manipulator moves in space. Flexibility reflects the displacement under a force. Figure 5a shows that when the manipulator moved from \(-0.3\) m to \(0.3\) m along the Y axis, the error of the end in the X direction caused by insufficient stiffness decreased. However, when moving along the Z axis, it did not change greatly, which may be because the manipulator was in the reasonable working range of the Z axis. Figure 5b shows that when the manipulator moved from y = \(-0.3\) m to y = \(0.3\) m, when the Z coordinate was large, the flexibility in the Y direction decreased and then increased. When the Z coordinate was smaller, the flexibility in the Y direction increased. When the Z coordinate was near \(0\), the flexibility was basically unchanged at approximately \(0.1\) m/N. Figure 5c shows that the flexibility of the end of the manipulator in the Z direction presented a Newtonian annular variation in the motion plane. Figure 5f show the variation in the angular displacement compliance at the end of the manipulator.  
The simulation results in this section indicate that the stiffness of the manipulator at each point in space is different, the change regularity is difficult to predict, and the errors caused by it are constantly changing, for which it is necessary to compensate the errors for better accuracy of the end positioning. In the following sections, the joint angle is compensated to verify the compensation effect by the simulation and experiments.