Vibration Suppression of a Flexible-Joint Robot Based on Parameter Identification and Fuzzy PID Control

In order to eliminate the influence of the joint torsional vibration on the system operation accuracy, the parameter identification and the elastic torsional vibration control of a flexible-joint robot are studied. Firstly, the flexible-joint robot system is equivalent to a rotor dynamic system, in which the mass block and the torsion spring are used to simulate the system inertia link and elasticity link, for establishing the system dynamic model, and the experimental prototype is constructed. Then, based on the mechanism method, the global electromechanical-coupling dynamic model of the flexible-joint robot system is constructed to clear and define the mapping relationship between the driving voltage of the DC motor and the rotational speed of joint I and joint II. Furthermore, in view of the contradiction between the system response speed and the system overshoot in the vibration suppression effect of the conventional PID controller, a fuzzy PID controller, whose parameters are determined by the different requirements in the vibration control process, is designed to adjust the driving voltage of the DC motor for attenuating the system torsional vibration. Finally, simulation and control experiments are carried out and the results show that the designed fuzzy PID controller can effectively suppress the elastic torsional vibration of the flexible-joint robot system with synchronization optimization of control accuracy and dynamic quality.


Introduction
Industrial robots can replace human beings in industrial production to achieve more efficient and safer operation; the research and development of the industrial robot system have attracted wide attention from scholars in various countries [1][2][3].Recently, the harmonic reducer and planetary gear are often adopted as the transmission components of the robot system, which can effectively improve the compactness, reduction ratio and transmission efficiency of the robot joint [4,5].However, with the increase of manipulator speed and operating load, the elastic deformation of the transmission mechanism, such as the reducer and the transmission shaft, will directly affect the positioning accuracy of the robot actuators and make the robot joints have the characteristics of flexible joints, which is manifested in the vibration of the robot manipulator when it moves.Thus, under the development trend of heavy-load and high-precision, the induced mechanism and vibration control of the flexible joints for the industrial robots should be deeply studied [6][7][8].
The joint robots are the main components of industrial robots because of their flexibility and controllability.For traditional rigid-joint robots, the existing studies mainly focus on the system structural design and motion control [9,10].Considering that the traditional hydraulic robot joint is large, a water-hydraulic rotating angle self-servo robot joint actuator is designed in [11], and the influences of the input angle amplitude, external loads and water pressure on the system dynamic characteristics are analyzed to optimize this joint actuator.Aiming at the unknown obstacles, Capisani and Ferrara proposed a hybrid control scheme for generating the trajectories of the robot manipulator and the results showed that the proposed methods can effectively improve the motion accuracy of the COMAUSMART3-S2 anthropomorphic rigid manipulator [12].On the basis of the robot kinematic and dynamic models, an offline planning is performed to generate a large dataset of trajectories for solving the multi-objective trajectory planning of the Parallel Kinematic Machines [13].However, most of the above research are based on the assumption that the joints are pure rigid.With the flexibility of the harmonic reducer and other transmission components considered, the actuator motion of the joint robot may be deviated or appear large amplitude vibration under external and parametric excitation.Thus, in order to ensure the control accuracy and motion stability of the joint robots, the joint flexibility introduced by the harmonic reducer and the system connecting shaft should be considered comprehensively, and the corresponding restraining measures should be designed to control the joint torsional vibration.
Fortunately, for the multi-body dynamics systems such as joint robots, their dynamic models can be equivalent to the rotor dynamic system, whose dynamics and control problems have been the hot issues in recent years [14,15], and many researches have been done on the mechanism and control of the torsional vibration for the rotor dynamic system.Considering the joint torsional elasticities with hysteresis, Ruderman designed two approaches for compensating the joint torsion of the flexible joint robots [16].Aiming at the rattle noise of an automotive transmission, based on an empirical model approach, the geometric parameters of the gearbox are optimized to minimize the rattling noise in [17].In order to improving the adaptability of the dynamic absorbers on the rotating systems with variable speeds, an electrorheological dynamic torsional absorber, which can exhibit various torsional damping and stiffness characteristics when an electric field was applied, was designed for reducing the torsional rotor vibrations [18].Kim and Croft designed a practical method, with only position and velocity feedback, for suppressing the torsional vibration of the industrial robots with elastic joints and the results showed that the proposed method obtained a better performance than other well-known model-based controllers [19].However, the above research focuses on the analysis of the system torsional vibration characteristics and the suppression of the system torsional vibration from the mechanical aspect, and considering the parameters uncertainties of the flexible-joint robot system, the existing control system is generally more complex [20].Hayat et al. proposed a robust-adaptive controller that satisfied a predefined performance with few tuning parameters required.Although this controller is robust under bounded disturbance, its structure is rather complicated with two feedback loops included [21].Aiming at a model of the 3D bar structure with uncertain parameters, Mystkowski and Koszewnik presented a robust µ-controller, with extra piezo-actuator installed, for ensuring the good performance of system robustness and vibration suppression [22].With the development of power electronics technology and motor control theory, the torsional vibration caused by the flexibility of the robot joints can be regarded as motion disturbance.Moreover, the active control of the system torsional vibration from the electrical perspective is more practical than from the mechanical perspective.On the other hand, for the rigid-flexible coupling dynamic system such as the flexible-joint robots, there is a contradiction between the dynamic quality and the stability precision in the control effect when the parameters of the feedback controller are determined, which is a common problem of the feedback controllers.
Therefore, in order to effectively eliminate the influence of model parameters uncertainties on the vibration control effect and to solve the contradiction between the dynamic quality and stability accuracy of the existing torsion feedback controller for the flexible-joint robot, the flexible joint of the robot is equivalent to an elastic torsion spring for establishing the system electromechanical-coupling dynamics model in this paper.Then the unknown parameters of the flexible-joint robot system are identified based on the actual measurement results of the system inputs and outputs.Finally, according to the suppression requirements of the joint torsional vibration, an adaptive fuzzy inference machine is designed to adjust the parameters of the PID controller for effectively attenuating the elastic torsional vibration of the flexible-joint robot.The structure of this paper is organized as follows.The electromechanical-coupling dynamics modelling of the flexible-joint robot system is given in Section 2. Section 3 presents the system parameter identification.The main contribution of this paper is introduced in Section 4, including the design of the control strategy.Section 5 discusses the simulation and experiment results.Finally, conclusions are drawn in Section 6.

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 flexible-joint robot system are identified based on the actual measurement results of the system inputs and outputs.Finally, according to the suppression requirements of the joint torsional vibration, an adaptive fuzzy inference machine is designed to adjust the parameters of the PID controller for effectively attenuating the elastic torsional vibration of the flexible-joint robot.The structure of this paper is organized as follows.The electromechanical-coupling dynamics modelling of the flexible-joint robot system is given in Section 2. Section 3 presents the system parameter identification.The main contribution of this paper is introduced in Section 4, including the design of the control strategy.Section 5 discusses the simulation and experiment results.Finally, conclusions are drawn in Section 6.

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 A1 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: where, im is the reduction ratio of the harmonic reducer.J1, J0 and Jr 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: where, ea is the applied armature voltage, R, L, ia and ed 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: 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: 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: 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: where, K e is the back EMF constant of the DC motor, ω 0 and ω 1 represent the angular speed of the DC motor and joint I, respectively.
Substituting Equation (3) into Equation (2) yields: Based on the dynamic analysis of the motor shaft, one can obtain: 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: where K m is the motor torque constant.
And the load torque on the motor shaft can be calculated as follows: 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, θ 1 and θ 2 are the rotation angles of joint I and joint II, respectively.Substituting Equations ( 3) and ( 7) into Equation ( 5) yields: .
Based on the dynamic analysis of the joint connecting shaft and joint II, one can obtain: where, J 2 , ω 2 , f 2 and C 2 are the moment of inertia, the angular velocity, the static friction moment and the viscous friction coefficient of joint II.
Taking the state variables as T and combining Equations ( 4), (8) and ( 9), the electromechanical-coupling dynamics model of the flexible-joint robot system can be transformed into the state space equation whose form is: . x=Ax+Bu y=Cx+Du (10) where

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 X20CP1484, 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).

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 (C1) of the joint connecting shaft, the static friction resistance moment (f1) of joint I, the static friction resistance moment (f2) and the viscous friction coefficient (C2) 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 X20CP1484, 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: 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: 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: 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 N • m/rad.The damping coefficient of the joint connecting shaft (C 1 ) and the viscous friction coefficient of joint II (C 2 ) can be approximately taken as the air viscous friction coefficient which is 4.2 × 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.
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 . The damping coefficient of the joint connecting shaft (C1) and the viscous friction coefficient of joint II (C2) can be approximately taken as the air viscous friction coefficient which is 4.2 × 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: where z(k) are the system outputs after parameter identification, h(k) are the experiment sample sets of the system input and outputs, ( ) are the deviations between the identification outputs and the simulation outputs and κ are the parameters sequence to be identified.
The criterion function is defined as: Based on the above identification principle, the tracking errors of the angular velocity of joint I and joint II are taken as the optimization target.Then, by the control and estimation tools manager in MATLAB/Simulink, the parameter identification results are: K = 0.00183 N•m/rad, C1 = 0.00010 N/(rad/s), C2 = 5.65 × 10 −6 N/(rad/s), f1 = 0.16813 N•m and f2 = 0.00142 N•m.The tracking curves and error curves are shown as Figures 4 and 5.The recursive least squares method is used to identify the system unknown parameters.The system outputs after parameter identification are defined as: where z(k) are the system outputs after parameter identification, h(k) are the experiment sample sets of the system input and outputs, Φ(k) are the deviations between the identification outputs and the simulation outputs and κ are the parameters sequence to be identified.The criterion function is defined as: Based on the above identification principle, the tracking errors of the angular velocity of joint I and joint II are taken as the optimization target.Then, by the control and estimation tools manager in MATLAB/Simulink, the parameter identification results are: K = 0.00183 N•m/rad, C 1 = 0.00010 N/(rad/s), C 2 = 5.65 × 10 −6 N/(rad/s), f 1 = 0.16813 N•m and f 2 = 0.00142 N•m.The tracking curves and error curves are shown as Figures 4 and 5.
Figure 4a,b describe the tracking effect and identification error of the simulation model on the angular velocity of joint I, respectively.It is seen that the tracking curve fits well with the experimental data.The fitting effect of the rotational speed of joint I is only large at the initial stage, and the identification error approaches to zero gradually over time.Figure 5a,b describe the tracking effect and identification error of the simulation model on the rotational speed of joint II, respectively.It is shown that although the simulation curve has a certain error in the tracking amplitude, the absolute error is within 5 rad/s, which can meet the control requirement.Moreover, it is obvious from Figure 5a that the overall tracking trend for the rotational speed of joint II is consistent and the simulation model can effectively identify the main frequency components of the rotational speed of joint II, which is of great significance to the torsion control of the flexible-joint robot system.It is shown that although the simulation curve has a certain error in the tracking amplitude, the absolute error is within 5 rad/s, which can meet the control requirement.Moreover, it is obvious from Figure 5a that the overall tracking trend for the rotational speed of joint II is consistent and the simulation model can effectively identify the main frequency components of the rotational speed of joint II, which is of great significance to the torsion control of the flexible-joint robot system.
On the other hand, by comparing Figure 4a with Figure 5b, it is found that when the joint flexibility is not considered, the rotational speed of joint II oscillates obviously, and it takes a long time to be consistent with the rotational speed of joint I. Therefore, in order to ensure the execution accuracy and efficiency of the joint robot, it is necessary to analyze and suppress the torsional vibration of the transmission system caused by joint flexibility.Figure 4a,b describe the tracking effect and identification error of the simulation model on the angular velocity of joint I, respectively.It is seen that the tracking curve fits well with the experimental data.The fitting effect of the rotational speed of joint I is only large at the initial stage, and the identification error approaches to zero gradually over time.Figure 5a,b describe the tracking effect and identification error of the simulation model on the rotational speed of joint II, respectively.It is shown that although the simulation curve has a certain error in the tracking amplitude, the absolute error is within 5 rad/s, which can meet the control requirement.Moreover, it is obvious from Figure 5a that the overall tracking trend for the rotational speed of joint II is consistent and the simulation model can effectively identify the main frequency components of the rotational speed of joint II, which is of great significance to the torsion control of the flexible-joint robot system.
On the other hand, by comparing Figure 4a with Figure 5b, it is found that when the joint flexibility is not considered, the rotational speed of joint II oscillates obviously, and it takes a long time to be consistent with the rotational speed of joint I. Therefore, in order to ensure the execution accuracy and efficiency of the joint robot, it is necessary to analyze and suppress the torsional vibration of the transmission system caused by joint flexibility.On the other hand, by comparing Figure 4a with Figure 5b, it is found that when the joint flexibility is not considered, the rotational speed of joint II oscillates obviously, and it takes a long time to be consistent with the rotational speed of joint I. Therefore, in order to ensure the execution accuracy and efficiency of the joint robot, it is necessary to analyze and suppress the torsional vibration of the transmission system caused by joint flexibility.

Control Algorithm Design for Joint Torsional Vibration
Fuzzy-PID control method has the advantages of the flexible and adaptable of the fuzzy controller and the high precision of the PID controller [26,27].It can effectively solve the contradiction between dynamic quality and control precision of the conventional PID controller and realize the effective control for the elastic vibration of the flexible-joint robot system.The fuzzy PID controller of the flexible-joint robot system takes the speed error (e) and the error change rate of joint II ( .e) as the inputs, and the increment of the PID control parameters as the outputs.Then the control parameters of the fuzzy PID controller can be expressed as follows: where, K p , K i and K d are the initial setting values of the control parameters which are determined by the trial and error method through simulation, ∆K p , ∆K i and ∆K d are the increment of the corresponding control parameters which are determined by the designed adaptive fuzzy inference machine, respectively.The fuzzy PID controller structure of the flexible-joint robot system is shown in Figure 6, where ω 2r represents the desired speed of joint II.
contradiction between dynamic quality and control precision of the conventional PID controller and realize the effective control for the elastic vibration of the flexible-joint robot system.The fuzzy PID controller of the flexible-joint robot system takes the speed error (e) and the error change rate of joint II ( e  ) as the inputs, and the increment of the PID control parameters as the outputs.Then the control parameters of the fuzzy PID controller can be expressed as follows: The fuzzy PID controller structure of the flexible-joint robot system is shown in Figure 6, where ω2r represents the desired speed of joint II.The variation ranges of the deviation, the deviation change rate, the increment of the proportional coefficient, the increment of the integral coefficient and the increment of the differential coefficient are defined as the basic domain of the fuzzy set, which can be represented as follows: ( ) , , , , , , , , , , The corresponding fuzzy subset is { } , , , , , , NB NM NS PS PM PB 0 and the elements in the subset represent negative big, negative middle, negative small, zero, positive small, positive middle and positive big.Considering that the shape of the triangle membership function is only related to the slope of its straight line and the calculation is simple, the membership functions of each linguistic variable are chosen as the triangle with negative middle, negative small, zero, positive small and positive middle.In addition, with the transitivity of the negative big and the positive big considered, the membership functions of the fuzzy subsets of the negative big and the positive big in each fuzzy state are selected as Gauss type, which is shown in Figure 7.
The corresponding fuzzy subset is {NB, N M, NS, 0, PS, PM, PB} and the elements in the subset represent negative big, negative middle, negative small, zero, positive small, positive middle and positive big.Considering that the shape of the triangle membership function is only related to the slope of its straight line and the calculation is simple, the membership functions of each linguistic variable are chosen as the triangle with negative middle, negative small, zero, positive small and positive middle.In addition, with the transitivity of the negative big and the positive big considered, the membership functions of the fuzzy subsets of the negative big and the positive big in each fuzzy state are selected as Gauss type, which is shown in Figure 7.
On the basis of the membership functions of the speed deviation of joint II, the change rate of the speed deviation of joint II, the increment of the proportional coefficient, the increment of the integral coefficient and the increment of the differential coefficient, the fuzzy rules of the fuzzy PID controller for the flexible-joint robot are determined by experience and perceptual reasoning.Then, in different control stages, the proportional coefficient, the integral coefficient and the differential coefficient of the fuzzy PID controller can be adjusted adaptively.According to the control requirements of the elastic vibration for the flexible-joint robot, the fuzzy rules are determined as follows: (1) In the initial stage, because the speed deviation of joint II is large, the larger proportional coefficient is used to improve the system response speed, the integral coefficient is taken as 0 to prevent the integral saturation, and the appropriate differential coefficient is used to reduce the overshoot; (2) In the medium-term of regulation, the appropriate proportional coefficient, integral coefficient and differential coefficient are adopted to ensure a certain response speed and to avoid overshoot; and (3) In the later period of regulation, the proportional coefficient is increased to reduce the static error, the integral coefficient is increased to improve the stability, and the differential coefficient is reduced to prevent the oscillation.On the basis of the membership functions of the speed deviation of joint II, the change rate of the speed deviation of joint II, the increment of the proportional coefficient, the increment of the integral coefficient and the increment of the differential coefficient, the fuzzy rules of the fuzzy PID controller for the flexible-joint robot are determined by experience and perceptual reasoning.Then, in different control stages, the proportional coefficient, the integral coefficient and the differential coefficient of the fuzzy PID controller can be adjusted adaptively.According to the control requirements of the elastic vibration for the flexible-joint robot, the fuzzy rules are determined as follows: (1) In the initial stage, because the speed deviation of joint II is large, the larger proportional coefficient is used to improve the system response speed, the integral coefficient is taken as 0 to prevent the integral saturation, and the appropriate differential coefficient is used to reduce the overshoot; (2) In the medium-term of regulation, the appropriate proportional coefficient, integral coefficient and differential coefficient are adopted to ensure a certain response speed and to avoid overshoot; and (3) In the later period of regulation, the proportional coefficient is increased to reduce the static error, the integral coefficient is increased to improve the stability, and the differential coefficient is reduced to prevent the oscillation.
According to the above analysis, the fuzzy rules of the fuzzy PID controller for the flexible-joint robot can be worked out, which are presented in Table 1.According to the above analysis, the fuzzy rules of the fuzzy PID controller for the flexible-joint robot can be worked out, which are presented in Table 1.  1 with the membership functions of the fuzzy states, the total fuzzy relation of the increment for the proportional coefficient can be obtained as where, R l = e .e → K p = e×e×K p µ(e)Λµ(e)Λµ(∆K p ) (e,e,∆Kp) l = 1, 2, 3, • • • 49 and µ(α) is the membership function value of the corresponding linguistic variable (α).Similarly, the total fuzzy relations for the increment of the integral coefficient and the increment of differential coefficient can be determined as follows: where, The fuzzy output sets obtained from Equations ( 19)-( 21) needs to be clarified to get the precise control variables, and the center average de-fuzzifier is used in this paper.Taking the increment of the proportional coefficient as an example and defining y l and ω l as the center and height of the l-th fuzzy output set, the precise output control quantity for the increment of the proportional coefficient can be obtained as follows: The control quantities obtained by Equation ( 22) are only the exact values of the corresponding output variables in the fuzzy universe and it is necessary to convert them to the corresponding actual exact values, which can be used as executable precise quantities for controlling the DC motor.Finally, the output control parameters are K p = K' p + ∆K p , K i = K' i + ∆K i and K d = K' d + ∆K d , and according to the mechanism of the PID controller, the control voltage is obtained to drive the DC motor, and finally the fast synchronization of joint II speed and joint I speed can be realized.

Simulation and Experimental Verification
In this section, the designed fuzzy PID controller for the torsional vibration of the flexible-joint robot is validated by simulation and experiment.The simulation model of the flexible-joint robot system is constructed based on MATLAB R2015b/Simulink.In order to further verify the harmony between stability precision and rapidity of the designed fuzzy PID controller in torsional vibration suppression effect of the flexible-joint robot system, the conventional PID controller, whose parameters are determined by the trial and error method through simulation, is used for comparison and analysis.Setting the target speed of joint II as 2000 • /s, the control effects of the two controllers are shown in Figure 8.It is seen from Figure 8b that when the joint flexibility of the joint robot transmission system is not considered, the rotational speed of joint II fluctuates obviously, and it takes a long time to synchronize with the rotational speed of joint I.The rotational speed of joint II can track the target speed without overshoot by the designed fuzzy PID controller, and the torsional vibration of the flexible-joint robot system is effectively suppressed.However, under the same stability time, the conventional PID controller will lead to a larger overshoot of the rotational speed of joint II, which is not allowed in the actual system.This is because that the parameters of the conventional PID controller are fixed in the control process, and it is difficult to achieve synchronous optimization for the overshoot, the response time and the static error.In addition, the fuzzy PID controller can realize the self-adjustment of the control parameters.In order to satisfy the response speed requirement of It is seen from Figure 8b that when the joint flexibility of the joint robot transmission system is not considered, the rotational speed of joint II fluctuates obviously, and it takes a long time to synchronize with the rotational speed of joint I.The rotational speed of joint II can track the target speed without overshoot by the designed fuzzy PID controller, and the torsional vibration of the flexible-joint robot system is effectively suppressed.However, under the same stability time, the conventional PID controller will lead to a larger overshoot of the rotational speed of joint II, which is not allowed in the actual system.This is because that the parameters of the conventional PID controller are fixed in the control process, and it is difficult to achieve synchronous optimization for the overshoot, the response time and the static error.In addition, the fuzzy PID controller can realize the self-adjustment of the control parameters.In order to satisfy the response speed requirement of the control system in the initial stage, a larger proportional gain is adopted, and when the target speed is approached, the integral gain is increased to reduce the static error.On the other hand, Figure 8a shows the control voltages of the conventional PID controller and the designed fuzzy PID controller for the DC motor.It is found that the control voltage, obtained by the designed fuzzy PID controller, comes to stability faster, which indicates that its adjustment time is shorter.Then, the conclusion that the fuzzy PID controller has a better control effect than the conventional PID controller on the torsional vibration of the flexible-joint robot system is further proved.Finally, the dynamic quality and stability accuracy for the torsional vibration control of the flexible-joint robot are optimized synchronously.
Furthermore, a step disturbance is added to the control system in 2 s for comparing the anti-interference performance of the designed controller and the results are shown in Figure 9a.It is known that the two controllers can effectively eliminate the interference and achieve stability.But the conventional PID controller fluctuates greatly and needs about 1.8 s to eliminate the step disturbance, while the fuzzy PID controller can suppress the step disturbance very well.The performances of the fuzzy PID controller are that the disturbance is small and the adjustment time is about 0.6 s. better than that of the conventional PID controller, and it is more suitable for the torsional vibration control of the flexible-joint robot system.Then the fuzzy PID controller is validated on the flexible-joint robot experimental system which is shown in Figure 2. By setting the target speed of joint II as 2000°/s, the control effect of the designed fuzzy PID controller is shown in Figure 10.
It is seen from Figure 10 that the torsional vibration of the flexible-joint robot is effectively suppressed under the action of the designed fuzzy PID controller.After about 0.5 s, the rotational speed of joint II reaches the desired speed.On the other hand, with Figure 10 and Figure 8b compared, one can obtain that the torsional vibration suppression times of the designed fuzzy PID controller on the experimental platform and the simulation platform are almost the same.Owing to the control parameters of the designed fuzzy PID controller for the experimental platform and the simulation platform are the same, the validity of the constructed system dynamics model and the parameter identification is further illustrated.In conclusion, the fuzzy PID controller designed in this paper can realize the effective control of the torsional vibration of the flexible-joint robot system.On the other hand, the white Gaussian noise, of which the height of the power spectral density is 0.4, is added to the control system in 2 s for further comparing the anti-interference performance of the designed controller and the results are shown in Figure 9b.It is found that the designed fuzzy PID controller have better anti-jamming capability for the white Gaussian noise than that of the conventional PID controller.The adjustment time for suppressing the white Gaussian noise of the designed fuzzy PID controller is about 0.6 s while the adjustment time of the conventional PID controller is about 1.5 s.In summary, the anti-interference performance of the fuzzy PID controller is better than that of the conventional PID controller, and it is more suitable for the torsional vibration control of the flexible-joint robot system.
Then the fuzzy PID controller is validated on the flexible-joint robot experimental system which is shown in Figure 2. By setting the target speed of joint II as 2000 • /s, the control effect of the designed fuzzy PID controller is shown in Figure 10.
compared, one can obtain that the torsional vibration suppression times of the designed fuzzy PID controller on the experimental platform and the simulation platform are almost the same.Owing to the control parameters of the designed fuzzy PID controller for the experimental platform and the simulation platform are the same, the validity of the constructed system dynamics model and the parameter identification is further illustrated.In conclusion, the fuzzy PID controller designed in this paper can realize the effective control of the torsional vibration of the flexible-joint robot system.It is seen from Figure 10 that the torsional vibration of the flexible-joint robot is effectively suppressed under the action of the designed fuzzy PID controller.After about 0.5 s, the rotational speed of joint II reaches the desired speed.On the other hand, with Figures 8 and 10 compared, one can obtain that the torsional vibration suppression times of the designed fuzzy PID controller on the experimental platform and the simulation platform are almost the same.Owing to the control parameters of the designed fuzzy PID controller for the experimental platform and the simulation platform are the same, the validity of the constructed system dynamics model and the parameter identification is further illustrated.In conclusion, the fuzzy PID controller designed in this paper can realize the effective control of the torsional vibration of the flexible-joint robot system.

Conclusions
With the torsional vibration of the flexible-joint transmission links considered, an adaptive fuzzy PID controller is designed based on the dynamic modeling and parameter identification of the flexible-joint robot system.The simulation and experimental results show that: (i) The established electromechanical-coupling dynamics model of the flexible-joint robot can effectively characterize the system dynamic characteristics after the unknown parameters of the model are determined by the parameter identification.The model output speeds of joint I and joint II can effectively track the outputs of the experimental platform.The identification result of the rotational speed of joint I is that the identification error quickly attenuated to 0. Moreover, the main frequency components of the rotational speed of joint II are identified which is of great significance to the torsion control of the flexible-joint robot system.(ii) Based on the analysis of the dynamic characteristics of the flexible-joint robot, the control rules of the designed fuzzy PID controller are determined.With the speed difference between joint II and joint I feedbacked, the designed fuzzy PID controller can effectively suppress the joint torsional vibration of the flexible-joint robot with about 0.5 s to the target speed, and achieve the synchronous optimization of the dynamic quality and the stability accuracy in the control effect of the system torsional vibration.(iii) Meanwhile, the designed fuzzy PID controller has good anti-interference.Whether it's step noise or white Gaussian noise, the fuzzy PID controller needs only 0.6 s to adjust, while the conventional PID controller needs about 1.8 s to eliminate the step disturbance and about 1.5 s to eliminate the white Gaussian noise.The research results in this paper can provide references for the torsional vibration control of the industrial joint robots.

Figure 1 .
Figure 1.Physical model of the flexible-joint robot system.

Figure 1 .
Figure 1.Physical model of the flexible-joint robot system.

Figure 2 .
Figure 2. Experimental system of the flexible-joint robot system.

Figure 2 .
Figure 2. Experimental system of the flexible-joint robot system.

Figure 3 .
Figure 3. Parameter identification model of the flexible-joint robot system.

Figure 3 .
Figure 3. Parameter identification model of the flexible-joint robot system.

Figure 4 .
Figure 4. Tracking effect and identification error of the simulation model on the angular velocity of joint I: (a) tracking effect; (b) tracking error.

Figure 5 .
Figure 5. Tracking effect and identification error of the simulation model on the angular velocity of joint II: (a) tracking effect; (b) tracking error.

Figure
Figure4a,b describe the tracking effect and identification error of the simulation model on the angular velocity of joint I, respectively.It is seen that the tracking curve fits well with the experimental data.The fitting effect of the rotational speed of joint I is only large at the initial stage, and the identification error approaches to zero gradually over time.Figure5a,b describe the tracking effect and identification error of the simulation model on the rotational speed of joint II, respectively.It is shown that although the simulation curve has a certain error in the tracking amplitude, the absolute error is within 5 rad/s, which can meet the control requirement.Moreover, it is obvious from Figure5athat the overall tracking trend for the rotational speed of joint II is consistent and the simulation model can effectively identify the main frequency components of the rotational speed of joint II, which is of great significance to the torsion control of the flexible-joint robot system.On the other hand, by comparing Figure4awith Figure5b, it is found that when the joint flexibility is not considered, the rotational speed of joint II oscillates obviously, and it takes a long time to be consistent with the rotational speed of joint I. Therefore, in order to ensure the execution accuracy and efficiency of the joint robot, it is necessary to analyze and suppress the torsional vibration of the transmission system caused by joint flexibility.

Figure 4 .
Figure 4. Tracking effect and identification error of the simulation model on the angular velocity of joint I: (a) tracking effect; (b) tracking error.

Figure 4 .
Figure 4. Tracking effect and identification error of the simulation model on the angular velocity of joint I: (a) tracking effect; (b) tracking error.

Figure 5 .
Figure 5. Tracking effect and identification error of the simulation model on the angular velocity of joint II: (a) tracking effect; (b) tracking error.

Figure 5 .
Figure 5. Tracking effect and identification error of the simulation model on the angular velocity of joint II: (a) tracking effect; (b) tracking error.
d K ′ are the initial setting values of the control parameters which are determined by the trial and error method through simulation, ΔKp, ΔKi and ΔKd are the increment of the corresponding control parameters which are determined by the designed adaptive fuzzy inference machine, respectively.

Figure 6 .
Figure 6.Structure of the fuzzy PID controller for the flexible-joint robot system.

Figure 6 .
Figure 6.Structure of the fuzzy PID controller for the flexible-joint robot system.The variation ranges of the deviation, the deviation change rate, the increment of the proportional coefficient, the increment of the integral coefficient and the increment of the differential coefficient are defined as the basic domain of the fuzzy set, which can be represented as follows: e, .e, ∆K p , ∆K i , ∆K d = (−3, −2, −1, 0, 1, 2, 3) (18)

Algorithms 2018 , 15 Figure 7 .
Figure 7. Membership functions of the speed deviation, the change rate of the speed deviation, the increment of the proportional coefficient, the increment of the integral coefficient and the increment of the differential coefficient.

Figure 7 .
Figure 7. Membership functions of the speed deviation, the change rate of the speed deviation, the increment of the proportional coefficient, the increment of the integral coefficient and the increment of the differential coefficient.

Figure 8 .
Figure 8.Control effects of the designed fuzzy PID controller and the conventional PID controller on the torsional vibration of the flexible-joint robot system: (a) control voltages of the DC motor; (b) speed of joint II.

Figure 8 .
Figure 8.Control effects of the designed fuzzy PID controller and the conventional PID controller on the torsional vibration of the flexible-joint robot system: (a) control voltages of the DC motor; (b) speed of joint II.

Figure 9 .
Figure 9.Comparison of the anti-interference performances of the designed fuzzy PID controller and the conventional PID controller: (a) step disturbance; (b) white Gaussian noise.

Figure 9 .
Figure 9.Comparison of the anti-interference performances of the designed fuzzy PID controller and the conventional PID controller: (a) step disturbance; (b) white Gaussian noise.

Figure 10 .
Figure 10.Experimental test effect of the designed fuzzy PID controller on the torsional vibration control of the flexible-joint robot system.

Figure 10 .
Figure 10.Experimental test effect of the designed fuzzy PID controller on the torsional vibration control of the flexible-joint robot system.
Table A1 of Appendix A.

Table 1 .
Fuzzy inference rules of ∆K p , ∆K i and ∆K d .

Table A1 .
Table of notation.