Description and processing of functional data arising from juggling trajectories ∗

: In this data introduction paper we discuss diﬀerent aspects of a juggling dataset collected in 1998 at the motor control laboratory in the McGill University Department of Psychology. The juggler was asked to juggle three balls and the x, y, z position of his index ﬁnger was recorded. This data consists of ten juggling trials, each lasting 10 seconds, with 11–13 cycles per trial. We also describe a set of processing steps applied to this dataset. In particular, the raw data was smoothed and a new coordinate system was deﬁned. Finally, we provide a few initial observations from examining the raw data.


Introduction
This paper describes data collected in 1998 from Michael Newton, Department of Biostatistics, University of Wisconsin, who, in addition to being a fine statistician, is an expert juggler.Some preliminary analyses of this data are also included.Recordings of his performance were made at the motor control laboratory of Prof. David Ostry in the McGill University Department of Psychology, where he juggled three, four, and five balls as well as bowling pins.
The original goal of collecting and analyzing this data was to explore the extent that the movement of his hands during juggling could be accounted for by a relatively simple second order differential equation.This study [2] was a followup on earlier work concerning handwriting [1], where the same second order equation was able to account well for pen movement while writing a complex piece of script.In this report, however, we focus on the structure in the data and what we've found by various plotting and analysis strategies.This discussion is limited to the data for juggling three balls.

Data description
There was a total of ten trials, each lasting ten seconds.The number of juggling cycles per trial varied from 11 to 13, where a juggling cycle was defined as the throwing of a single ball and the catching of a ball previously thrown.During each trial, the three dimensional coordinates of seven infra-red emitting diodes (IREDs) were recorded 200 times per second by an OPTOTRAK system, consisting of three cameras mounted on the wall.There were a total of 2000 x, y and z coordinate values per trial.The IREDs were positioned at the right index finger, the right wrist at the base of the thumb, the right, center and left parts of the chest, the left wrist at the base of the thumb and the left little finger.Each IRED was connected by a fine wire to an electrical source that heated it to a temperature that the system, designed to track sources of heat, could detect.The temperatures involved did not cause any discomfort to the juggler.Inevitably, each IRED was occluded for some portion of a juggling cycle, but the data from the right index finger had only a few missing values; it is these data that are described in the following sections.
Throughout this paper, we indicate the value of coordinate k = 1, 2, 3 among the three spatial coordinates at time t on trial i = 1, . . ., 10 by f ik (t), its derivative of order m by D m f ik (t), and the observed coordinate value at time t j by Y ijk .We use the notation f V ik (t) to refer to the velocity function for coordinate k and f A ik (t) for its acceleration function.We will also make use of tangential velocity and acceleration, defined by respectively.

Data processing
All of the data analyses presented in this report were carried out in the Matlab language using functions for functional data analysis that are also available at the internet site www.functionaldata.orgor with the distribution of the R package fda.See Ramsay, Hooker and Graves [3] for further details and illustrations of the uses of this software.

Preliminary smoothing
As a first step in our analysis we lightly smoothed the data in order to fill in missing values and to obtain estimates of all positions.We penalized the size of the squared derivative of order five for each coordinate, since we knew in advance that we would need smooth derivatives of order three for subsequent analyses.This effectively controlled the curvature in the third derivative.A smoothed trial was defined by minimizing the following criterion: We experimented with various values of the smoothing parameter λ, looking at values of the generalized cross validation (GCV) criterion, at the extent to which residuals had a white noise distribution, and at the smoothness of the higher order derivatives.We settled on a value of λ = 10 −12 , which gave good fits to the more variable finger data.It also resulted in smooth but detailed third derivatives, and tended to over-smooth slightly the less variable chest coordinates.
The residuals for the finger IRED had a standard deviation of approximately 0.5 mm.Within the context of a vertical variation of approximately 30 cm this represents a signal-to-noise ratio of approximately 600 to 1.

Centering and rotating
The coordinates used by the OPTOTRAK system are arbitrary with respect to the geometry of the body and the juggling sequence.Thus, we defined a coordinate system that would be more meaningful, as well as more appropriate for computation.We observed some gentle and slow change of chest position and orientation over the ten seconds of a given trial, and the chest coordinates were low-pass filtered to eliminate frequencies higher than 1.5 Hz.We then subtracted the average of the three filtered chest coordinates from the finger coordinates.As a second step, for each trial, we subtracted the mean coordinate value taken across the 2000 values from each coordinate.As a result, each coordinate had a mean value of zero within each trial.Finally, we rotated each trial so as to leave coordinate three (the vertical coordinate) unchanged, but so that coordinate one exhibited the greatest variation in the horizontal plane.This first rotated coordinate closely corresponds to lateral movement across the body plane, with positive sense being from the midline to the right, from the perspective of the juggler.
The second rotated coordinate reflected primarily fore-and-aft motion, within the sagittal plane, and the positive sense being away from the body.These coordinates are not necessarily "natural" coordinates with respect to body dynamics, but merely convenient viewing coordinates from a spectator's perspective.

Trimming and decomposing trials
Because the timing of the beginning of a trial is relatively arbitrary, partial cycles at the beginning and end of each trial were trimmed off to obtain cycles that are comparable across trials.The tangential acceleration for the finger IRED showed a strong and stable peak preceded by a deep minimum within each cycle, and the beginning of a cycle was defined by the location of this minimal value of f T A .We then cut each trial into cycles using the same features.This resulted in 123 complete cycles.The average duration of the cycles was 712 msec, and 50% of their durations ranged from 696 to 736 msec, or over approximately 6% of the mean.

Preliminary observations
Figures 1 (a) and (b) display the twelve cycles of the first trial in the frontal xz and the sagittal yz planes, respectively.Figure 1 (c) shows its tangential velocity and acceleration.By comparing these three figures, we can construct an anatomy of the juggling cycles going anti-clockwise around the juggling cycle as follows: 1.The time at which the ball leaves the hand is at or just after the blue "V" in the upper right of Figure 1 (a).This event corresponds to the blue circle in the tangential velocity in the top panel of Figure 1 (c), which is located at a strong peak in this curve that is easily visible in all trials.This peak is due to the upward snap of the index finger when the ball loses contact with it.This is a natural point at which we can place the origin of the juggling cycle because it is easily identifiable in all cycles and trials.2. The tightly clustered blue "A"s at the top of the cycle correspond to centripetal muscle contraction forces and limb movements terminating the inertial upward course of the hand and arm so as to start the hand on its downward trajectory.Consequently, the red lines originating at these points point mainly down, but also slightly to the right and outwards.This is also the point at which the trajectories have the least variation.3. The green "V"s are in most cycles the largest velocity peaks as the hand descends with the aid of gravity.4. The green "A"s correspond to muscle contractions terminating the descent of the hand and at the same time bringing the hand back in so that it may receive the next ball from the left hand.The larger variation in the directions of the acceleration vectors (the red lines originating at the peaks in the tangential velocity) reflects the need to apply the force in a direction that corrects for variation in position in the sagittal plane, which is substantial at this point.This is the primary point in the cycle at which neural control of arm movement is exerted.5.The red "a"s followed by the magenta "A"s are tightly clustered at the bottom of the juggling cycle, when the tangential velocity is at its lowest point.The index finger receives the ball, associated with higher variation in the acceleration vector.It then initiates a strong acceleration forward along the upward trajectory to begin the launch of the ball.If we look at the corresponding magenta asterisk in the acceleration plot (Figure 1 (c)), we see that the acceleration peak is smaller.This is due to the fact that   The peaks in the tangential velocity are identified with "V" and the valleys with "v".The peaks in the tangential acceleration are identified by "A" and the valleys by "a".The red lines originating at the peaks in the tangential velocity indicate the direction of the acceleration vector at that time point.The times at which the ball leaves the hand are at or just after the blue "V".(c) The tangential velocity (top panel) and the tangential acceleration (bottom panel) for the first trial.The circles and asterisks for the velocity and acceleration, respectively, indicate important features in each juggling cycle.For example, the blue circle indicates the time at or just before the ball leaves the hand.the total mass being accelerated at this point is the sum of the index finger and the ball that is now resting on it.6.Finally, the black "a"s near the end of the launch phase indicate muscle relaxation as the upward trajectory is near launch velocity and directionally on target.

Fig 1 .
Fig 1.The first trial in the xz frontal plane (a) and the yz sagittal plane (b).The peaks in the tangential velocity are identified with "V" and the valleys with "v".The peaks in the tangential acceleration are identified by "A" and the valleys by "a".The red lines originating at the peaks in the tangential velocity indicate the direction of the acceleration vector at that time point.The times at which the ball leaves the hand are at or just after the blue "V".(c) The tangential velocity (top panel) and the tangential acceleration (bottom panel) for the first trial.The circles and asterisks for the velocity and acceleration, respectively, indicate important features in each juggling cycle.For example, the blue circle indicates the time at or just before the ball leaves the hand.