## 2 Electromechanical-Coupling Dynamics Modelling  
The flexible-joint robot system mainly includes the DC motor, the harmonic reducer, the connecting shaft, the working joints and other connecting pieces. These transmission components can be classified into two types: one is of large mass and small elasticity, such as DC motor, harmonic reducer and working joints, and the other is of large elasticity and small mass, such as connecting shaft. Therefore, in order to better analyze the dynamic characteristics of the flexible-joint robot system under the influence of joint flexibility, the system is equivalent to a'mass elastic system', which is composed of several inertial and elastic components, from the perspective of global electromechanical-coupling analysis. Then, the physical model of the flexible-joint robot system is constructed as Figure 1. The inertia link and elasticity link of the flexible-joint robot are equivalent to the mass block and the torsion spring, respectively. During the dynamics modeling and analysis, the notations of the system are listed in Table 1 of Appendix A. According to the structure of the flexible-joint robot, it is obvious that the DC motor, the harmonic reducer and the motor shaft are rigidly connected. Then, the equivalent moment of inertia to the motor shaft can be shown as follows:  
\[J\ =\ \frac{J_{1}}{i_{m}^{2}}+J_{0}+J_{r} \tag{1}\]  
where, \(i_{m}\) is the reduction ratio of the harmonic reducer. \(J_{1}\), \(J_{0}\) and \(J_{r}\) are the moment of inertia of joint I, the moment of inertia of the DC motor shaft and the moment of inertia of the harmonic reducer, respectively. According to the motor drive principle [23; 24], the DC motor can be equivalent to a series circuit of resistance and inductance. Based on the Kirchhoff voltage law, the voltages on both ends of the armature of the DC motor are equal, which can be represented as follows:  
\[e_{a}\ =\ Ri_{d}+L\frac{di_{d}}{dt}+e_{d} \tag{2}\]  
where, \(e_{a}\) is the applied armature voltage, \(R\), \(L\), \(i_{a}\) and \(e_{d}\) denote the armature resistance, the armature inductance, the armature current and the reverse electromotive force (EMF) of the DC motor, respectively. The relationship between the reverse electromotive force of the DC motor and its angular velocity is:  
\[e_{d}\ =\ K_{e}\omega_{0}\ =\ K_{e}i_{m}\omega_{1} \tag{3}\]  
where, \(K_{e}\) is the back EMF constant of the DC motor, \(\omega_{0}\) and \(\omega_{1}\) represent the angular speed of the DC motor and joint I, respectively. Figure 1: Physical model of the flexible-joint robot system. Substituting Equation (3) into Equation (2) yields:  
\[\frac{di_{d}}{dt}\ =\ \frac{e_{a}}{L}-\frac{R}{L}i_{d}-\frac{K_{e}i_{m}}{L}\omega_{1} \tag{4}\]  
Based on the dynamic analysis of the motor shaft, one can obtain:  
\[T_{ed}-T_{1}\ =\ J\dot{\omega}_{0} \tag{5}\]  
where, \(T_{ed}\) is the drive torque of the DC motor, \(T_{1}\) indicates the load torque on the motor shaft. The driving torque of the DC motor is directly proportional to its armature current [25], which can be expressed as follows:  
\[T_{ed}\ =\ K_{m}i_{d} \tag{6}\]  
where \(K_{m}\) is the motor torque constant. And the load torque on the motor shaft can be calculated as follows:  
\[T_{1}\ =\ \frac{1}{i_{m}}[f_{1}+K(\theta_{1}-\theta_{2})+C_{1}\omega_{1}] \tag{7}\]  
where,\(f_{1}\) is the static friction moment of joint I, \(K\) and \(C_{1}\) are the torsional stiffness and the viscous friction coefficient of the joint connecting shaft, \(\theta_{1}\) and \(\theta_{2}\) are the rotation angles of joint I and joint II, respectively.