## 2 Dynamic Model of Collaborative Robot  
The 3D model and Denavit-Hartenberg (D-H) diagram of the proposed collaborative robot are presented in Figures 1 and 2, respectively. Note that the 2 nd, 3 rd, and 4 th joint of the collaborative robot are parallel to each other, which proves the existence of a closed-form solution for inverse kinematics. Considering gravity, Coriolis force, inertial force and friction, the dynamic equation is derived by the Euler-Lagrangian method, and the driving torques of robot joint can be expressed as:  
\[\mathbf{\tau}=M(q)\ \ddot{q}\ +\ H\Big{(}q,\dot{q}\Big{)}+G(q)+\mathbf{\tau}_{f} \tag{1}\]  
where \(q\), \(\dot{q}\) and \(\ddot{q}\) are the joint position vector, joint velocity vector and the joint acceleration vector, respectively; \(M(q)\) is the inertial matrix of the manipulator; \(\ H\Big{(}q,\dot{q}\Big{)}\) is the centrifugal force and Coriolis force matrix; \(G(q)\) is the gravity matrix; \(\mathbf{\tau}_{f}\) is the friction force vector.  
The friction mainly caused by the joint reducer and bearing is not negligible [18], which leads to a relatively large error in the calculated torque, especially when the velocity changes its direction; that is, near the zero-point of speed. Therefore, the Stribeck friction model is introduced, and the equation is simplified as below:  
\[\mathbf{\tau}_{f}=D\dot{q}+\mu\text{ sgn}\Big{(}\dot{q}\Big{)} \tag{2}\]  
where \(D\) is the viscous friction coefficient vector and \(\mu\) is the Coulomb friction coefficient.  
According to Equations (1) and (2), Equation (3) can be obtained:  
\[\mathbf{\tau}=M(q)\ \ddot{q}+H\Big{(}q,\dot{q}\Big{)}+G(q)+D\dot{q}+\mu\text{sgn} \Big{(}\dot{q}\Big{)} \tag{3}\]  
Equation (1) can be written in the following linear form:  
\[\mathbf{\tau}_{r}=\Phi\Big{(}q,\dot{q},\ddot{q}\Big{)}\mathbf{\theta}+\mathbf{\tau}_{f} \tag{4}\]  
where \(\Phi\Big{(}q,\dot{q},\ddot{q}\Big{)}\) is the observation matrix, which is only related to the joint position, velocity, acceleration, and the structure of the robot. \(\mathbf{\theta}\) is the basic inertial parameter vector, including mass, centroid and moment of inertia.  
Due to the structure and installation of the collaborative robot, some elements in \(\mathbf{\theta}\) are redundant to the dynamic model and do not contribute to the joint torque when the collaborative robot is working, and so cannot be identified through experiment. Additionally, some elements are linearly related, and cannot be identified individually. Therefore, the parameters must be reorganized in order to  
Figure 1: 3D model of the collaborative robot.  
Figure 2: D-H structure of the collaborative robot.  
obtain a minimum set of identification parameters, also known as the minimum inertial parameter set. Equation (3) should therefore be rewritten as:  
\[\mathbf{\tau}_{r}=\Phi\Big{(}q,\dot{q},\ddot{q}\Big{)}\Theta_{r}+\mathbf{\tau}_{f} \tag{5}\]  
where \(\mathbf{\tau}_{r}\) is the reconstructed observation matrix, \(\Theta_{r}\) is the minimum inertia parameter set vector.  
Regarding the accuracy of the dynamic model and the compensation method for collaborative robots, the root-mean-square (RMS) error of the predicted torque (calculated torque) relative to the actual measured torque is used in order to evaluate this. Smaller RMS errors mean better dynamic models and compensation methods, otherwise they need to be improved.