International Journal of Computational Intelligence Systems

We propose an online sensorimotor architecture for controlling a low-cost humanoid robot to perform dance movements synchronized with musical stimuli. The proposed architecture attempts to overcome the robot’s motor constraints by adjusting the velocity of its actuators and inter-changing the attended beat metrical-level on-the-ﬂy. Moreover, we propose quantitative metrics for measuring the level of beat-synchrony of the generated robot dancing motion and complement them with a qualitative survey about several aspects of the demonstrated robot dance performances. Tests with different dance movements and musical pieces demonstrated satisfactory beat-synchrony results despite the physical limitations of the robot. The comparison against robot dance sequences generated without inter-changing the attended metrical-level validated our sensorimotor approach for controlling beat-synchronous robot dancing motions using different dance movements and facing distinct musical tempo conditions.


Introduction
Rhythmic movement is ubiquitous in human and animal behaviors such as walking, swimming, and dancing. From these, dance movements typically respond to environmental rhythmic stimuli in the forms of motion and musical rhythm. The extension of dance to robotics can therefore provide new forms of embodied and rhythmic cognition 1 , which should improve the interactive bounding between robots and humans through the coordination (i.e., synchronization) between sounds and movements of all interactors. Such "interactional synchrony" de-mands a rapid locking between all rhythmic processes to a common phase and/or periodicity 2 , often described as entrainment phenomenon 3 . This phenomenon itself depends on a dynamic coupling and interplay between perception and action, which is pointed out by the way our observation and cognition of the environment influences our brain's motor faculties, and on the way the latter re-enacts what we perceive 4 . In dance, this sensorimotor coordination is led by a temporal correlation between the timing of the performed gestures and the regular pulses present in the music stimulus. These pulses, also known as beats (or solely beat), are tem-porally organized in a hierarchical structure of different metrical-levels, which is embedded in the socalled musical meter 5 .
Based on these principles, the proposed online sensorimotor architecture anticipates the musical beat of external musical stimuli, adapts the system on-the-fly, and reactively responds, in period (i.e., tempo) and phase (i.e., beat), with periodic robot dance movements. To achieve such beatsynchronous rhythmic motion while overcoming the robot's motor constraints, the proposed architecture adjusts both the robot actuators' velocities and the attended beat metrical-level according to the robot's "preferred tempo" 6 .
The developed robot dancing architecture controls a low-cost humanoid robot, Robonova-I 7 , by integrating two functional modules: i) a Musical Rhythm Analyzer (MRA), composed of an adaptive real-time audio beat tracker 8 ; and ii) the Robot Dancing Control (RDC) per se, which mediates the predicted beat-times and the actual robot dancing towards their synchronization. The dance movements are manually designed a priori and kept in a dance library. These movements are defined as periodic motion patterns composed of four dance steps around two key-poses. Each dance pattern is randomly selected at the time of performance, and is cyclically generated in an attempt to transit from one key-pose to another within two consecutive beats.
In order to evaluate the system according to the level of beat-synchrony of the robot dance performance, we propose quantitative evaluation metrics and report on a qualitative survey made to a group of students after a set of live demonstration trials.
The remainder of this paper is structured as follows. The next section presents some relevant implementations of dance-oriented robotic systems, and describes their approaches for providing rhythmic synchrony. Section 3 describes the proposed system architecture and its individual functional modules. Section 4 describes the experiments and evaluation procedures for quantitatively and qualitatively assessing the system. Section 5 presents and discusses the main quantitative and qualitative results. Finally, Section 6 concludes the paper and presents directions for future work.

Related Research
The first expressive dancing robots set back to the 80s through robotic art performances, where choreographers and cinematographers explored the emotional and aesthetic dimensions of robot movement into theater and movie characters 9 . Since then, worldwide researchers, supported by the latest advances on digital signal processing and robotic articulatory capabilities, have been trying to replicate human dancing in terms of rhythmic intelligence, motion style and complexity 10 .
Globally, it is possible to find in the literature autonomous dancing robots that range from omnidirectional egg-shaped mp3 players 11 , to quadrocopters 12 , creature-like toys 13 , Lego robots 14 , and low-cost humanoids 15 , 16 ; all applied to edutainment and/or child-care purposes.
All of these systems make use of different approaches for assuring autonomous dancing motions with some level of rhythmic synchrony. These include the real-time generation of motor-commands triggered by a FitzHugh-Nagumo neural network fed with musical beats on-the-fly 11 ; the generation of periodic side-to-side motions triggered in phase to the musical beats, previously detected off-line 12 ; simple periodic motor primitives controlled by the tempi of a metronome fed with live musical or visual stimuli 13 ; simple motion combinations reacting to multi-modal events, given by floor colors and multiple note-onsets' intensities 14 ; and the online generation of simple humanoid dancing sequences by interpolating random 15 or user-controllable 16 keypose combinations in phase to the musical beat.
Similarly to 15 and 16 we propose an online architecture for autonomously controlling a low-cost dancing humanoid in beat-synchrony to external musical stimuli. Yet, distinctly, we propose to overcome the robot's motor-rate constraints on-the-fly by changing not only the velocity of the robot motion but also the attended metrical-level, according to the predicted musical tempo. This sensorimotor control attempts to replicate the reciprocal coupling between mind and body by inter-changing both the robot's motor response and its rhythmic perception towards rhythmic synchronization. In addition, we propose metrics for evaluating the accuracy of the Online Synchronized Robot Dancing generated robot dancing motion in providing the desired beat-synchrony.

System Architecture
The developed robot dancing system is based on a modular architecture composed of two sub-systems, which communicate via User Datagram Protocol (UDP) sockets: i) a Musical Rhythm Analyzer, for tracking the beat of online musical stimuli, and ii) a Robot Dancing Control interface, for controlling the robot motion in beat-synchrony to the analyzed music. The implementation of a modular architecture, with two independent sub-systems is mainly justified by the distinct temporal resolutions of the music analysis and the robot control. Such architecture, depicted in Fig. 1  For the sake of clarification, a detailed fluxogram of the whole system's data-flow and messages exchange is depicted in Fig. 2.

Musical Rhythm Analyzer (MRA)
The MRA consists of a real-time audio beat tracker entitled IBT 8 . IBT is based on a competing multiagent system (MAS) which continuously considers multiple tempo and beat hypotheses, and at each moment retrieves the beat-events, i.e., beat phase, estimated by the current best agent, along with its resulting prediction for the next inter-beat-interval (IBI), i.e., beat period. These predictions are constantly sent to the RDC, which, if necessary, may respond with requests for locking the beat tracking onto a certain metrical-level, in order to assure the beat-synchrony of the robot dancing motion while overcoming its motor-rate limitations. This request is considered by generating a leading agent to pursuit a period at double or half * the tempo hypothesis followed by the best agent at the moment, ba, while keeping the same phase off-set. As such, if the MRA is requested to decrease (i.e., double) its metrical-level, a new IBT agent, a, is created with the following period, p a , phase, φ a , and score, Sc a : where the score of the agent defines the current relevance of its tempo and beat hypothesis among the other agents in the system. If, on the other hand, the MRA is requested to higher (i.e., halve) its metricallevel, a new IBT agent is created with the following parameters: where t is the time-frame when the metrical change request took place.

Robot Dancing Control (RDC)
The RDC sub-system performs the interface between the MRA and the robot itself. It is responsible for handling the beat and IBI estimates from the MRA and acknowledging the feedback from the robot movement while issuing the commands necessary to achieve the desired beat-synchrony of motion. The RDC combines four sub-modules: i) Robotic Platform (RP), ii) Dance Library (DL), iii) Internal Control (IC) and iv) Robot Control (RC). * IBT only considers simple duple meters (e.g., 2 2 , 2 4 , 4 4 ) for the musical input.

Catarina B. Santiago et al
Beat Event

First
Step  Figure 2: Data-flow of the sensorimotor robot dancing control.

Robotic Platform (RP)
As stated, our dancing control architecture was tested on Robonova-I 7 , which is a small (31cm height) off-the-shelf and low-cost humanoid robot, developed by Hitech, with 16 degrees of freedom and capable of performing structured movements. This humanoid supports serial inputs which enabled the use of a wireless Bluetooth dongle for the bidirectional communication between the IC and the RC modules. This enabled the computation from an external processing unit -a desktop computerwithout interfering wires.
Moreover, Robonova supports different kinds of sensors. By taking advantage of this capability, our test platform was additionally equipped with a sonar (MaxSonar EZ1 ultrasonic range finder † ) that enabled Robonova to react to close-by obstacles and objects, this way interacting with its surrounding environment. As such, whenever the robot detects near obstacles it stops dancing and starts tapping one of its feet, proclaiming the need of space to dance. This kind of behavior transmits personality to the robot, enhancing the animacy of its performance.

Dance Library (DL)
The DL was embedded in Robonova and was composed by a set of basic dancing patterns manually built a priori by recurring to the 'catch and † see datasheet at http://www.maxbotix.com/documents/MB1010_Datasheet.pdf.

Published by Atlantis Press
Copyright: the authors Online Synchronized Robot Dancing play' function of RoboBasic 17 , an ad-hoc BASIC programming language and control interface for Robonova. All movements were carefully designed to be natural and cyclic in order to provide a smooth dance performance. Each dance movement was described by a conjunction of four ordered dance steps, each one limited by two manually defined key-poses. The step generation is handled by the built-in low-level control of the robot's actuators which linearly interpolates one pose to another in a smooth transition, at the desired velocity. As such, besides the keyposes description, all steps were set to a default "minimum" velocity and provided three incremental variations of it through an uniform δ parameter. All dance movements, at all velocity variations, were defined to assure the robot balance during performance. In order to assure the desired beatsynchrony, the RC triggers a new transition between steps in time with the current beat-event estimate and measures the need of changing the robot velocity or the MRA's metrical-level. Fig. 3 exemplifies the composition of a robot dance movement.  During performance, the subsequent movements are always randomly selected from the DL by the RC at the end of each movement cycle (i.e., after a set of four consecutive steps).

Internal Control (IC)
The IC module is encoded inside the robot's processing unit and receives/sends commands from/to the RC through the Bluetooth wireless connection. This module may receive two types of commands: issue/continue movement and change velocity (+/-), and reply with two other: movement done and impossible to change velocity.
As depicted in Fig. 2, whenever a serial command arrives, the IC first checks the sonar value and verifies if the robot has space to dance. If an object is too close, the robot starts tapping its foot and ignores this command. Otherwise, the requested commands are processed as follows. In case of receiving a change velocity (+/-) request, the δ internal variable (see Section 3.2.2) is updated so that the robot can perform the movement faster or slower in order to keep up with the current IBI prediction. This δ velocity is only allowed to range within certain limits that are conditioned by the maximum velocity supported by the robot's servos, and by the maximum/minimum velocity at which the robot can perform a movement while keeping its balance. Whenever the maximum or minimum δ velocities are reached the IC informs the RC through an impossible to change velocity command.
In case of receiving an issue/continue movement command the IC requests the robot to respectively start a new movement (if issue) or proceed to the next step of the considered dance movement (if continue).
Whenever the robot completes a step, the IC replies to the RC with a movement done command and waits for a new issue/continue movement message.

Robot Control (RC)
Besides mediating the bi-directional communication between the MRA and the robot, and randomly selecting the dance movements from the DL, the RC module is also responsible for handling the beatsynchrony between the MRA predictions and the robot movements, both in period and phase.
In an attempt to keep period-synchrony between the current MRA predictions and the performed

Published by Atlantis Press
Copyright: the authors robot movement, the level of beat-synchrony is measured on-the-fly at the end of each movement step. This metric compares the MRA's prediction for the next IBI, IBI n+1 = b n − b n−1 , which is given by the time-difference between the last two estimated beat events, b n and b n−1 , with the current step period, ∆S n = k n − k n , within a tolerance of 75 ms ‡ . The ∆S n measures the time-duration between the current step-trigger timing, k n , acknowledged by an issue/continue movement command sent to the IC, and its step-completion timing, k n , acknowledged by the IC's reply with a movement done message. Therefore, the robot dance performance is considered unsynchronized if (see Fig. 4): This verification will result in a change velocity (+/-) request to the IC, either to decrease (-) or increase (+) the actuators velocity, if respectively ∆S n − IBI n+1 < −75 ms or ∆S n − IBI n+1 75 ms. Assuming a steady musical tempo, this measure of beat-synchrony is only verified at the end of each movement cycle and the respective change velocity (+/-) issued at the beginning of the next movement. This measure avoids a too nervous control of the robot's velocity assuring its stability.
On the other hand, for keeping phase-synchrony between the current MRA estimate and the considered robot movement, the RC attempts to align the timing of each step transition with the estimated beat-events. For this purpose, by the end of each step (indicated by a movement done command received from the IC) the RC halts for the arrival of a beat-event from the MRA to trigger the execution of the next step (by sending an issue/continue movement command to the robot's IC). In case a beat-event arrives before the robot completes a step (i.e., while the robot is still transiting between two key-poses), two situations may occur. If the robot completes the current step while still within the 75 ms tolerance after the current beat-event, b n (i.e., k n ∈ [b n , b n + 75 ms]) the next step will be immediately triggered. Otherwise, if the robot completes the current step ahead of the 75 ms tolerance after the current beat-event (i.e., k n > b n + 75 ms) the next step will only be triggered when the next beat-event, b n+1 , arrives. This strategy assures priority to the phase-synchrony over the period-synchrony.
If when requested to change the robot motors' velocity the IC faces an impossibility of doing so, due to a limitation of the predefined motor-rates, it informs the RC that responds with a change metrical-level (+/-) command sent to the MRA, for it to change the attended metrical-level of the beattracker.

Experiments and Evaluation
In order to evaluate the proposed architecture we conducted tests with different dance movements and distinct musical stimuli. We propose quantitative measures of beat-synchrony to assess the generated robot dancing motion, and report on a qualitative survey made to teenager students over their overall opinion on the system's behavior and potential edutainment applications.

Quantitative evaluation
To quantitatively measure the level of beatsynchrony evinced by the proposed robot dancing control architecture, tests were conducted with two specific dance movements: mov1 and mov2, depicted in Fig. 5. Each of these movements was cyclically generated along the whole sequence in response to two different excerpts, of 45 s each, of ‡ this metric considers the default tolerance defined in the F-measure 18   In order to quantitatively evaluate the performance of our system under the referred conditions of movement and musical stimuli, we propose a visualization of the evinced period-and phase-synchrony of the conducted robot dance performances, and two measures of beat-synchrony. Fig. 6 depicts event plots for visually comparing the level of beat-synchrony evinced by the four robot dance performances. Fig. 6a and Fig. 6b respectively depict the results of mov1 and mov2 in response to musicC. Fig. 6c and Fig. 6d respectively depict the results of mov1 and mov2 in response to musicV. These graphs compare the phase alignment between the beat-events estimated by the MRA (full dashed vertical lines in gray), with the annotated beat-times (orange crosses), and the step-trigger (upper red bars) and step-completion (lower black bars) timings. The long purple dashed lines mark the end of each movement cycle. The lower green arrows represent requests of the RC to the IC for increasing (up) or decreasing (down) the robot's motor-rates, and the upper orange arrows represent requests made to the MRA for increasing (up) or decreasing (down) its attended metrical-level. In order to clarify the effect of inter-changing the attended metrical-level to improve the beat-synchrony of the dance performances, tests were conducted, and plotted in Fig. 6, without (top graph) or by applying (bottom graph) metrical-level changes.
As illustrated in all the plots of Fig. 6, initially the dance movements (first four steps) are always executed at their minimum velocity, independently of the current beat period, and aligned to the first occurring beat-event. It is also possible to verify that, as described in Section 3.2.4, all requests for increasing/decreasing the motors' velocity are only issued at the beginning of each movement cycle.
Requests for changing the metrical-level are issued whenever the robot cannot change its velocity any further (either increasing or decreasing), and these are only acknowledged after completing a movement cycle. Another important highlight is the time, up to four beats, that the MRA actually takes to change its metrical-level after receiving a change metrical-level (+/-) request. This can be explained by small communication delays between the modules and by the phase compensation imposed to the new IBT's leading agent in order to double or halve the period of the previous best agent, while keeping its phase off-set. In addition, it is important to notice that whenever the MRA changes its metrical-level the robot may take up to three movement cycles while attempting to compensate it, due to a disproportional change rate between both adjustment parameters: a metrical-level change corresponds to doubling/halving the current MRA's period, whereas increasing/decreasing the motor velocities corresponds to incrementing or decrementing the current velocity by δ .

Published by Atlantis Press
Copyright: the authors

Beat-synchrony evaluation measures
Due to the event (i.e., discrete) and rhythmic nature of the results we selected two measures from generic beat tracking evaluation methods 18 to evaluate the beat-synchrony of our system. The first one is the F-measure, F bk , which represents a generic phaseoriented metric. This measure compares the number of correct events, c (i.e., step-trigger timings, k, and beat-events, b, in phase) with the number of false positives, f + (i.e., extra step-trigger timings) and false negatives, f − (i.e., estimated beats without a matching step-trigger timing), within a given tolerance window: The F-measure locally measures the phase alignment between the timing of each step transition and its nearest beat-event within a tolerance window of ±75 ms. As such, transiting steps at either above or below the period of the beat-events are punished in proportion with the number of extra step transitions or missing beats. This results in an F bk = 66.7% if the beat-events and step transitions are aligned in phase but spaced by metricallyrelated periods by a factor of two. In order to avoid such undesirable property under allowed metrical relations, and simultaneously consider both phaseand period-synchrony, we propose the adoption of a second evaluation measure, the AMLt BK (Allowed Metrical-Levels, continuity not required). This measure permits metrically-related periods between the estimated beat-events and step transitions as long as both periods are consistent and their phases aligned. Both these requirements allow a tolerance window of θ = 17.5% of the current beat period, IBI n = b n − b n−1 19 . This measure is calculated as follows: where B m is the total number of estimated beatevents at the considered metrical-level (by resampling the beat-events by the m factor), and K s is the number of considered correct step transitions, k n , in each segment, s, of continuously correct step transitions. Each step transition is considered correct if: where ∆S n = k n −k n is the current step period, which measures the time-difference between the current step-trigger timing, k n , (i.e., the step transition timing from the last step to the current) and its stepcompletion timing, k n . Since this measure implies that both step transitions and beat-events are kept to a single metrical-level along all the performance, we adjusted the AMLt BK to also allow metrical-level changes along the evaluated dance sequence. Hence, we defined a relation-based AMLt BK , hereafter identified as AMLt r BK , which calculates a weighted average of all sequence segments delimited according to the metrical relation, r, between their step and beat periods. This measure is calculated as follows: where B r and K r are, respectively, the number of beat-events and step transitions present in every considered segment, by metrical relation.

Qualitative evaluation
Besides evaluating the system's ability to generate autonomous robot dance performances in beatsynchrony to different musical stimuli, we also assessed more subjective qualities towards the potential application of this "low-cost" architecture on edutainment settings. Therefore a set of demonstrations of different robot dance performances were presented to groups of students from 11 High Schools, during the week "Engineering as a Profession" at the Faculty of Engineering of the University of Porto, Portugal. Before the actual live demonstrations some musical notions behind the concept of the system and the system's architecture were briefly explained to every group of students. During the performances, the dancing sequences were generated on-the-fly by randomly inter-changing between the two different dance movements, mov1 and mov2 depicted on Fig. 5. In order to diversify our evaluation, and assess the same conditions measured in Section 4.1, each group only observed one performance, executed randomly either to musicC or musicV. A video of a demonstrative dance performance, in response to musicC, is present in 20 .
By the end of the dance performances each student was requested to answer a questionnaire consisting of five Likert scaled 21 questions for assessing the level of beat-synchrony, movement diversity, human resemblance, and amusing potential demonstrated by the dancing robot. The questions were the following: Q1. Did you like the robot dance performance? Q2. Was the dance synchronized with the music? Q3. Did the robot exhibit high movement diversity? Q4. Did the robot dance resemble human dance? Q5. Did you find the dancing robot amusing?
The tested population was constituted by 60 individuals, 36 boys and 24 girls, with ages ranging from 16 to 18 years old. Since the population was composed of two main groups, i.e., boys and girls, Mann-Whitney and Spearman tests 22 were performed in order to assess how similar/different were the opinions from both groups.  Fig. 6, achieved with (right charts) and without (left charts) metrical-level changes. Fig. 7a and Fig. 7b respectively present the results of mov1 and mov2 in response to musicC; and Fig. 7c and Fig. 7d respectively present the results of mov1 and mov2 in response to musicV. The top charts depict the phasesynchrony between the step-trigger (red crosses) and the step-completion (black pluses) timings against the estimated beat-events (full blue vertical lines). The middle charts depict the period-synchrony between the step period (thin red line) and the estimated beat period (thick blue line), and illustrate the resulting metrical relation between both periods (dashed green line). The bottom charts depict the F bk (full blue line) and the AML BK (dashed red line) beat-synchrony results per metrical relation between the step and beat periods. In both middle and bottom charts, the metrical-level changes are represented by dashed black vertical lines. Table 1 presents the mean beat-synchrony results, in terms of F bk and AMLt r BK (in %), for the whole 45 s sequences of the eight tests assessed in Fig. 6 and Fig. 7. Table 1: Mean beat-synchrony results, F bk and AMLt r BK (in %), for the eight evaluated tests assessed in Fig. 6 and Fig. 7, with and without metrical-level changes. When comparing the results of the tested sequences with metrical-level changes against the ones without it (discarding the second test where no metrical-level changes were needed) we observe a mean improvement of around 20.4 percentagepoints (pp) in terms of F bk and 32.3 pp in terms of AMLt r BK . These results validate our sensorimotor dance motion control strategy by providing a mean beat-synchrony of 84.9% in F bk and 71.3% in AMLt r BK , under different dance movements and musical tempo conditions. Furthermore, when the step period was able to attain the beat period, the proposed scheme provided a mean beat-synchrony of 95.1% in F bk and 88.5% in AMLt r BK . As observed in Fig. 7 with metrical-level changes (right charts), this occurred ahead of 13.8 s for mov1 in response to mu-sicC (see Fig. 7a); in the whole sequence of mov2 in response to musicC (see Fig. 7b); and ahead of 12.2 s for mov1 with musicC (see Fig. 7c). Fig. 7 also shows that the robot's performance is not significantly affected by the slight tempo variations of the musical stimuli, as suggested by the outperformance of mov1 in response to musicV against its response to musicC (see Table 1); neither to the Online Synchronized Robot Dancing (a)

Estimated Beat−Events
Step−Trigger Timings Step Published by Atlantis Press Copyright: the authors "velocity" of the musical tempo, as suggested by e.g., the similar results between mov1 in response to musicC at 60 BPM (Fig. 7a) and the whole sequence of mov2 with musicC (Fig. 7b). Yet, from Fig. 7 we observe a more trembled adjustment of the robot velocity around faster tempi which suggests that the robot is more "comfortable" with slower tempi.
When comparing the dance sequences among the different dance movements and tempo conditions, we verify that the robot's dance performance is otherwise mainly affected by the temporal relation between the minimum and maximum velocities of the steps of each movement and the duple multiples of the considered musical tempo. From Fig. 7 we observe that with mov1 the robot is able to perform in beat-synchrony, in phase and period, to both musical pieces if the beat is estimated at half-tempo. This movement's response to musicC achieves beatsynchrony with the lowest step velocity, i.e., highest step period at around 0.98 s (see Section 4.1), by matching the musical tempo of 60 BPM, i.e., beat period of 1.0 s, within the 75 ms tolerance. For mu-sicV the beat-synchrony is achieved with the highest step velocity, i.e., highest step period at around 0.73 s, by matching the musical tempo around the 80 BPM, i.e., beat period around 0.75 s. On the other hand, mov2's characteristics are not so well suited for the chosen musical stimuli, and the beatsynchrony is only achieved in response to musicC at the highest velocity that corresponds to a step period of around 0.48 s. The step period interval of this movement (between 0.48 s and 0.65 s) does not match any duple multiple of the musicV's tempo and therefore the beat-synchrony is never fully achieved in this case. In order to obtain better results independently of the chosen movement and musical stimuli it would be important to include a continuous and less limited motor-rate control by using a more advanced robotic platform.
Another important aspect to highlight is observable for mov2 in response to musicC, in Fig. 7b. Although the robot's velocity and attended metrical level are equal when performed with and without metrical level changes, the robot behavior is slightly different (see the differences between the left and right charts of Fig. 7b). These differences are ex-plained by the small and variable processing and communication delays between the two sub-systems that compose the system. The usage of a tolerance in the online measurement of beat-synchrony is also important to absorb such effects, however when they are more severe these may result on step periods out of the velocity limits because the next step will only be issued on the subsequent beat-event (in order to keep the phase-synchrony).
Ultimately, the overall results confirm the choice of the AMLt r BK as the most meaningful measure of beat-synchrony. Besides being invariant to the duple metrical relations between the step and beat periods, it considers both step-trigger timings and step periods whereas the F bk only considers the former. This fact can be empirically inferred when comparing Fig. 7 to the results of Table 1.

On the qualitative results
The two-tailed analysis of the Mann-Whitney test between the responses of the male and female groups to the questionnaire revealed p-values much higher than the level of significance for all questions (p 0.01), which indicates overall similar opinions between boys and girls. Yet, we found slight differences between the responses of the two genders which justified their separation into two distinct groups. Hence, Fig. 8 summarizes the responses of the tested population to the questionnaire described in Section 4.2, separated into the female - Fig. 8a and male - Fig. 8b -groups.
By using the Spearman's coefficient correlation we identified strong correlations between several pairs of questions. The questions with the strongest correlation were Q1/Q5 (r Q1,5 = 0.566), and the questions with the lowest correlations were Q1/Q4 (r Q1,4 = 0.111). The high correlation in Q1/Q5 is expected since likeability is strongly related with the feeling of joy and amusement, which is also corroborated by the high number of students which approved Q1 (96.7%) and Q5 (83.3%). The low correlation between Q1 and Q4 suggests that the level of amusement demonstrated by the robot dance performances was irrelevant of its human resemblance.
In terms of beat-synchrony, it is important to refer that most people (84%) agreed with Q2, and  none disagreed. This confirms that besides the good quantitative results on this aspect, the overall beatsynchrony to the musical stimuli was also perceptually assured to the general audience.
Concerning the student's opinion on the level of movements' diversity, only 43% agreed with Q3. This is expected since the performances only interleaved two different dance movements. Yet, the low level of disagreement (9%) suggests that the motor velocity variations and metrical-level interchanges compensated this lack of diversification in the existing movements. It is even interesting to notice that girls have a more positively distribution in this question, maybe due to a more positive attitude of girls towards the variety of movements.
Ultimately, regarding resemblances with human dancing, only 43% agreed with Q4, and most of the remaining were undecided or neutral. This may be justified by the use of a robot with strict movements and too mechanic aesthetics, despite its anthropomorphic design. In order to improve the system's animacy, towards more human-like dancing, a more advanced robotic platform with more fluid mobility would be required.

Conclusions and Future Work
This paper described an online sensorimotor architecture for controlling a low-cost humanoid robot to perform dance movements synchronized to the beat of different musical stimuli. Distinctly to other approaches, the proposed architecture attempts to overcome the robot's motor constraints by adjusting the velocity of its actuators and inter-changing the attended beat metrical-level on-the-fly. This scheme attempts to replicate the reciprocal coupling between perception and action around the robot "preferred tempo".
In order to evaluate the system we propose quantitative metrics for measuring the level of beatsynchrony of different performed robot dance sequences. For assessing different conditions, we tested two distinct dance movements and two musical inputs with different tempi and different levels of tempi variation. We finish the evaluation by reporting on a survey made to a population of students to assess their opinion about the overall solution after a set of demonstration trials.
In the overall, both quantitative and qualitative evaluations validated our approach for accomplishing robot dancing in online beat-synchrony to musical stimuli with different tempo conditions. Quantitatively, the proposed method resulted in robot dancing with an average beat-synchrony of 84.9% in F bk and 71.3% in AMLt r BK . These results improved the beat-synchrony of the generated dance performances by 20.4 pp in F bk and 32.3 pp in AMLt r BK when compared to dance motions generated without applying metrical-level changes. The qualitative report perceptually confirmed these beat-synchrony results and revealed an undeniable entertaining potential of the system to the general audience.
In the future we should test this approach in a more versatile robotic platform, with a continuous motion control and able to perform movements at higher velocities without compromising its balance. This should provide more fluid motions while overcoming the high motor-rate frequencies demanded by music with higher tempi. Additionally, the edutainment qualities of the proposed approach should

Published by Atlantis Press
Copyright: the authors