A Robust Method Based on Dual Encoders to Eliminate Velocity Ripple for Modular Drive Joints

: Velocity ripple is one of the common problems of modular drive joints, which easily induces vibration and noise and a ﬀ ects motion accuracy. In order to improve the motion control accuracy, a robust method based on dual encoders to eliminate velocity ripple is proposed in this paper. The method contains a velocity ripple elimination controller (VREC), a rigid-body velocity solver (RBVS), and a proportional–integral (PI) controller. Feeding back the VREC output to the PI controller based on the rigid-body velocity obtained from the weighted sum of dual encoders in the RBVS, an equivalent system damping term was added into the system. Therefore, the velocity ripple can be suppressed e ﬀ ectively with the adjustable damping term composed of control parameters. Above all, the proposed method has only one more parameter to further eliminate velocity ripple compared to the pure PI method and, meanwhile, has apparent advantages over the conventional method, such as fewer parameters and full frequency ripple elimination, as well as robustness to input disturbance and modular drive joint load inertia changes. This proposed method’s e ﬀ ectiveness is veriﬁed by simulations in MATLAB and experiments in the modular drive joint platform.


Introduction
Modular drive joints are now widely used in industrial robots and collaborative robots, integrating high efficiency and high power density permanent magnet synonym motors (PMSMs), harmonic drive, torque sensors, shafts, bearings, dual encoders, and other components [1][2][3]. The PMSM is widely employed in modular drive joints due to its advantages: fast dynamics, high efficiency and reliability, and a favorable torque to inertia ratio [4][5][6]. However, the torque ripple in the PMSM and the stiffness of the modular drive joint influenced by the flexpline of harmonic drive easily induce velocity ripple [7,8]. Furthermore, the velocity ripple will result in vibration, noise, and other similar problems, which are major factors affecting the accuracy of the motion control system [9]. In the last few years, many kinds of research have been done on the accuracy of motion control, where the velocity ripple has been found to be a major issue [10].
The factors that cause the velocity ripple of modular drive joints can mainly be divided into two categories. The first category is caused by the position measuring errors because the feedback

Dynamic Modeling and System Identification
The modular drive joint is widely used in most collaborative robots as the core part, integrating electronic circuits and other mechanical components. The mechanical structure is described in [35,36]. Figure 1 shows the experimental platform based on a modular drive joint together with dSpace hardware in the loop real-time simulation platform and MATLAB real-time workspace. The actuator of the modular drive joint is the Copley driver. This experimental platform's power is 24 V. The weights installed at both ends of the connecting rod act as the load inertia. Actuators 2020, 9, x FOR PEER REVIEW 3 of 20 velocity measured by the motor-side encoder and link velocity measured by the link-side encoder) without any control parameters. The VREC is based on the RBVS to add an equivalent system damping term and constant term, which eliminates velocity ripple and input disturbance effectively and, meanwhile, increases the robustness to modular drive joint load inertia changes. The added equivalent damping term consists of system parameters and control parameters, which can be increased or decreased with the adjustment of control parameters. In this paper, the velocity ripple suppression effects are confirmed in a modular drive joint with variable velocity tracking in simulations and experiments with a motor-side controller and link-side controller, respectively. Furthermore, the damped input disturbance and robustness to load inertia changes are also verified by simulations and experiments with a motor-side controller and link-side controller, respectively. This paper is organized as follows. The dynamic model and system identification of a modular drive joint are described in Section 2. The proposed method is designed and the controller parameters are analyzed in Section 3. Section 4 includes simulations and experiments of the motor-side controller and link-side controller to verify the velocity ripple elimination effects, input disturbance suppression effects, and the robust performance to load inertia changes. Finally, Section 5 concludes this paper.

Dynamic Modeling and System Identification
The modular drive joint is widely used in most collaborative robots as the core part, integrating electronic circuits and other mechanical components. The mechanical structure is described in [35,36]. Figure 1 shows the experimental platform based on a modular drive joint together with dSpace hardware in the loop real-time simulation platform and MATLAB real-time workspace. The actuator of the modular drive joint is the Copley driver. This experimental platform's power is 24 V. The weights installed at both ends of the connecting rod act as the load inertia.  Figure 2 shows that the gear ratio of harmonic drive in the modular drive joint is equivalent to 1 [35]. Therefore, the dynamic response of this two-inertia system can be simplified as Equation (1).  In order to verify that this two-inertia model can fit the actual modular drive joint well, a swept sine current signal is utilized to estimate the joint frequency response, with a load inertia of 2.26 l J = kg·m 2 . In experiments, the sampling frequency is 1 kHz. As for the modular drive joint, the current torque constant is tested to be 0.17 N·m/A. The input saturation current is set to 10 A. The maximum velocity of the motor side is 2500 rpm. Moreover, the gear ratio of the harmonic drive is 160. After the identification experiment, the joint frequency response from input torque m τ to motor velocity m θ  and link velocity l θ  can be obtained as shown in Figure 3a,b, respectively.
(a) (b) In Figure 3, the black lines are acquired by actual measurement data of the experiment. The red lines are fitted frequency response curves of the two-inertia model. The motor-side velocity response has a clear anti-resonance and resonance behavior from the identified results, whereas the link-side velocity only has a resonance behavior. In fact, the actual joint dynamic model is subjected to several In order to verify that this two-inertia model can fit the actual modular drive joint well, a swept sine current signal is utilized to estimate the joint frequency response, with a load inertia of J l = 2.26 kg·m 2 . In experiments, the sampling frequency is 1 kHz. As for the modular drive joint, the current torque constant is tested to be 0.17 N·m/A. The input saturation current is set to 10 A. The maximum velocity of the motor side is 2500 rpm. Moreover, the gear ratio of the harmonic drive is 160. After the identification experiment, the joint frequency response from input torque τ m to motor velocity . θ m and link velocity . θ l can be obtained as shown in Figure 3a,b, respectively.  The physical meanings of  ,  , , , , , , ,  , In order to verify that this two-inertia model can fit the actual modular drive joint well, a swept sine current signal is utilized to estimate the joint frequency response, with a load inertia of 2.26 l J = kg·m 2 . In experiments, the sampling frequency is 1 kHz. As for the modular drive joint, the current torque constant is tested to be 0.17 N·m/A. The input saturation current is set to 10 A. The maximum velocity of the motor side is 2500 rpm. Moreover, the gear ratio of the harmonic drive is 160. After the identification experiment, the joint frequency response from input torque m τ to motor velocity m θ  and link velocity l θ  can be obtained as shown in Figure 3a,b, respectively.
(a) (b) In Figure 3, the black lines are acquired by actual measurement data of the experiment. The red lines are fitted frequency response curves of the two-inertia model. The motor-side velocity response has a clear anti-resonance and resonance behavior from the identified results, whereas the link-side velocity only has a resonance behavior. In fact, the actual joint dynamic model is subjected to several In Figure 3, the black lines are acquired by actual measurement data of the experiment. The red lines are fitted frequency response curves of the two-inertia model. The motor-side velocity response has a clear anti-resonance and resonance behavior from the identified results, whereas the link-side velocity only has a resonance behavior. In fact, the actual joint dynamic model is subjected to several nonlinear and time-varying factors, such as the nonlinear torques, frictions, and damping effects in the motor side and transmission, and the varying efficiency of harmonic drive (60-75% depending on ratio, velocity, and lubricant). In particular, the stiffness and damping of harmonic drive are related to the motion velocity. Therefore, the two-inertia model cannot fit the phase of actual system characteristics well [37]. However, the amplitude-frequency fitting accuracy can accurately fit the system's anti-resonance and resonance characteristics, proving that the two-inertia model can reflect the joint's dynamic characteristics well. The anti-resonance frequency ω a and resonance frequency ω r are located at 19 Hz and 21 Hz, respectively. Next, the identified parameters of this modular drive joint are summarized in Table 1.

Controller Design
The proposed method in this paper contains an RBVS, a VREC, and a PI controller, as shown in Figure 4, and aims to eliminate velocity ripple by adding equivalent system damping. The added equivalent damping term is developed by feeding back the velocity u of VREC output to the PI controller. As for the RBVS, rigid-body velocity . θ r can be obtained by the weighted sum of motor velocity . θ m and link velocity . θ l . The PI controller is a proportional and integral controller for the error between the desired velocity . θ d and output velocity u. The VREC comprises pure ripple (m or n) and joint velocity (motor velocity or link velocity). The pure ripple m is the error between motor velocity and rigid-body velocity. As well as the pure ripple, n is the error between link velocity and rigid-body velocity. Therefore, according to the joint velocity, the proposed method can be classed as the motor-side controller and link-side controller, as shown in Figure 4a,b, respectively. nonlinear and time-varying factors, such as the nonlinear torques, frictions, and damping effects in the motor side and transmission, and the varying efficiency of harmonic drive (60-75% depending on ratio, velocity, and lubricant). In particular, the stiffness and damping of harmonic drive are related to the motion velocity. Therefore, the two-inertia model cannot fit the phase of actual system characteristics well [37]. However, the amplitude-frequency fitting accuracy can accurately fit the system's anti-resonance and resonance characteristics, proving that the two-inertia model can reflect the joint's dynamic characteristics well. The anti-resonance frequency a ω and resonance frequency r ω are located at 19 Hz and 21 Hz, respectively. Next, the identified parameters of this modular drive joint are summarized in Table 1.

Controller Design
The proposed method in this paper contains an RBVS, a VREC, and a PI controller, as shown in Figure 4, and aims to eliminate velocity ripple by adding equivalent system damping. The added equivalent damping term is developed by feeding back the velocity u of VREC output to the PI controller. As for the RBVS, rigid-body velocity r θ  can be obtained by the weighted sum of motor velocity m θ  and link velocity l θ  . The PI controller is a proportional and integral controller for the error between the desired velocity d θ  and output velocity u . The VREC comprises pure ripple ( m or n ) and joint velocity (motor velocity or link velocity). The pure ripple m is the error between motor velocity and rigid-body velocity. As well as the pure ripple, n is the error between link velocity and rigid-body velocity. Therefore, according to the joint velocity, the proposed method can be classed as the motor-side controller and link-side controller, as shown in Figure 4a,b, respectively.   θ l , as shown in Equation (3).
Besides, the PI controller and coefficients α and β of the RBVS are defined as follows, which will be discussed in the next section:

Rigid-Body Velocity Solver Design
The rigid-body velocity . θ r is obtained based on the weighted sum of motor velocity and link velocity in the rigid-body velocity solver. Combined with the two-inertia model that has been given in Equation (1), rigid-body velocity . θ r can be derived from Equation (5). The input disturbance τ dis is not discussed at this time and is set to zero for simplicity. Among them, motor velocity is measured by the motor-side encoder. Link velocity is measured by the link-side encoder, as shown in Figure 5a.
by the motor-side encoder. Link velocity is measured by the link-side encoder, as shown in Figure 5a.
The transfer function from input torque m τ to rigid-body velocity r θ  can be obtained by: From Equations (2) and (6), the Bode diagram shows the transfer function from input torque m τ to motor velocity m θ  , link velocity l θ  and rigid-body velocity r θ  in Figure 5b, as the blue line, red line, and thick black line, respectively. As the modular drive joint identified results listed in Table 1, the motor viscous damping is higher than link viscous damping, which leads to the magnitude of motor velocity frequency response being lower than the link velocity frequency response. The transfer function from input torque τ m to rigid-body velocity . θ r can be obtained by: .
From Equations (2) and (6), the Bode diagram shows the transfer function from input torque τ m to motor velocity . θ m , link velocity . θ l and rigid-body velocity . θ r in Figure 5b, as the blue line, red line, and thick black line, respectively. As the modular drive joint identified results listed in Table 1, the motor viscous damping is higher than link viscous damping, which leads to the magnitude of motor velocity frequency response being lower than the link velocity frequency response.
As stated by the Bode diagram from input torque τ m to rigid-body velocity . θ r , there are no anti-resonance and resonance behaviors. Consequently, the system from input torque τ m to rigid-body velocity . θ r is an ideal rigid-body system without any velocity ripple. The velocity obtained from the weighted sum of motor velocity and link velocity is an ideal rigid-body velocity.

Motor-Side Controller Design
Based on the rigid-body velocity discussed in Section 3.1, the motor-side controller can be simplified as a PI controller and a VREC. The VREC feeds back the velocity u to the desired velocity . θ d input to the PI controller. The pure ripple m is obtained from the error between motor velocity and rigid-body velocity after the proportional gain K tuning, as shown in Figure 6.

Motor-Side Controller Design
Based on the rigid-body velocity discussed in Section 3.1, the motor-side controller can be simplified as a PI controller and a VREC. The VREC feeds back the velocity u to the desired velocity d θ  input to the PI controller. The pure ripple m is obtained from the error between motor velocity and rigid-body velocity after the proportional gain K tuning, as shown in Figure 6. to motor velocity m θ  can be given in Equation (7).
The closed-loop transfer function (s)   In Figure 6, the signal m is pure the ripple of motor velocity after being controlled by K. The symbol u is the sum of motor velocity and pure ripple m. The input disturbance τ dis is not discussed for simplicity θ m can be given in Equation (7).
The closed-loop transfer function P close m (s) from the desired velocity . θ d to motor velocity . θ m can be derived from the following equations.
In order to analyze the closed-loop transfer function performance of the motor-side controller, the viscous damping terms B m , B l , D are set to zero for simplicity. Then the closed-loop transfer function P close m (s) can be simplified, as in Equation (10).
Based on the modular drive joint identified results, the resonance frequency ω r is always larger than the anti-resonance frequency ω a , which leads to ω r 2 /ω a 2 being more than 1 and ξ m being positive permanently. Compared with the open-loop transfer function given in Equation (7), the closed-loop transfer function has an added equivalent damping term 2ξ m ω r s and an equivalent natural resonance term PIω r 2 , which increase system damping and system response performance, respectively. With the control parameter K being positive, the velocity ripple can be eliminated by the increased equivalent damping.

Link-Side Controller Design
Similarly, when the pure ripple n is obtained from the error between link velocity and rigid-body velocity, there could be a link-side controller to eliminate the velocity ripple by feeding back this error and link velocity to the PI controller, as shown in Figure 7.
than the anti-resonance frequency a ω , which leads to 2 2 r a ω ω being more than 1 and m ξ being positive permanently. Compared with the open-loop transfer function given in Equation (7), the closed-loop transfer function has an added equivalent damping term 2 m r s ξ ω and an equivalent natural resonance term 2 r PIω , which increase system damping and system response performance, respectively. With the control parameter K being positive, the velocity ripple can be eliminated by the increased equivalent damping.

Link-Side Controller Design
Similarly, when the pure ripple n is obtained from the error between link velocity and rigidbody velocity, there could be a link-side controller to eliminate the velocity ripple by feeding back this error and link velocity to the PI controller, as shown in Figure 7. θ  can be given by Equation (11).
The closed-loop transfer function (s) l close P from the desired velocity d θ  to link velocity l θ  can be derived from the following. θ l can be given by Equation (11).
The closed-loop transfer function P close l (s) from the desired velocity . θ d to link velocity . θ l can be derived from the following.
Correspondingly, the viscous damping terms B m , B l , D are ignored for simplicity to analyze the closed-loop transfer function performance of the link-side controller. Therefore, the closed-loop transfer function P close l (s) can be simplified, as shown in Equation (14).
Compared to the open-loop transfer function given in Equation (11), the closed-loop transfer function adds an equivalent damping term 2ξ l ω r s and an equivalent natural resonance term PIω r 2 .
When the K is negative, the added equivalent damping term becomes positive, and then the system damping can be increased. With the control parameter K and PI tuning, the velocity ripple can be eliminated by the increased equivalent damping.

Controller Parameter Analysis
In the proposed method, as discussed above, the motor-side controller and link-side controller have only one more control parameter K than a PI method. The PI method can also include two kinds of feedback (motor velocity feedback and link velocity feedback), as shown in Figure 8a,b, respectively. Compared to the open-loop transfer function given in Equation (11), the closed-loop transfer function adds an equivalent damping term 2 l r s ξ ω and an equivalent natural resonance term 2 r PIω .
When the K is negative, the added equivalent damping term becomes positive, and then the system damping can be increased. With the control parameter K and PI tuning, the velocity ripple can be eliminated by the increased equivalent damping.

Controller Parameter Analysis
In the proposed method, as discussed above, the motor-side controller and link-side controller have only one more control parameter K than a PI method. The PI method can also include two kinds of feedback (motor velocity feedback and link velocity feedback), as shown in Figure 8a,b, respectively. Firstly, the PI parameters need to be designed before the proposed method application. Based on the integral of squared error (ISE) criterion [38], the proportional and integral gain of the motor Firstly, the PI parameters need to be designed before the proposed method application. Based on the integral of squared error (ISE) criterion [38], the proportional and integral gain of the motor velocity feedback PI controller are designed as K p = 480 and K i = 2400. The proportional and integral gain of the link velocity feedback PI controller are designed as K p = 168 and K i = 1200.

Parameters of Motor-Side Controller
For a modular drive joint, the elimination of velocity ripple is mainly to suppress velocity ripple occurring on the link side. This is based on the closed-loop transfer function from the desired velocity to motor velocity with the motor-side controller, as expressed in Equation (10) and Figure 6. Naturally, the transfer function from the desired velocity to link velocity can be given by Equation (15).
The closed-loop transfer function from the desired velocity to link velocity has an added equivalent damping term 2ξ m ω r s and an equivalent natural resonance term PIω r 2 compared to the open-loop transfer function. The parameter K can be expressed by Equation (16).
When the damping ratio ξ m of the closed-loop transfer function is under damping, critical damping, and over damping, such as ξ m = 0.2, ξ m = 1, ξ m = 2, as well as the special damping ratio ξ m = 0.707, the parameter K can be obtained from Equation (16) based on the identified parameters listed in Table 1 and the above parameters K p and K i , as shown in Table 2. The closed-loop Bode diagrams of motor-side controller from the desired velocity to motor velocity with different parameters K are shown in Figure 9. The closed-loop Bode diagrams of motor-side controller from the desired velocity to motor velocity with different parameters K are shown in Figure 9. As the parameter K increases (the damping ratio increases), the system damping gradually increases, which leads to the velocity ripple being damped, however, this decreases the closed-loop control bandwidth. The parameter K as well as the proportional and integral gain p K and i K are designed to be those in Table 3. Under the current parameters, the amplitude margin and phase margin of the closed-loop frequency response are sufficient. The amplitude margin and phase margin are 22.9 dB and 58.7 deg, respectively, which proves the system is stable after closed-loop control. θ m with different parameters K: (a) amplitudefrequency characteristic; (b) phase-frequency characteristic.

Open-loop
As the parameter K increases (the damping ratio increases), the system damping gradually increases, which leads to the velocity ripple being damped, however, this decreases the closed-loop control bandwidth. The parameter K as well as the proportional and integral gain K p and K i are designed to be those in Table 3. Under the current parameters, the amplitude margin and phase margin of the closed-loop frequency response are sufficient. The amplitude margin and phase margin are 22.9 dB and 58.7 deg, respectively, which proves the system is stable after closed-loop control.

Parameters of Link-Side Controller
The link-side controller, shown in Figure 7, shows that the closed-loop transfer function from the desired velocity to link velocity is expressed in Equation (14). Based on the foregone proportional and integral gain of K p = 168 and K i = 1200, the parameter K of the link-side controller can be obtained by Equation (17).
Similarly, when the damping ratio ξ l of the closed-loop transfer function represents under damping, critical damping, and over damping, such as ξ l = 0.2, ξ l = 1, ξ l = 2, as well as the special damping ratio ξ l = 0.707, the different parameters K can be summarized in Table 4, based on the identified parameters listed in Table 1 and the above parameters K p and K i . The closed-loop Bode diagram of the link-side controller from the desired velocity to link velocity with different parameters K are shown in Figure 10.
In a similar way, with parameter K increasing (damping ratio increasing), the system damping gradually increases, which lets the velocity ripple eliminate but decreases the closed-loop control bandwidth. Since there is no anti-resonance point in the transfer function from the desired velocity to link velocity, the phase will drop quickly, and the system is easy to diverge [39]. Therefore, the control parameters of the link-side controller should be very conservative. The parameter K as well as the proportional-integral gain K p and K i are set in Table 5. The closed-loop Bode diagram of the link-side controller from the desired velocity to link velocity with different parameters K are shown in Figure 10. In a similar way, with parameter K increasing (damping ratio increasing), the system damping gradually increases, which lets the velocity ripple eliminate but decreases the closed-loop control bandwidth. Since there is no anti-resonance point in the transfer function from the desired velocity to link velocity, the phase will drop quickly, and the system is easy to diverge [39]. Therefore, the control parameters of the link-side controller should be very conservative. The parameter K as well as the proportional-integral gain p K and i K are set in Table 5.

Simulations and Experiments
Simulations and experiments are conducted to verify the effectiveness of this proposed method (named Prop method in this paper), using the modular drive joint's identified parameters, as listed in Table 1. The control parameters of the motor-side controller and link-side controller are scheduled in Tables 3 and 5. The experimental platform is described in Section 2. The sampling frequency of the controller and the experimental platform is 1 kHz. In simulations and experiments, a variable velocity tracking from high velocity to low velocity is used for verifying the effectiveness of velocity ripple elimination at different velocities. Next, the system stability is confirmed by an input disturbance suppression. Finally, with the load inertia changing in the range of 30% in the premise of unchangeable identified model parameters and control parameters, the robust performance is verified. This Prop method is compared with the traditional pure PI method, the conventional method (named Conv method in this paper) present in [32] and the conventional method improved in [35] based on a state observer (named Csob method in this paper), to prove its advantages.

Motor-Side Controller Simulations and Experiments
In the motor-side controller's simulations and experiments, the modular drive joint is controlled by the PI method, Conv method, Csob method, and the Prop method. In order to fairly compare the effects of these methods, it is necessary to ensure the same proportional and integral gain of these methods. Above all, the PI method has two parameters. The Conv method has six parameters. The Csob method has four parameters. Meanwhile, the Prop method only has three parameters. The control parameters of these four methods are summarized in Table 6.

Velocity Ripple Elimination
A motor-side desired step velocity is triggered at 0.1 s to get 1000 rpm (0.66 rad/s of link-side velocity) and keeps constant motion at this velocity, then is reduced to 500 rpm (0.33 rad/s of link-side velocity) at 1.5 s. The link velocity tracking with these four different methods in simulations and experiments is shown in Figure 11a,

Velocity Ripple Elimination
A motor-side desired step velocity is triggered at 0.1 s to get 1000 rpm (0.66 rad/s of link-side velocity) and keeps constant motion at this velocity, then is reduced to 500 rpm (0.33 rad/s of linkside velocity) at 1.5 s. The link velocity tracking with these four different methods in simulations and experiments is shown in Figure 11a,b, respectively. The black dotted line is link velocity tracking with the PI method. The blue dot-and-dash line is the Conv method. The green dot-and-dash line is the Csob method. The red solid thick line is the Prop method. As the simulation results show in Figure 11a, when the velocity ripple at 0.66 rad/s is eliminated within 10%, the decay time of the Prop method is around 61% less than that of the PI method and As the simulation results show in Figure 11a, when the velocity ripple at 0.66 rad/s is eliminated within 10%, the decay time of the Prop method is around 61% less than that of the PI method and Conv method. When the velocity ripple at 0.33 rad/s is eliminated within 10%, the decay time of the Prop method is 56% less than that of the PI method and Conv method. However, the Csob method does not work with motor velocity feedback control.
As for the experiment results shown in Figure 11b, when the velocity ripple at 0.66 rad/s is eliminated within 10%, the decay time of the Prop method is 49% less than that of the PI method and Conv method (Prop method: 0.221 s; PI method and Conv method: 0.431 s). When the velocity ripple at 0.33 rad/s is eliminated within 10%, the decay time of the Prop method is 55% less than that of the PI method and Conv method. However, the Csob method does not work with motor velocity feedback control.
In actual applications, the modular drive joint is a complex nonlinear system influenced by some nonlinear and time-varying factors, such as the nonlinear torques, frictions, damping effects, and the varying efficiency of harmonic drive. Above all, the transmission error of harmonic drive will induce velocity ripple during low-speed uniform motion, which is twice the frequency of the motion velocity [40]. In simulations, the transmission error model of harmonic drive is not modeled in the objective two-inertia model of modular drive joints, so there is no velocity ripple during low-speed uniform motion at 0.33 rad/s, shown in Figure 11a. Actually, during the uniform motion at 0.33 rad/s from 2 s to 3 s, the Prop method can effectively suppress velocity ripple in experiments. Meanwhile, with the added equivalent system damping increasing, the velocity response is slowed down, as shown in the partial enlarged drawing of Figure 11b. The Conv method has a phase adjuster, which means the Conv method can only damp a limited range of velocity ripple frequencies around the system resonance frequency. When the twice frequency of motion velocity is much lower than the system resonance frequency, the Conv method cannot eliminate the twice-frequency ripple frequency. The Csob method has a state observer to obtain the rigid-body velocity indirectly. When the observed motor velocity approaches the actual motor velocity, the rigid-body velocity can be obtained. Above all, there is a motor-side nominal model in the state observer, which means the Csob method's bandwidth with motor velocity feedback control is limited by the anti-resonance. Under the premise of the same proportional and integral gain for a fair comparison, the Csob method's bandwidth is much lower than the other methods. The added damping term is too small to eliminate velocity ripple with the Conv method and Csob method because the system resonance frequency is too close to the anti-resonance frequency.

Input Disturbance Suppression
In practical applications, the modular drive joint is influenced by some input disturbance, which reduces the control accuracy and system stability. Therefore, a 6 A shock input current is triggered at 0.1 s to act as the input disturbance, while the desired velocity is held at 0 rad/s. With the same input disturbance trigger, the suppressive effects of input disturbance with the PI method, the Conv method, the Csob method, and the Prop method in simulations and experiments are shown in Figure 12a,b, respectively. In these figures, the black dotted line is the PI method. The blue dot-and-dash line is the Conv method. The green dot-and-dash line is the Csob method. The red solid thick line is the Prop method. motor velocity approaches the actual motor velocity, the rigid-body velocity can be obtained. Above all, there is a motor-side nominal model in the state observer, which means the Csob method's bandwidth with motor velocity feedback control is limited by the anti-resonance. Under the premise of the same proportional and integral gain for a fair comparison, the Csob method's bandwidth is much lower than the other methods. The added damping term is too small to eliminate velocity ripple with the Conv method and Csob method because the system resonance frequency is too close to the anti-resonance frequency.

Input Disturbance Suppression
In practical applications, the modular drive joint is influenced by some input disturbance, which reduces the control accuracy and system stability. Therefore, a 6 A shock input current is triggered at 0.1 s to act as the input disturbance, while the desired velocity is held at 0 rad/s. With the same input disturbance trigger, the suppressive effects of input disturbance with the PI method, the Conv method, the Csob method, and the Prop method in simulations and experiments are shown in Figure 12a,b, respectively. In these figures, the black dotted line is the PI method. The blue dot-and-dash line is the Conv method. The green dot-and-dash line is the Csob method. The red solid thick line is the Prop method. As discussed above, the added equivalent damping term is too small to effectively damp input disturbance with motor velocity feedback of the Conv method and Csob method. When the velocity As discussed above, the added equivalent damping term is too small to effectively damp input disturbance with motor velocity feedback of the Conv method and Csob method. When the velocity ripple is suppressed within 10% of the maximum velocity ripple value, the decay time of the Prop method is 45% less than the other three methods (PI method, Conv method, Csob method) in simulations and 68% less in experiments (Prop method: 0.114 s; PI method: 0.357 s).
In actual experiments, the modular drive joint is influenced by the nonlinear stiffness of harmonic drive. Especially when the modular drive joint is started and/or stopped, the nonlinear stiffness seriously affects the response performance and steady-state performance of the link-side velocity, which does not occur in simulations. Therefore, the system stabilization time after the input disturbance needs longer in experiments. Compared to simulations, the magnitude of link velocity response induced by input disturbance is much lower than that of simulations because of the actual time-varying frictions and viscous damping effects.

Robust Performance to Load Inertia Changes
When the collaborative robot changes poses, the modular drive joint will receive different load inertias. In simulations, with the unchangeable identified model parameters listed in Table 1 and control parameters listed in Table 3, different load inertias were taken to verify the robust performance, 15% increased (J l = 2.60 kg·m 2 ) and 15% decreased (J l = 1.92 kg·m 2 ), on the basis of load inertia J l = 2.26 kg·m 2 . In experiments, the load inertia is changed by loading or unloading the loads (weights) at the end of the connecting rod, as shown in Figure 1.
In Figure 13, the solid red line is link velocity ripple with load inertia J l = 2.26 kg·m 2 . The black dotted line is link velocity ripple with 15% increased load inertia J l = 2.60 kg·m 2 . The blue dot-and-dash line is link velocity ripple with 15% decreased load inertia J l = 1.92 kg·m 2 . Changing load inertia in the range of 30%, the Prop method can hold its stability and have a similar elimination effect on velocity ripple. Figure 13b shows velocity ripple during low-speed uniform motion at 0.33 rad/s, which is caused by the transmission error of harmonic drive. The transmission error model is not considered in the two-inertia model (modular drive joint model) in simulations. Therefore, there is no velocity ripple during low-speed uniform motion in simulations. dash line is link velocity ripple with 15% decreased load inertia 1.92 l J = kg·m 2 . Changing load inertia in the range of 30%, the Prop method can hold its stability and have a similar elimination effect on velocity ripple. Figure 13b shows velocity ripple during low-speed uniform motion at 0.33 rad/s, which is caused by the transmission error of harmonic drive. The transmission error model is not considered in the two-inertia model (modular drive joint model) in simulations. Therefore, there is no velocity ripple during low-speed uniform motion in simulations.
In conclusion, the simulation and experiment decay time reduced percentage effects of the Conv method, Csob method, and Prop method compared to the PI method with the motor-side controller, summarized in Table 7.  In conclusion, the simulation and experiment decay time reduced percentage effects of the Conv method, Csob method, and Prop method compared to the PI method with the motor-side controller, summarized in Table 7.

Link-Side Controller Simulations and Experiments
As for the simulations and experiments of the link-side controller, the modular drive joint is also controlled by the PI method, Conv method, Csob method, and the Prop method, which have two parameters, six parameters, four parameters, and three parameters, respectively. To fairly compare the effects of these four different methods, the same proportional and integral gain of these methods needs to be guaranteed. The control parameters of these four different methods are summarized in Table 8. Table 8. Control parameters of these four methods with link-side controller.

Methods
Proportional Gain K p

Velocity Ripple Elimination
Similarly, a motor-side desired step velocity is triggered at 0.1 s to get 1000 rpm (0.66 rad/s of link-side velocity) and keeps uniform motion at this velocity, then is reduced to 500 rpm (0.33 rad/s of link-side velocity) at 1.5 s. The link velocity tracking with these four different methods in simulations and experiments is shown in Figure 14a Similarly, a motor-side desired step velocity is triggered at 0.1 s to get 1000 rpm (0.66 rad/s of link-side velocity) and keeps uniform motion at this velocity, then is reduced to 500 rpm (0.33 rad/s of link-side velocity) at 1.5 s. The link velocity tracking with these four different methods in simulations and experiments is shown in Figure 14a,b, respectively. The black dotted line is link velocity tracking with the PI method. The blue dot-and-dash line is the Conv method. The green dotand-dash line is the Csob method. The red solid thick line is the Prop method. With the link-side controller, the Conv method and Csob method have obvious effects compared to the motor-side controller. The added equivalent damping term is only related to the system resonance frequency but not related to the system anti-resonance frequency. As the simulation results show in Figure 14a, when the velocity ripple at 0.66 rad/s is eliminated within 10%, the decay time of the Conv method is around 51% less than that of the PI method. The Csob method is around 77% less. Furthermore, the Prop method is around 86% less. When the velocity ripple at 0.33 rad/s is eliminated within 10%, the decay time of the Conv method is around 60% less than that of the PI method. The Csob method is around 71% less. Moreover, the Prop method is around 83% less.
As the experiment results show in Figure 14b, when the velocity ripple at 0.66 rad/s is eliminated within 10%, the decay time of the Conv method is around 52% less than that of the PI method. The Csob method is around 57% less. The Prop method is around 69% less. When the velocity ripple is at 0.33 rad/s, the Csob method and Prop method can suppress 67% of the velocity ripple during lowspeed uniform motion at 0.33 rad/s (amplitude of velocity ripple in the PI method: 0.03 rad/s; amplitude of velocity ripple in the Prop method: 0.01 rad/s), as shown in the partial enlarged drawing of Figure 14b. In contrast, the Conv method has the phase adjuster aiming to eliminate the velocity ripple around system resonance, which leads to the invalid elimination work during low-speed uniform motion at 0.33 rad/s. With the link-side controller, the Conv method and Csob method have obvious effects compared to the motor-side controller. The added equivalent damping term is only related to the system resonance frequency but not related to the system anti-resonance frequency. As the simulation results show in Figure 14a, when the velocity ripple at 0.66 rad/s is eliminated within 10%, the decay time of the Conv method is around 51% less than that of the PI method. The Csob method is around 77% less. Furthermore, the Prop method is around 86% less. When the velocity ripple at 0.33 rad/s is eliminated within 10%, the decay time of the Conv method is around 60% less than that of the PI method. The Csob method is around 71% less. Moreover, the Prop method is around 83% less.
As the experiment results show in Figure 14b, when the velocity ripple at 0.66 rad/s is eliminated within 10%, the decay time of the Conv method is around 52% less than that of the PI method. The Csob method is around 57% less. The Prop method is around 69% less. When the velocity ripple is at 0.33 rad/s, the Csob method and Prop method can suppress 67% of the velocity ripple during low-speed uniform motion at 0.33 rad/s (amplitude of velocity ripple in the PI method: 0.03 rad/s; amplitude of velocity ripple in the Prop method: 0.01 rad/s), as shown in the partial enlarged drawing of Figure 14b. In contrast, the Conv method has the phase adjuster aiming to eliminate the velocity ripple around system resonance, which leads to the invalid elimination work during low-speed uniform motion at 0.33 rad/s.

Input Disturbance Suppression
Likewise, a shock input current at 6 A acts as the input disturbance trigger at 0.1 s when the desired velocity is held at 0 rad/s. The suppression effects of input disturbance with the PI method (black dotted line), Conv method (blue dot-and-dash line), Csob method (green dot-and-dash line), and Prop method (red solid thick line) in simulations and experiments are shown in Figure 15a,b, respectively. Actuators 2020, 9, x FOR PEER REVIEW 16 of 20

Input Disturbance Suppression
Likewise, a shock input current at 6 A acts as the input disturbance trigger at 0.1 s when the desired velocity is held at 0 rad/s. The suppression effects of input disturbance with the PI method (black dotted line), Conv method (blue dot-and-dash line), Csob method (green dot-and-dash line), and Prop method (red solid thick line) in simulations and experiments are shown in Figure 15a,b, respectively. In simulations, when the velocity ripple is suppressed within 10% of the maximum velocity ripple value, the decay time of the Conv method is 34% less than the PI method. The Csob method is 58% less. Moreover, the Prop method is 47% less. In experiments, when the velocity ripple is suppressed within 10% of the maximum velocity ripple value, the decay time of the Conv method is 16% less than the PI method. The Csob method is 59% less. Furthermore, the Prop method is 68% less (Prop method: 0.122 s; PI method: 0.386 s).
Comparing Figure 15b with Figure 15a, the magnitude of link velocity response in experiments induced by the input disturbance is much lower than that in simulations because of the actual timevarying frictions and viscous damping effects. In simulations, when the velocity ripple is suppressed within 10% of the maximum velocity ripple value, the decay time of the Conv method is 34% less than the PI method. The Csob method is 58% less. Moreover, the Prop method is 47% less. In experiments, when the velocity ripple is suppressed within 10% of the maximum velocity ripple value, the decay time of the Conv method is 16% less than the PI method. The Csob method is 59% less. Furthermore, the Prop method is 68% less (Prop method: 0.122 s; PI method: 0.386 s).
Comparing Figure 15b with Figure 15a, the magnitude of link velocity response in experiments induced by the input disturbance is much lower than that in simulations because of the actual time-varying frictions and viscous damping effects.

Robust Performance to Load Inertia Changes
To verify the robustness of the Prop method to load inertia changes, three different load inertias (J l = 1.92 kg·m 2 , J l = 2.26 kg·m 2 , J l = 2.60 kg·m 2 ) are applied to eliminate velocity ripple under unchangeable identified parameters and control parameters.
Based on the load inertia J l = 2.26 kg·m 2 (solid red line), when the load inertia increases 15% to J l = 2.60 kg·m 2 (black dotted line) or decreases 15% to J l = 1.92 kg·m 2 (blue dot-and-dash line), the velocity ripple with the Prop method always holds in the robust band. It eliminates velocity ripple effectively in simulations and experiments, as shown in Figure 16a,b, respectively. As mentioned previously, the experiments have periodical velocity ripple during low-speed uniform motion at 0.33 rad/s, which is caused by the transmission error of harmonic drive in experiments but not in simulations. In simulations, when the velocity ripple is suppressed within 10% of the maximum velocity ripple value, the decay time of the Conv method is 34% less than the PI method. The Csob method is 58% less. Moreover, the Prop method is 47% less. In experiments, when the velocity ripple is suppressed within 10% of the maximum velocity ripple value, the decay time of the Conv method is 16% less than the PI method. The Csob method is 59% less. Furthermore, the Prop method is 68% less (Prop method: 0.122 s; PI method: 0.386 s).
Comparing Figure 15b with Figure 15a, the magnitude of link velocity response in experiments induced by the input disturbance is much lower than that in simulations because of the actual timevarying frictions and viscous damping effects.

Robust Performance to Load Inertia Changes
To verify the robustness of the Prop method to load inertia changes, three different load inertias  In summary, Table 9 summarizes the simulations and experiments of decay time reduced percentage effects of the Conv method, Csob method, and Prop method compared to the PI method with the link-side controller. As discussed in Sections 4.1 and 4.2, comparing the motor-side controller with the link-side controller, the motor-side controller indirectly eliminates link velocity ripple, while the link-side controller directly eliminates link velocity ripple. In the motor-side controller, the control band is limited by the anti-resonance; however, the phase margin is improved by the influenced anti-resonance. On the contrary, the link-side controller with no anti-resonance increases the control band but with a rapidly decreasing phase margin. To be exact, the motor-side controller has a slower response performance, but the controller is more stable. While the link-side controller has faster response performance and a more effective velocity ripple suppression effect, the controller is easy to diverge. All in all, the motor-side controller and link-side controller both have more velocity ripple elimination effectiveness compared to the PI method, Conv method, and Csob method, whether in simulations or experiments.

Conclusions and Future Work
This paper proposed a robust method to damp velocity ripple based on dual encoders. The method contains a rigid-body velocity solver and a velocity ripple elimination controller. In order to obtain rigid-body velocity, the rigid-body velocity solver is designed by the weighted sum of dual encoders' velocities-motor velocity and link velocity directly getting rigid-body velocity. The velocity ripple elimination controller can be divided into the motor-side controller and link-side controller according to the feedback velocity, which adds an equivalent system damping term compared to the open-loop transfer function. Some simulations and experiments were carried out with the motor-side controller and link-side controller, respectively, to verify elimination effects on velocity ripple and input disturbance, even the robust performance. The proposed method had minimal control parameters and obvious advantages (on average better than 50% effects in the motor-side controller and 60% effects in the link-side controller) over the PI method, conventional method, and improved conventional method, whether in simulations or experiments. Meanwhile, to some extent, with the added equivalent system damping increasing, the system response was slowed down. In the future, the proposed method will be applied to robotic arm control to achieve velocity ripple elimination when the robotic arm's inertia changes in an extensive range during its posture changing.