## 3 System Parameter Identification  
In order to effectively suppress the torsional vibration caused by the flexible joint, the system parameters of the flexible-joint robot must be determined firstly to provide the priori parameters for the controller design. It is obvious that the rotational inertias of the DC motor and the transmission joints can be obtained by CAD simulation software. The back EMF constant and the torque constant of the DC motor can be obtained by the motor instructions, while the torsional stiffness (\(K\)) and the damping coefficient (\(C_{1}\)) of the joint connecting shaft, the static friction resistance moment (\(f_{1}\)) of joint I, the static friction resistance moment (\(f_{2}\)) and the viscous friction coefficient (\(C_{2}\)) of joint II need to be identified by experiment. Therefore, a flexible-joint robot experimental system is set up, which is shown in Figure 2. Two mass blocks are used to simulate joint I and joint II of the flexible-joint robot systems. The torsion spring is used to simulate the elasticity of the joint connecting shaft. The DC motor (MAXON 144029+226806, MAXON MOTOR, Obwalden, Switzerland) drives joint I through the reducer, and then drives joint II through the joint connecting shaft. The system control part is built on the basis of the PLC (B&R X20 CP1484, B&R, Shanghai, China). The rotation angles of the DC motor and joint II are detected separately by encoder I (HKT 3004-C03G-1000B-5E, HEDSS, Wuxi, China) and encoder II (HKT 3004-C03G-1000B-5E, HEDSS, Wuxi, China). Before system parameters identification, it is necessary to estimate these parameters in order to narrow the scope of the computer calculation, then the identification results can be more accurate. According to the strength of materials, under the action of the torque \(M\), the torsion angle of the torsion spring can be shown as follows:  
\[\phi\ =\ \frac{64 MD_{2}n}{Ed^{4}} \tag{11}\]  
where, \(n\) is the effective number of turns for the joint connecting shaft, \(E\) is the elastic modulus of the torsion spring, \(d\) is the diameter of the spring wire and \(D_{2}\) is the spring middle diameter. Therefore, the torsional stiffness of the torsion spring can be defined as follows:  
\[K\ =\ \frac{Ed^{4}}{64D_{2}n} \tag{12}\]  
According to Equation (12) and the physical parameters of the torsion spring used in the experimental device, the torsional stiffness of the torsion spring can be obtained as \(K\ =\ 0.002285\ \mathrm{N}\cdot\mathrm{m}/\mathrm{rad}\). The damping coefficient of the joint connecting shaft (\(C_{1}\)) and the viscous friction coefficient of joint II (\(C_{2}\))  
Figure 2: Experimental system of the flexible-joint robot system. can be approximately taken as the air viscous friction coefficient which is 4.2 \(\times\) 10\({}^{-6}\). The static friction torques of joint I and joint II can be approximated to 0. Then, a black box model of the flexible-joint robot system for parameter identification is established in MATLAB/Simulink, which is shown in Figure 3. The input of the parameter identification model is the driving voltage of the DC motor, and the outputs of the parameter identification model are the angular velocity data of joint I and joint II. Then, by applying a constant voltage (22V) to the DC motor, the angular velocity data of joint I and joint II are measured by the encoders in 10 s. During the measurement, the order of smooth filtering is 4 and the sampling period is 5 ms. The recursive least squares method is used to identify the system unknown parameters. The system outputs after parameter identification are defined as:  
\[\boldsymbol{z}(k)\ =\ \boldsymbol{h}^{\mathrm{T}}(k)\boldsymbol{\kappa}+\Phi(k) \tag{13}\]  
where \(\boldsymbol{z}(k)\) are the system outputs after parameter identification, \(\boldsymbol{h}(k)\) are the experiment sample sets of the system input and outputs, \(\Phi(k)\) are the deviations between the identification outputs and the simulation outputs and \(\boldsymbol{\kappa}\) are the parameters sequence to be identified.