DOI: 10.1051/bioconf/20110100006 © Owned by the authors, published by EDP Sciences, 2011 A regression model for Digital Representation of Juggling

The present paper presents a methodology to identify regularities in motion trajectories and encode them into a reduced order model. The model has been developed for being trained with real data captured during the execution of complex and articulated motions, having several phases each. The presented model possesses relevant features that make it adequate for motion representation, among these we will discuss: stability, generalization, optimization, adaptation and external dynamic synchronization. Practical examples taken from ball throwing and catching will be given.


Introduction
The idea of encoding human skills into compact model is not new at all.In 1985, Hollerback and Flash [1], examined reaching motion of the human arm and proved that a regular acceleration shape was always present.In the same period (1984), Kelso was investigating rhythm adaptation in bimanual coordination gestures [2].Starting from these concepts, several engineers tried to encode motion properties in robotic actions.Yokokohji proposed first a record and play tool [3], followed by a more structured approach from Henmi [4] and from early learning experiments proposed by Sano [5] who employed neural networks to encode human skills in a reverse pendulum stabilization.
The pioneering work of these research attracted several researchers who considered this features relevant for programming robots.Several terms to indicate this field of research can be found in ng used from several authors.
To date we identified several families of representation or data analysis tools which have been proposed for a structured approach: the Switching Linear Dynamic Models [8], proposed by Pavlovic in 2001, offer an extension of Hidden Markov Models where the states encode complete linear models (Linear Time invariant, Discrete Time) that are switched in time; Gaussian Mixture Regressions [9], looks and model highly repetitive tasks (without inner variants) through interpolation with Gaussians; Dynamic motion primitives [10] and Stable Estimator Dynamical Systems [11], have a similar approach but use more complex models or training algorithms to ensure compactness and stability; Latent Variable Gaussian Processes [12,13] are highly employed in character animation and allow a probabilistic cancelation of unrelevant motion, this is similar to what is performed in a minimum norm approach in Local Linear Embedding [14] techniques which employ partial least squares regression to find a composition linear approximation models.
Why develop a new model?Before proposing a new model from those available in literature, we examined in details each of them.We found that each models has specific limitation that makes it unsuitable for real task modeling and simulation when a scenario of skills learning and transfer [15] is addressed.In particular all of them only focus with simple motions, that do not possesses complex interacting phases which interacts each other and with the surrounding environment.In skills approach, vice-versa, skills are defined as the combination of several interacting motion who are the help of experts or with repetition of motion correlates.Hence whichever model is going to be developed it needs a series of features that are not presently available in existing models.The first of these is the transparency or introspection, the ability to identify in model data variables which can be used and correlated to the real task.Transparency is essential in order to ensure that physical conditions such as are matched.Secondly, learned models require a region of asymptotic stability (RAS) which is large enough with respect the exemplary motions to prevent that any unmodeled effect could bring the system to unstable or marginally stable behaviors.This effect is usually manifest when the example data only cover a reduced part of the possible dataspace while the model is defined for a much broader volume.In close relationship with stability is the generalization ability, the model should be able to look for regularities in the motion examples (central or axial symmetries, rotations, compressions) and to encode them within the model in such a way that when a new trajectory is being asked to the model, it uses the found regularities to generate it.In existing models we found that they mostly concentrate on a repetitive shape without correlating the effects of the variation of the shape with particular boundary condition.This is a strong limiting factor since whatever generalization rule would be injected later in the model, it has not been directly extracted from data with true variation interpretation.Close to the generalization property, we require our model to possess adequate adaptation abilities, i.e. the capacity of the model to reorganize motion properties accordingly to different types of environmental This property is fundamental of the human behavior and completely absent in whichever model we found in literature.Finally, and less important in terms of model structure, but highly important in terms of robustness and numerical recipes, we request our model to have good statistical properties of outliers rejection, rejection of acquisition noise and sampling, rejection of overfitting issues and correlation between the internal model energy and the energy that can be associated to the task motion (all of these issues are poorly handled or neglected in existing models).
In what follows we will present a methodology to model N-dimensional signals from a given set of gestures, each of which has been retrieved from more complex trajectories, segmented and labeled in order to determine the boundary conditions of each motion, and the properties that correlates these condition each other.We will take advantage of the fact that the model may be expressed with a clean analytical representation that allow us to use such a model in more complex procedures such as constraints matching and optimization.

Task analysis and motion primitives
It is in the premises of the following work that complex tasks could be decomposed in simpler segments herein named chunks.This procedure is performed through different techniques of task analysis which could be automated or guided through the introduction of expert knowledge.In the scenario of the SKILLS project [16] six different and complementary demonstrators show how it is possible to proceed in this segmentation.Each chunk of motion is related to the previous and the following by constraints identifiable at time boundary conditions.In a regular task having periodic or quasi periodic activities, if the chunk are labeled according to their semantic content, these labels repeat regularly over the time.
If we collect together all chunks that have the same label, they form a group of motions that differs for the boundary condition.Whenever it would be possible to identify a regularity across these motion that maintain across chunks and is only subjected to the value of the boundary condition, we will say that the chunks group could be described by a motion primitive.The work herein described specifically focus on setting up a methodology for automatically learning and creating motion primitives based on experimental observations, Avizzano [17].For sake of simplicity the examples in the following section do address primitives in a bi-dimensional space.However this is not considered being a relevant element of the following discussion, neither this is reflected in the proposed mathematical tools.

The model structure
We propose a primitive representation model that presents simultaneously features taken from polynomial fitting and form harmonic decomposition.As we will see the combination of these two structures do allow a powerful control of the boundary condition and the fitting properties.In our Quasi harmonic decomposition we assumed that human gestures may be represented with: Here the presence of the polynomial components, is employed to smooth the discontinuities on the function may be any orthogonal function sets, it could be the use of a pure harmonic basis ( ) or more conveniently a semi-harmonic basis ( ) where only the odd/half period multiple functions were considered.In our polynomial approximation at this stage we only considered relevant 1 st order polynoms (i.e.straight lines that crosses the two values at boundary conditions).In such a way we decouple the problem of matching the boundary condition from the problem of matching the shape geometry using the two different components.An example of bi-dimensional motion fitting with 2 nd order harmonic and 1 st order polynom is shown in figure 1.

Generalisation
We found that the proposed model can describe define the amplitude of the harmonics and the boundary constraints.The higher is the number of these parameter the closer will be the approximation of the shape.
The number of parameters is also strictly related to the energy being used for each model.Being the describing set orthogonal, each parameters is independent from the others and the overall energy of parameters.
It is also possible to demonstrate that the values of these parameters can be determined in an highly efficient way by correlating their values to the discrete Fast Fourier Transform.
Once the parameters have been determined, for each of them we investigated the relationships with the boundary condition finding a strict linear correlation that can be quality approximate through linear regressions as shown in figure 2. We analyzed in details the regression properties of these planes and found that they not only are significant from a statistical and probabilistic point of view, but also help to mitigate and cancel in a proper way, the errors in the model that could be induced with outliers (improper example gestures, improper segmentation, numerical noise, lost of signals).
As a result we got a flexible model that describes smooth, nonlinear and generalized trajectories all over the input/output space and adequately fits to the given examples (see figure3).The figure shows on the bottom the real motion points (in bullets) and the trajectories achieved when a regressed model motion interpolation using specific harmonic description is employed.The regression analysis has been performed on the data as-is, without any outlier removal and/or precise segmentation of trajectories.We note that the motion generation performs satisfactorily, the profile of motion are maintained, and the overall 2D geometry respects those generated by human gestures.

Conclusion
We have extended the above principium to modeling and generating realtime trajectories.The allowed us to exploit compact and efficient numerical methods for both ensuring boundary constraints and also minimizing the residual energy.
We would like to highlight that with respect existing tools at state of the art, no progress in the learning process has been proposed, but the flexibility of the underlying model, allowed traditional learning techniques to provide a more stable, energy efficient, compact and analytically treatable model.Experiments and results on practical application will be shown at the presentation and are available at www.skills-ip.eu.
Figure3:Regressed model with 3 rd order harmonic approx and the relative fitting to training chunks.

Figure 1 :
Figure 1: motion chunk fitting of hand motion which have been segmented during a ball catching exercise.Both axes represents position XY of the hand in the frontal plane.

Figure 2 :
Figure 2:Values of the 1 st harmonic sinusoidal coefficient (dots) with respect to the delta move of the chunck (difference of boundary conditions).And the relative regression plane.