**4. Synchronization with external signals**

Once the movement is learned we can change its frequency. The new frequency can be determined from an external signal using the canonical dynamical system. This allows easy synchronization to external measured signals, such as drumming, already presented in Section 3.3. In this section we show how we applied the system to a rope turning task, which is task that requires continuous cooperation of a human and a robot. We also show how we can synchronize to an EMG signal, which is inherently very noisy.

## **4.1 Robotic rope turning**

We performed the rope-turning experiment on a Mitsubishi PA-10 robot with a JR-3 force/torque sensor attached to the top of the robot to measure the torques and forces in the string. Additionally, an optical system (Optotrak Certus) was used for validation, i.e. for measuring the motion of a human hand. The two-layered control system was implemented in Matlab/Simulink. The imitation system provides a pre-defined desired circular trajectory for the robot. The motion of a robot is constrained to up-down and left-right motion using inverse kinematics. Figure 14 shows the experimental setup.

Determining the frequency is done using the canonical dynamical system. Fig. 15 left shows the results of frequency extraction (top plot) from the measured torque signal (second plot). The frequency of the imitated motion quickly adapts to the measured periodic signal. When the rotation of the rope is stable, the human stops swinging the rope and maintains the hand in a fixed position. The movement of the human hand is shown in the third plot. In the last plot we show the movement of the robot. By comparing the last two plots in Fig. 15 left, we can see that after 3 s the energy transition to the rope is done only by the motion of the robot.

extraction (third plot) from the envelope (second plot) of the measured EMG signal (top plot). The bottom plots show the power spectrums of the input signal from 0 s to 30 s, from 30 s to 60 s and from 60 s to 90 s, respectively. The power spectrums were determined off-line.

<sup>23</sup> Performing Periodic Tasks: On-Line Learning,

EMG HOAP-3

Fig. 16. Proposed two-layered structure of the control system for synchronizing the robotic

*r*

0 0.2 0.4 0.6 y

> 0 0.2 0.4 0.6

y

Fig. 17. *Left*:Raw EMG signal in the top plot and envelope of the EMG signal, which is the input into the proposed system, in the second plot. The third plot shows the extracted frequency Ω. The bottom plots show the power spectrum of the signal at different times (determined off-line). *Right*: Extracted frequency in the top plot. Comparison between the

frequency-extraction system, and the generated output trajectory for the robot arm (*x*) is

Fig. 17 right show the comparison between the envelope of the measured and rectified EMG signal (*y*), and the generated movement signal (*x*). As we can see the proposed system

Ω [rad] *x*

<sup>0</sup> <sup>30</sup> <sup>60</sup> <sup>90</sup> <sup>0</sup>

<sup>0</sup> <sup>30</sup> <sup>60</sup> <sup>90</sup> −0.2

x y

<sup>30</sup> <sup>35</sup> <sup>40</sup> <sup>45</sup> −0.2

t [s]

*ydemo* CDS ODS *wi*

motion to the EMG signal.

yraw

y

5

0 5 10 15

Ω [rad]

Ω [rad]

> P ow.

0 30 60 90

Adaptation and Synchronization with External Signals

0 30 60 90

<sup>0</sup> <sup>30</sup> <sup>60</sup> <sup>90</sup> <sup>0</sup>

t [s]

0 5 10 15 Ω [rad]

shown in the middle and bottom plots.

0 5 10 15 Ω [rad]

envelope of the rectified EMG signal (*y*), which is used as the input into the

matches the desired movement of the robot with the measured movement.

AF AF l

The frequency of the task depends on the parameters of the rope, i.e. weight, length, flexibility etc., and the energy which is transmitted in to the rope. The rotating frequency of the rope can be influenced by the amplitude of the motion, i.e. how much energy is transmitted to the rope. The amplitude can be easily modified with the amplitude parameter *r*.

Fig. 15 right shows the behavior of the system, when the distance between the human hand and the top end of the robot (second plot) is changing, while the length of the rope remains the same, consequently the rotation frequency changes. The frequency adaptation is shown in the top plot. As we can see, the robot was able to rotate the rope and maintain synchronized even if disturbances like changing the distance between the human hand and the robot occur. This shows that the system is adaptable and robust.

#### **4.2 EMG based human-robot synchronization**

In this section we show the results of synchronizing robot movement to an EMG signal measured from the human biceps muscle. More details can be found at (Petriˇc et al., 2011). The purpose of this experiment is to show frequency extraction from a signal with a low signal-to-noise ratio. This type of applications can be used for control of periodic movements of limb prosthesis (Castellini & Smagt, 2009) or exoskeletons.

In our experimental setup we attached an array of 3 electrodes (Motion Control Inc.) over the biceps muscle of a subject and asked the subject to flex his arm when he hears a beep. The frequency of beeping was 1 Hz from the start of the experiment, then changed to 0.5 Hz after 30 s, and then back to 1 Hz after additional 30 s. Fig. 16 left shows the results of frequency

Fig. 15. *Left*: the initial frequency adaptation process (top plot) of the cooperative human-robot rope turning. The second plot shows the measured torque signal. The third plot shows the movement of a human hand, and the bottom plot shows the movement of a robot. *Right*: the behavior of our proposed system when human changes the distance between human hand and top end of the robot. Frequency adaptation is shown in the top plot, and the second plot shows the measured torque signal. The third plot shows the movement of a human hand, and the bottom plot shows the movement of a robot.

20 Will-be-set-by-IN-TECH

The frequency of the task depends on the parameters of the rope, i.e. weight, length, flexibility etc., and the energy which is transmitted in to the rope. The rotating frequency of the rope can be influenced by the amplitude of the motion, i.e. how much energy is transmitted to the

Fig. 15 right shows the behavior of the system, when the distance between the human hand and the top end of the robot (second plot) is changing, while the length of the rope remains the same, consequently the rotation frequency changes. The frequency adaptation is shown in the top plot. As we can see, the robot was able to rotate the rope and maintain synchronized even if disturbances like changing the distance between the human hand and the robot occur.

In this section we show the results of synchronizing robot movement to an EMG signal measured from the human biceps muscle. More details can be found at (Petriˇc et al., 2011). The purpose of this experiment is to show frequency extraction from a signal with a low signal-to-noise ratio. This type of applications can be used for control of periodic movements

In our experimental setup we attached an array of 3 electrodes (Motion Control Inc.) over the biceps muscle of a subject and asked the subject to flex his arm when he hears a beep. The frequency of beeping was 1 Hz from the start of the experiment, then changed to 0.5 Hz after 30 s, and then back to 1 Hz after additional 30 s. Fig. 16 left shows the results of frequency

0.8 1 1.2 1.4 1.6

−0.2 0 0.2

−0.1 0 0.1

0 10 20 30 40

t [s]

Ω [rad/s]

hz [m]

hx,y [m]

xx,y [m]

Fig. 15. *Left*: the initial frequency adaptation process (top plot) of the cooperative

human-robot rope turning. The second plot shows the measured torque signal. The third plot shows the movement of a human hand, and the bottom plot shows the movement of a robot. *Right*: the behavior of our proposed system when human changes the distance between human hand and top end of the robot. Frequency adaptation is shown in the top plot, and the second plot shows the measured torque signal. The third plot shows the movement of a human hand, and the bottom plot shows the movement of a robot.

rope. The amplitude can be easily modified with the amplitude parameter *r*.

This shows that the system is adaptable and robust.

of limb prosthesis (Castellini & Smagt, 2009) or exoskeletons.

0 1 2 3 4 5 6 7

t [s]

**4.2 EMG based human-robot synchronization**

−1 0 1

−0.2 0 0.2

−0.1 0 0.1

hx,y [m]

xx,y [m]

yx,y [Nm]

Ω [rad/s] extraction (third plot) from the envelope (second plot) of the measured EMG signal (top plot). The bottom plots show the power spectrums of the input signal from 0 s to 30 s, from 30 s to 60 s and from 60 s to 90 s, respectively. The power spectrums were determined off-line.

Fig. 16. Proposed two-layered structure of the control system for synchronizing the robotic motion to the EMG signal.

Fig. 17. *Left*:Raw EMG signal in the top plot and envelope of the EMG signal, which is the input into the proposed system, in the second plot. The third plot shows the extracted frequency Ω. The bottom plots show the power spectrum of the signal at different times (determined off-line). *Right*: Extracted frequency in the top plot. Comparison between the envelope of the rectified EMG signal (*y*), which is used as the input into the frequency-extraction system, and the generated output trajectory for the robot arm (*x*) is shown in the middle and bottom plots.

Fig. 17 right show the comparison between the envelope of the measured and rectified EMG signal (*y*), and the generated movement signal (*x*). As we can see the proposed system matches the desired movement of the robot with the measured movement.

Buchli, J., Righetti, L. & Ijspeert, A. J. (2008). Frequency Analysis with coupled nonlinear

<sup>25</sup> Performing Periodic Tasks: On-Line Learning,

Buehler, M., Koditschek, D. & Kindlmann, P. (1994). Planning and Control of Robotic Juggling and Catching Tasks, *The International Journal of Robotics Research* 13(2): 101–118. Cafuta, P. & Curk, B. (2008). Control of nonholonomic robotic load, *Advanced Motion Control,*

Calinon, S., Guenter, F. & Billard, A. (2007). On learning, representing, and generalizing a

Castellini, C. & Smagt, P. v. d. (2009). Surface emg in advanced hand prosthetics, *Biological*

Filho, A. C. d. P., Dutra, M. S. & Raptopoulos, L. S. C. (2005). Modeling of a bipedal

Fukuoka, Y., Kimura, H. & Cohen, A. H. (2003). Adaptive Dynamic Walking of a Quadruped

Furuta, K. (2003). Control of pendulum: from super mechano-system to human adaptive

Gams, A., Ijspeert, A. J., Schaal, S. & Lenarcic, J. (2009). On-line learning and modulation of periodic movements with nonlinear dynamical systems, *Auton. Robots* 27(1): 3–23. Gams, A., Žlajpah, L. & Lenarˇciˇc, J. (2007). Imitating human acceleration of a gyroscopic

Gangadhar, G., Joseph, D. & Chakravarthy, V. (2007). An oscillatory neuromotor model of

Haken, H., Kelso, J. A. S. & Bunz, H. (1985). A theoretical model of phase transitions in human hand movements, *Biological Cybernetics* 51: 347–356. 10.1007/BF00336922. Hashimoto, K. & Noritsugu, T. (1996). Modeling and control of robotic yo-yo with

Heyda, P. G. (2002). Roller ball dynamics revisited, *American Journal of Physics*

Hollerbach, J. M. (1981). An oscillation theory of handwriting, *Biological Cybernetics*

Ijspeert, A. J. (2008a). Central pattern generators for locomotion control in animals and robots:

Ijspeert, A. J. (2008b). Central pattern generators for locomotion control in animals and robots: A review, *Neural Networks* 21(4): 642 – 653. Robotics and Neuroscience. Ijspeert, A. J., Nakanishi, J. & Schaal, S. (2002). Movement imitation with nonlinear

Ilg, W., Albiez, J., Jedele, H., Berns, K. & Dillmann, R. (1999). Adaptive periodic movement

dynamical systems in humanoid robots, *Proc. IEEE Int. Conf. Robotics and Automation*,

control for the four legged walking machine bisam, *Robotics and Automation, 1999. Proceedings. 1999 IEEE International Conference on*, Vol. 3, pp. 2354 –2359 vol.3.

task in a humanoid robot, *Systems, Man, and Cybernetics, Part B: Cybernetics, IEEE*

robot using mutually coupled rayleigh oscillators, *Biological Cybernetics* 92: 1–7.

Robot on Irregular Terrain Based on Biological Concepts, *The International Journal of*

mechatronics, *Decision and Control, 2003. Proceedings. 42nd IEEE Conference on*, Vol. 2,

handwriting generation, *International Journal on Document Analysis and Recognition*

visual feedback, *Robotics and Automation, 1996. Proceedings., 1996 IEEE International*

Oscillators, *Physica D: Nonlinear Phenomena* 237: 1705–1718.

*Transactions on* 37(2): 286 –298.

Adaptation and Synchronization with External Signals

*Cybernetics* 100(1): 35–47.

10.1007/s00422-004-0531-1.

pp. 1498 – 1507 Vol.2.

70(10): 1049–1051.

pp. 1398–1403.

*Robotics Research* 22(3-4): 187–202.

device, *Robotica* 25(4): 501–509.

10: 69–84. 10.1007/s10032-007-0046-0.

*Conference on*, Vol. 3, pp. 2650 –2655 vol.3.

a review, *Neural Networks* 21(4): 642–653.

39: 139–156. 10.1007/BF00336740.

*2008. AMC '08. 10th IEEE International Workshop on*, pp. 631 –636.
