Professional Documents
Culture Documents
net/publication/228391025
Article
CITATIONS READS
11 437
2 authors, including:
Matthew P Reed
University of Michigan
283 PUBLICATIONS 2,477 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Matthew P Reed on 20 December 2013.
by
Su Bang Choe
Doctoral Committee:
Professor Julian J. Faraway, Chair
Professor Robert W. Keener
Associate Professor Bernard J. Martin
Assistant Professor Ji Zhu
Associate Research Scientist Matthew P. Reed
Su Bang Choe 2006
c
All Rights Reserved
To my parents
ii
ACKNOWLEDGEMENTS
First of all, I’d like to thank Professor Faraway for his advice and guidance
throughtout these many years. His patience and sometimes much needed prodding,
are the main reasons I’ve finally made the finish line. I need to thank the HUMOSIM
laboratory (and its sponsoring partners) for providing me with the analysis problem
that ultimately led to this research. I’d like to also thank my dissertation committee
members for their helpful comments and insightful critique. Collaboration and dis-
cussion with fellow HUMOSIM students — especially, Kyunghan Kim, Woojin Park
and Jing Wang, were important sources of inspiration and I would like to thank them
as well. Finally, I’d like to thank my wife for her love and support without which, I
iii
TABLE OF CONTENTS
DEDICATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ii
ACKNOWLEDGEMENTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii
LIST OF FIGURES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vi
CHAPTER
I. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
IV. Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
iv
4.1 An Orientation Trajectory Model for the Right Hand in Unladen Reaches . . 67
4.1.1 Purpose of Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
4.1.2 Description of Experiment . . . . . . . . . . . . . . . . . . . . . . . 67
4.1.3 Data Preparation and Fitting of the Speed-Adjusted Slerp Residual
Functional Regression Model . . . . . . . . . . . . . . . . . . . . . 73
4.1.4 Functional QANOVA . . . . . . . . . . . . . . . . . . . . . . . . . . 84
4.1.5 Joint Limit Estimation . . . . . . . . . . . . . . . . . . . . . . . . . 86
APPENDICES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
BIBLIOGRAPHY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
v
LIST OF FIGURES
Figure
2.1 Illustration of roll, pitch and yaw with a 3D sailboat obtained from the Orientlib
package in R . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.1 Illustration of the HUMOSIM linkage system. The reference posture shows the
human figure standing erect, facing forward and holding the arms outstretched to
the sides parallel to the ground with palms facing downward. Each body segment’s
local co-ordinate system is shown aligned with the global co-ordinate system marked
as “X0-Y0-Z0” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.2 Illustration of the exponential map and the logarithm map which allows us to move
between quaternions which are on the surface of the sphere to points on the tangent
space taken at the identity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
3.4 Illustration of the potential problem in using the flipping algorithm on an orien-
tation trajectory that exists on the boundary between hemispheres. The original
trajectory starts in the upper hemisphere and curves down to the lower hemisphere
before returning back to the upper hemisphere. Using the flipping algorithm we
would flip our “smile” on the lower hemisphere to the other side of the sphere to
create a “frown” on the upper hemisphere. . . . . . . . . . . . . . . . . . . . . . . . 40
3.5 Illustration of the slerp model and the slerp residuals. The slerp model(a) gives the
shortest trajectory on the sphere between two points. The slerp residuals (b) are
the rotations, shown as arrows, that take us from the slerp trajectory to the actual
observed trajectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
3.6 Plots of power versus θ for the one-way functional QANOVA simulation study. We
have two curves for the two different term orderings and a curve for the likelihood
ratio test. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
3.7 Plots of power versus θ for the second simuation study. We have three curves for
the different QANOVA term orderings and one for the likelihood ratio test. . . . . 66
4.1 Illustration of how the user will place target “hand-prints” for the human model to
reach to. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
vi
4.2 Illustration of experiment setup. (a) Each cluster consists of five blocks. The blocks
were color-coded and the subject was asked to grip the block with the thumb on a
selected color side. (b)Three clusters were placed at different heights on a tower.
(c)The tower was then placed in four positions: 45◦ to the left, forward, 45◦ to the
right, 90◦ to the right. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
4.4 Illustration of the marker positions for the HUMOSIM linkage system. For our
experiment we will not have any of the markers below the hip. . . . . . . . . . . . 72
4.5 “Handplot” of the neutral orientation. The conical cylinder shows the forearm
aligned parallel to the x-axis. The hand is, in turn, aligned to the fore arm with
the palm facing downwards. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
4.6 Histograms of the difference in the start cutoff points and end cutoff points between
rotational and translational motion defined as ∆ = Rotation − Translation. The
units are the number of frames. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
4.9 Picture depicting the local orientation of the hand with respect to the forearm
(forearm remains stationary), a “handplot”, for a reach where the first order model
fit showed a 10◦ DTW difference with the actual observed trajectory. The speed-
adjusted slerp trajectory is also shown. The frames are equally spaced in the time
domain. Most of the noticeable difference occurs in the second and third frames. . 82
4.10 Plot of 5th, 50th and 95th percentile DTW distance for the first order model and the
slerp model by Rdist class. The Rdist variable measures the angle of rotation metric
between the orientation of the hand at the target with the “neutral” orientation.
We grouped the data into 20 separte classes based on the Rdist. . . . . . . . . . . . 84
4.11 Ellipsoidal Joint Range of Motion Limit estimated from our terminal local orientations 89
4.12 25 sampled points from our Ellipsoidal Joint Range of Motion Limit . . . . . . . . 89
4.13 Handplots of the 25 sampled points from our Ellipsoidal Joint Range of Motion
Limit. Using a matrix index to identify a plot, e.g. [2,4] is the plot that is on the
second row and fourth column, we identify those that appear to be impossible —
[1,4], [2,1] and [2,4], and those that appear not to be on the joint limit boundary
— [3,3] and [3,4] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
4.14 Plot of mahalanobis distance versus weight of subject. Males are indicated by “M”
and females are indicated by “F”. The regression line for males is given by the solid
line while the one for females is given by the dashed line. It appears as if wrist
flexibility increases with weight for females while the opposite holds true for males. 92
5.1 Combined reach trajectory predicted by our model to a target from the HUMOSIM
experiment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
vii
LIST OF TABLES
Table
4.1 Anthropometry of subjects in Terminal Hand Orientation and Effort Reach Study,
2000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
4.3 DTW distance for the different models when data are subdivided by angular dis-
tance to target orientation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
viii
CHAPTER I
Introduction
The study of object motion in three dimensional space occurs in a wide variety
of areas. Examples can be found in human kinematics, plate tectonics, and even
vectorcardiography, but one can easily think of other instances where such data
occur. Any rigid object moving through three dimensional space will have six degrees
of freedom associated with its motion: three for its position in space and three for its
using Cartesian co-ordinates. The space of such co-ordinates is Euclidean IR3 and
linear algebra techniques for working in such a space are taught at an elementary
college level.
Orientation data are more complex, however, and some introduction is required.
The orientation of any rigid body can be thought of as the end product of a rota-
tion of some reference frame in IR3 and is represented as such. The standard way
Cosine Matrices), but alternatives exist. One such alternative parameterization us-
ing Euler angles is popular as these angles are easier to visualize, but this form of
parametrization suffers from a few problems. Another method involves the use of
1
2
tation matrices including some theoretical (see Downs (1972), Khatri and Mardia
(1977)) and applied work (see Chang (1986)). This literature is inter-related with
results obtained from directional statistics (see Bingham (1974), Watson (1983), Jupp
and Mardia (1989), Mardia and Jupp (2000)) and can be considered as a corollary of
it. Prentice (1986) was the first to introduce quaternions for statistical analysis. His
work focused on translating the existing theory on rotation matrices to the quater-
but in a higher dimension. Still, the statistical literature in this area is sparse, but
the computer graphics and animation field has produced a wealth of resources. The
orientations to the computer graphics world. Much of the work that followed was
geared towards creating better and faster interpolation algorithms which was impor-
Specifically we seek to predict human motion via a statistical model under a range of
input conditions. Motion data can be analyzed as functions over time, which requires
the adaptation of functional analysis techniques (see Ramsay and Silverman (1997))
for use with orientation data. Functional regression analysis of orientation data, as
a result, is a key concept of this research. This work can be used in areas besides
human kinematics as most orientation data result from the study of some object’s
3
motion. These new methods are described in Chapter 3 along with relevant work
The data and impetus for this research comes from the Human Motion Simula-
tion Laboratory (HUMOSIM) at the University of Michigan. Over the years the
lab has accumulated a large motion capture database (over 72,000 motions) from
participated such that we can assess the effects of body dimensions, gender and age.
A majority of the motions are load-transfers and reach tasks. By considering body
segments such as the hand or the head as objects moving through three dimensional
space, we can use the methods in chapter 3 to model the orientation trajectory of
model for the right hand in unladen reach motions as an application of our methods.
The purpose of the model is to predict the orientation trajectory of the right hand
for a variety of reach tasks given a beginning and target orientation, as well as a
Orientation Parameterizations
In this chapter we will describe the mathematical theory behind the concepts of
three-dimensional spatial rotation and orientation. There are many ways to param-
eterize rotations, each with its own set of advantages and disadvantages. To fully
understand these issues we will describe spatial rotation from the beginning starting
with Euler’s Theorem. We will describe four parameterizations that are popular in
1. Rotation Matrix
2. Euler Angles
3. Axis-Angle
4. Quaternions
other three are described briefly with particular emphasis on interpolation, metrics,
ease-of-use and robustness. Based on these criteria, we explain why quaternions are
4
5
We live and operate in a three dimensional world and since we interact with
rigid body objects everyday the concept of spatial rotation and orientation is highly
intuitive. Unfortunately, the mathematics involved are not and will need some ex-
planation.
First of all we need to distinguish between rotation and orientation. Many peo-
ple use these terms interchangeably but there is a subtle difference. Rotation is a
that the direction of the cross products of the basis vectors are preserved i.e.
there is no reflection.
rotation by some angle θ about some fixed axis a. In other words we can obtain any
orientation by a single rotation from any other orientation. The axis provides us
with the direction and the angle provides us with the magnitude.
We can see that this angle can serve us nicely as a distance metric between orien-
tations and is in fact the natural group metric for rotations. One further result we
can use from Euler’s Rotation Theorem is that there are three degrees of freedom
associated with spatial rotations — two for the axis1 and one for the angle.
1 since length does not matter it can be represented as two angles i.e. spherical coordinates
6
commutative. To illustrate this, form three orthogonal axes with your right hand
with your thumb pointing upward, your index finger pointing forward and your
middle finger pointing to the left. Rotate 90 degrees counter clockwise around your
thumb axis and your index finger should now be pointing to the left. Next, rotate
90 degrees counter clockwise around your middle finger and the end result is that
your index finger will be pointing downward. If we were to swap the order of the two
rotations and do the middle finger rotation first (index finger will point downward)
followed by the thumb rotation we will in the end have our index finger pointing to
(2.1) MT M = I,
The first condition implies that a rotation matrix is orthogonal, i.e. it consists of
orthogonal column vectors each of unit magnitude. The set of all 3 × 3 orthogonal
matrices are denoted as O(3) (an example of a Steifel manifold3 ) where the SO
stands for special orthogonal. There are two possible subsets of O(3) — one for
those matrices with det = +1 and another for those with det = −1. The latter are
vector it is applied to. The former preserves handedness and this subset it denoted
as SO(3).
2 Concatenation involves performing multiple rotations on the same object
3 The Steifel manifold Vr (IRp ) is the space of p × r matrices X such thatVr (IRp ) = {X : XT X = Ir }
7
(2.3) y = Mx
If we know the basis for the newly rotated space with respect to the original basis
we can easily create the rotation matrix —the basis vectors form the columns of the
matrix, i.e.,
| | |
(2.4) M = x̂new ŷnew ẑnew
| | |
where x̂new , ŷnew and ẑnew are the rotated basis column vectors.
to be applied and M2 is the second then the resulting combined rotation matrix is
given by
(2.5) M21 = M2 M1
Note that since we are using column vectors the order of rotation is read from
(2.6) M2 M1 6= M1 M2
the matrix. The axis is given as the eigenvector associated with the unit eigenvalue.
8
The other two eigenvectors are complex and thus will have complex eigenvalues. The
arbitrary unit vector x ∈ IR3 and then rotate it using our rotation matrix to obtain
(2.7) θ = arccos(x · y)
This stems from the fact that rotations are defined by this representation. As a result
it is the only parameterization that will uniquely represent a given rotation, i.e. there
is a 1-to-1 mapping between SO(3) and the space of rigid body rotations. Another
advantage is the familiarity of matrix algebra as it forms part of all early level linear
algebra courses. Much of the literature that exists for orientation statistics deals
of all, we are using nine parameters to describe something with three degrees of
freedom. This means there are six constraints — three to maintain unit length of
the columns and three to enforce mutual orthogonality. This inherent inefficiency
can lead to data storage issues especially in human motion where just a single motion
There are computational issues as well. For instance, performing numerous con-
catenations could lead to round-off error accumulating to such an extent that the re-
such as the Gram-Schmidt which are not straightforward and can be computationally
Due to the numerous constraints, interpolation of matrices is also difficult and the
fact that SO(3) is not a vector space makes most interpolators which use the convex
9
sum:
Euler angles represents rotation by first factorizing the rotation into a series of
three sequential rotations around the principal axes (x,y,z) and then enumerating
the three angles involved. These rotations in matrix form are as follows:
1 0 0
(2.9) Mx = 0 cos α sin α ,
0 − sin α cos α
cos β 0 − sin β
(2.10) My = 0 ,
1 0
sin β 0 cos β
cos γ sin γ 0
(2.11) Mz = − sin γ cos γ 0 .
0 0 1
where α is the angle around the x-axis, β is the angle around the y-axis and γ is the
Any sequence of these three rotations such that no two consecutive rotations are
around the same axis can be deemed as a possible Euler angle definition and is known
in the literature as an Euler angle set. There are twelve such sets in all — the first
six use all three principal axes and are sometimes known as Cardan angles: XYZ,
YZX, ZXY, ZYX, XZY and YXZ while the other six have its first and last rotations
10
about the same axis: XYX, YZY, ZXZ, XZX, XYX and YXY and are read in the
There exists yet another distinction that tends to cause confusion and it is in the
way the principal axes are treated. To illustrate this we will use the XYZ Euler
angle set as an example. One way to implement this set is to think of the three
principal axes to be fixed globally and thus the object is rotated through the global
x-axis then the global y-axis and finally the global z-axis. The other way is to treat
the principal axes as fixed to the object itself and thus these axes themselves rotate
with the object. So using this local axes method we would rotate the object first
around its own x-axis then around the y-axis which has changed due to the previous
x rotation and finally around the resulting z-axis obtained after the y rotation.
One can easily show that the local axes XYZ set is the same as the global axes
ZYX set. Note once again that these are read in the order the rotations are applied
Let Rz be the matrix representing rotation around the global z-axis, Ry be the
one for the global y-axis and finally Rx be the one for the global x-axis in the global
axes ZYX set. Other than the first rotation, both subsequent rotations will require
change of basis operators such that we rotate in the axes of the original frame. Thus
(2.12) Rz = Mz ,
(2.13) Ry = Mz My M−1
z ,
(2.14) Rx = Mz My Mx M−1 −1
y Mz .
When we then multiply these rotation matrices together to perform the rotation
11
(2.15) Rx Ry Rz = Mz My Mx .
We will only refer to the local axes sets when we refer to Euler angles in the future.
Euler angles are even more difficult to relate to Euler’s theorem than rotation
matrices. One way to do so is to convert the Euler angles to rotation matrices first.
Since obtaining the rotation angle is so difficult many people just use the Euclidean
distance metric by treating the Euler angle triple as a vector. This is clearly erroneous
however as the space of Euler angles is S × S × S (S is a unit circle) not IR3 . Not
only is there a problem when the angle goes through a discontinuity such as from 2π
to 0, but it also ignores the rotational order and thus the inherent coupling between
the Euler angle components. For this reason this metric can be used only for those
Euler angles are easy to interpret and visualize and it is because of this that
they are still widely used today. For example in human motion analysis we can
interpret the Euler angles in terms of sagittal, transverse and axial motion. Such a
factorization of the orientation aids in analyzing and describing the different postures
of the human body. In aeronautics, the angles are described as roll, pitch and yaw
(see figure 2.1) and are used to describe the orientation of aircraft during flight.
a minimal representation (three numbers for three degrees of freedom). All minimal
Figure 2.1: Illustration of roll, pitch and yaw with a 3D sailboat obtained from the Orientlib package
in R
consider the XYZ set. Any rotation where the Y angle is π/2 results in the z-axis
aligning with the original x-axis. This alignment of the axes causes the final Z angle
to be redundant as any resulting orientation could have been obtained initially using
This phenomenon is known in the literature as gimbal lock which is a term that
originates from a physical device known as a gimbal (see figure 2.2). This device
Euler angle set. Gimbal mounted gyroscopes are often used in aircraft attitudes
sensors. The gyro will stay in a fixed orientation with respect to the earth regardless
of the plane and the gimbal rings will rotate as the plane moves to keep this gyro
in place. Sensors are then placed on the rings to measure the Euler angles. Gimbal
lock occurs when the middle ring lies flat with the outer ring thus causing the inner
ring’s axis of rotation to be equal to the outer ring’s. Any further rotations along the
original inner ring axis cannot be accomplished without resetting the gimbal causing
the gimbal rings to wildly fluctuate whenever it operates near the singularity.
Any interpolation scheme based on treating the angles as a vector and using the
13
convex sum will behave badly due to the inherent coupling that exists in the Euler
will fail. We can show this by performing any rotation around two of the principal
axes, say the x-axis and the y-axis. If we eigen decompose the resulting rotation
matrix we will see that there will be z-axis component to the rotation axis even
though we only did an “XY” rotation. Interpolation at or near gimbal lock can lead
to numerical instability.
2.2.3 Axis-Angle
rem in that we use the unit axis of rotation (a) and the angle of rotation (θ). Thus
we have three parameters4 to measure three degrees of freedom and thus is a minimal
4 The axis of rotation can be represented in spherical co-ordinates as only direction is needed
14
Obviously by its nature we can directly obtain the angle metric from the param-
eterization. It also represents the action of rotation in the most direct way possible
Like Euler angles we cannot concatenate rotations using the axis-angle represen-
can be handled for the unitary axis of rotation by normalizing but not for the angle.
Multiplicity is a problem with this representation and we need to bound the angle
θ in [−π, π) so as to solve the problem of all multiples of 2π being the same angle.
This, however, does not entirely solve the problem as we still have that (a, θ) and
(−a, −θ) both represent the same rotation. The “zero” rotation or identity can be
identities.
Methods to solve the multiplicity problem will cause discontinuities to exist and
interpolation schemes will suffer because of it. Naive methods where we treat the
axis-angle as a four vector are obviously flawed, but no reasonable alternatives exist.
2.2.4 Quaternions
matician in 1843. He extended the idea of complex numbers so that he could carry
out multiplication and division on triples of real numbers and it is from his discovery
Quaternions are a four dimensional extension of complex numbers with three di-
mensions being imaginary and the other being real. Such higher dimensional complex
numbers are known as hyper-complex with quaternions (four) and Cayley numbers
(eight) being the most well-known. As such, many of the properties of quaternion
15
algebra can be deduced by logically extending the well known properties of complex
algebra.
(2.16) q = [v, w]
(2.18) = [x, y, z, w]
(2.19) = i x + j y + k z + w.
The last form shows the classical complex number form with i , j and k being the
(2.20) ij = −ji = k ,
(2.21) jk = −kj = i ,
(2.22) ki = −ik = j .
Hamilton called the real part w the scalar and the imaginary triple v = (x, y, z) the
vector. A pure quaternion is one where w = 0 and can be used to represent a three
vector. Likewise a scalar quaternion has v = 0 and can be used to represent a scalar.
known methods for vector multiplication: the cross product and the dot product,
Addition
(2.24) = [v1 + v2 , w1 + w2 ].
Multiplication
(2.26) = [v1 × v2 + w1 v2 + w2 v1 , w1 w2 − v1 · v2 ].
Conjugate
(2.28) = [−v, w]
Norm/Magnitude
(2.29) kqk2 = q ∗ q∗
(2.30) = w2 + v · v
(2.31) = w 2 + x2 + y 2 + z 2
Inverse
q∗
(2.32) q−1 =
kqk
θ
(2.33) q = rev̂ 2
θ θ
(2.34) = r v̂ sin , cos
2 2
17
θ
where r is the magnitude of the quaternion, 2
is the angle (we explain why we have
θ
2
instead of θ in the next paragraph) and v̂ is the axis which is a unit three vector or
a pure unit quaternion. The above formula can easily be proved by using the power
series expansion of the exponential and then using the fact that v̂2 = −1.
θ
(2.35) qt = r t eta 2
t θ θ
(2.36) = r a sin t , cos t
2 2
magnitude as this is all that is required for rotation parameterization and furthermore
will not change the scale of the object being rotated5 . Let x be a vector in IR3 and
suppose we wish to rotate this about an axis a by an angle θ. Then the rotation
(2.37) y = q ∗ x ∗ q−1
where q = a sin 2θ , cos θ2 and y is the rotated vector and both x and y are in pure
quaternion form. Thus to rotate a vector x we need to put it in quaternion form and
then multiply to the left with the rotation quaternion and multiply to the right by
θ
its conjugate. This“double” multiplication is the reason why we have 2
instead of θ
(2.38) qI = (0, 0, 0, 1)
5 From now on all quaternions will be unit unless otherwise indicated.
18
is the unit scalar quaternion — it plays the role of the identity matrix, i.e., it rep-
resents a zero rotation. Like the matrix the identity quaternion has the following
properties:
(2.39) q ∗ qI = qI ∗ q = q
Another property of this formula is that q and −q would produce the same rota-
only parameterization that does not suffer from multiplicity is the rotation matrix.
It is useful to look at the unit quaternions from a geometric and topological point
of view as it provides us with a fair amount of intuition as to how the unit quaternions
work. If we think of unit quaternions as unit vectors in IR4 then the space of unit
stands for the three degrees of freedom that exists for this surface and not the number
of dimensions which is four) in the literature. Thus the double coverage problem can
The main advantage of the quaternion representation is that it does not suffer
from a co-ordinate singularity. This can be explained through what is known as the
“Hairy Ball Theorem” in topology. It states that if we have a ball covered with hair
we cannot comb the hair such that all the hairs lie flat on the surface of the ball.
surface of a sphere with an even number of degrees of freedom. The corollary to this
is that it is possible to do this for spheres with odd degrees of freedom. Since unit
quaternions live on S 3 we can move smoothly on the surface of the sphere without
trices as it uses four numbers instead of nine. Quaternion multiplication requires less
calculation than matrix multiplication6 and as such algorithms for quaternions run
almost five times faster than those for rotation matrices. Numerical round-off errors
are much more easily handled with quaternions requiring simple re-normalization as
The perceived disadvantage of quaternions are that they are difficult to interpret.
with the axis and angle easily obtained. The problem lies in the fact that quaternions
are unfamiliar to a majority of people as they are seldom taught in basic college level
math courses. By using the geometric interpretation of quaternions one can avoid
The major problem we face when using quaternions is that they live on the surface
of a hypersphere and thus we cannot use the familiar Euclidean vector space methods,
6 Quaternion multiplication requires 16 scalar multiplies while matrix multiplication requires 81.
20
statistical or otherwise. This is a problem inherent in the rotation group and is not
discussed in more detail in the next chapter where we introduce orientation statistics
2.2.5 References
The information presented in this chapter were taken from many different sources.
Much of the information in the section on quaternions was obtained from Shoemake
(1985), (1987) and from the man who discovered them, Hamilton (1866). There are
also references that look at all the parameterizations: Buss (2003) and Goldstein
(1980). Two websites that have a wealth of information are: Baker (2006) and Weis-
stein (2006).
CHAPTER III
motion. A detailed description of this type of data precedes the statistical analysis.
We then introduce the natural metric for orientation data as well as the concept of
a mean orientation.
1. The “Tangent Mapping” approach where we map our quaternions from S 3 onto
a tangent space.
subspace of IR4 .
Before we dive into the statistical analysis we need to introduce the type of data
that we are trying to model and describe some of the issues involved.
The human body can be modeled conceptually as a chain of rigid links or seg-
ments connected together by joints. These segments represent body parts which are
21
22
considered to be rigid in that they are considered not to bend or stretch. The joints
connect these segments and allow rotational movement between segments. Depend-
ing on the joint, we have up to three rotational degrees of freedom available for a
How many links and joints there are depends on the particular linkage system
used which needs to be chosen by the experimenter. The linkage system also effects
the number of rotational degrees of freedom each joint allows. For example, let us
consider the arm, which is made up of the hand linked to the forearm via the wrist
joint and the forearm linked to the upper arm via the elbow joint. Intuitively, we
would allow three degrees of freedom for the orientation of the hand as we can move
it up or down, left or right as well as twist it along the axis of the forearm. The
twist, however, does not really occur at the wrist joint but rather along the forearm
due to the action of the tendons. It is thus possible to allow the twist to occur at
the elbow thus giving the elbow and the wrist two degrees of freedom each rather
than the usual three for the wrist and one for the elbow.
We obtain our data via the use of motion capture for which we place markers
on certain landmark points on a subject’s body and use cameras or other sensors to
track the location of these markers as the subject performs prescribed tasks. Our
raw human motion data consists of the marker positions recorded in fixed frequency
intervals with respect to an arbitrary global co-ordinate system set up by the motion
capture device. From these marker positions we calculate the positions of the joint
centers corresponding to the linkage system that we are using. Data from each
individual frame are called posture data and a series of posture data over time are
The orientation of a particular body segment can be obtained with respect to the
23
Figure 3.1: Illustration of the HUMOSIM linkage system. The reference posture shows the human
figure standing erect, facing forward and holding the arms outstretched to the sides
parallel to the ground with palms facing downward. Each body segment’s local co-
ordinate system is shown aligned with the global co-ordinate system marked as “X0-
Y0-Z0”
24
global co-ordinate system or the co-ordinate system induced by the segment that
directly precedes it in the chain called the local co-ordinate system (see figure 3.1).
to the global co-ordinate system as a global quaternion and similarly for a local
quaternion. The global quaternion for each segment is calculated from the marker
locations. The simplest way to do this is to form a rotation matrix using the basis
vectors that form the co-ordinate system of the segment. We can then convert1 this
and B with B preceding A in the chain. Let us denote the global quaternion for A
as G G
A q and the global quaternion for B as B q. This can be read as the quaternion for
have these we can obtain the local quaternion of A with respect to the co-ordinate
system of B by:
B B
(3.1) Aq = Gq ∗G
A q
G ∗ G
(3.2) = Bq ∗ A q.
from each posture in the motion and create an orientation trajectory for that segment.
These trajectories, which will vary in length depending on the speed at which the
motions are performed, will then form our response. This choice is an important one
however, with advantages and disadvantages on both sides. We will discuss these in
the next chapter when we perform an example analysis and model the orientation
3.2 The “Angle of Rotation” Metric for Orientations and the “Mean”
Orientation
chapter, Euler’s Rotation Theorem provides us with a natural angle of rotation metric
between orientations. Since we have made the choice of using quaternions as our
From the previous chapter we know that the angle of rotation can be obtained
from the scalar component of a quaternion and thus if we apply this to the new
Thus the angle of rotation metric for quaternions is also the angle formed between
them at the origin. Since S 3 has unit radius this can also be thought of as the length
With this metric we can now define a mean or average orientation. In normal
We can describe the mean orientation in an analogous way with Euclidean distance
replaced with the angle of rotation metric. For the quaternion parameterization this
becomes:
n
X
(3.9) q̄ = arg min3 arccos |qi · q|2 .
q∈S
i=1
with all iterative algorithms there are issues with speed and accuracy. We shall call
derived from the mean rotation matrix. Suppose we have a sample of n orientations in
rotation matrix form i.e. X1 , . . . , Xn from SO(3) and we are interested in obtaining
the mean orientation. A naive estimator would be the element-wise arithmetic mean,
n
1X
(3.10) X̄ = Xi
n i=1
i i i
n
x11 x12 x13
1 X
(3.11) =
i
x21 xi22 xi23
n
i=1
xi31 xi32 xi33
1
Pn i 1
Pn i 1
Pn i
n i=1 x11 n i=1 x12 n i=1 x13
Pn Pn Pn
(3.12) = 1
xi21 1
xi22 1
xi23
i=1 i=1 i=1
n n n
Pn Pn Pn
1 1 1
n i=1 xi31 n i=1 xi32 n i=1 xi33
where xijk is the jkth element of the ith sample matrix. Unfortunately this estimator
is not a rotation matrix. To solve this problem we need to decompose this mean
27
matrix into matrix polar form. The following definition is taken from Downs (1972).
Definition. Let F be a 3×3 square non-singular matrix. The matrix M.K is called
a polar form of F, with M the polar component and K the elliptical component, where
There exists a relationship between matrix polar forms and least squares in that
M = arg minX tr{(F − X)T (F − X)} for all X ∈ SO(3). As FT F and XT X are
To numerically evaluate the decomposition of F into its matrix polar form requires
(3.13) F = ∆Dφ Γ
with φ1 > φ2 > φ3 being the singular values of F. The polar component is then
The arithmetic mean, X̄ = n1 ni=1 Xi, is not a rotation matrix as stated previ-
P
ously. However if we were to put it in polar form X̄ = M.K, the polar component
M is a rotation matrix. In fact, it is the rotation matrix that is closest in the least
matrix
n
1X
(3.15) I= qi q′i
n i=1
It is difficult to gain any intuition from this “Eigenvector” mean and attempts to find
a meaningful interpretation from the literature were unsuccessful. We also could not
find in the literature if there was a relationship between the minimum distance mean
and the eigenvector mean. We were able to prove that they are, in fact, identical.
The next step is to use the Lagrange multiplier to solve this equation under the
constraint that the solution lies in S 3 . We rewrite the equation by expressing the
dot product as an inner product of the quaternions expressed as vectors in IR4 . Thus
we have:
n
X
(3.18) f (q) = (qT qi )2 + λ(qT q − 1)
i=1
n
X T
(q qi )(qTi q) + λ(qT q − 1)
(3.19) =
i=1
n
!
X
(3.20) = qT qi qTi q + λ(qT q − 1)
i=1
(3.21) = q Iq + λ(qT q − 1)
T
∂
(3.22) f (q) = 2Iq + 2λq
∂q
which when equated to zero leads us the eigenvector equation Iq = λq. Maximization
of the objective function will occur when q = e1 the eigenvector associated with the
29
largest eigenvalue, thus proving the result. Now that we know the two are equivalent
the eigenvector method will be preferred over the minimum distance method due to
ease of computation. The only time one would use the latter is that it allows us to
As we have mentioned in the previous chapter, the main problem we face when
One way we can get around this problem is to make use of a fact from group
theory which states that the surface of a 4D hypersphere is a Lie group. The tangent
space taken at a Lie group’s identity is known as a Lie algebra and the Exponential
map is used to move between the Lie Group and the Lie algebra (see figure 3.2).
The Lie algebra for the space of unit quaternions is Euclidean IR3 and therefore if
we map our unit quaternions onto this tangent space we have essentially a relatively
In the previous chapter we saw that the polar form of a quaternion is basically an
θ
(3.23) q = ev̂ 2
The logarithm of a quaternion is the inverse of the exponential and is defined as:
θ
(3.24) log q = v̂
2
In fact exponentiation is defined only for pure quaternions and conversely the loga-
Figure 3.2: Illustration of the exponential map and the logarithm map which allows us to move
between quaternions which are on the surface of the sphere to points on the tangent
space taken at the identity
a vector we see that the above definitions give us a way of mapping between vectors
and quaternions.
where v∈ IR3 , θ = kvk and v̂ = v/θ. We compute the logarithm map by:
v
(3.26) logmap(q) =
sinc 2θ
sin x
where v is the vector part of q and sinc(x) = x
which is known as the sink function
As we can see, the exponential and logarithm maps act as almost a conversion
algorithm between quaternions and the axis-angle representation with the exception
that the angle is not explicitly obtained but rather represented by the magnitude of
the axis.
From the above definitions, we notice that work is needed for this mapping to be
θ
unique. The first thing we need to do is restrict 2
to be between [0, π2 ]. Thus the
π
exponential map will take points from a ball of radius 2
to the quaternions. Unfortu-
nately this mapping is unique only for the interior points of the ball; antipodal points
on the surface of the ball represent the same rotation. This is because a rotation of
π about v̂ or −v̂ results in the same orientation. Since the log mapped quaternion
would suffer from a singularity. Luckily, this region is well defined as opposed to the
An important property of the exponential map is that it preserves the angle metric
As a by product of this, it also preserves the angle formed at the identity between
longitudinal lines.5 This means that hyper circles or hyper ellipses on S 3 centered
This tangent mapping approach is a local linear approximation and as such the
further our data is from the identity the more distorted our approximation becomes.
The exponential map does not preserve the angle metric between two quaternions
unless one of them is the identity and the further away from the identity these points
5 Think of longitudinal lines on the Earth. They all lie on great circles that pass through the north and south
poles.
32
are the greater the discrepancy between the angle metric on S 3 and the Euclidean
The exponential and logarithm map formulae are defined such that the tangent
space is taken at the identity. This is not a problem if our data is centered at the
identity but it is far more likely that this is not the case. To take the tangent space
at a point other than the identity we need to rotate our data such that our tangent
point coincides with the identity. This is essentially a change of coordinate system.
the tangent space taken at q. We need to rotate our data such that q becomes the
identity. The rotation required is the conjugate q∗ and thus we need to multiply6
(3.28) q∗ ∗ q1 , . . . , q∗ ∗ qn .
We can then use our existing formulae to map to and from the tangent space remem-
A good explanation of the exponential and logarithm maps are given in Grassia
(1998) while explanations of Lie groups and Lie algebras can be found in Weisstein
(2006).
is not a simple task but there are some that have been developed, most notably the
Bingham distribution which we will talk about in a later section. We can, however,
describe the likely characteristics such a distribution would take. Suppose we are
looking to model the orientation of the hand when a person initially grasps a door-
6 Quaternion multiplication is non-commutative and so we need to keep track of which side we performed our
multiplication so that we can return to our original co-ordinate system when we map back from our tangent space
33
(a) In 3D (b) In 2D
knob before opening a door. We would reasonably expect there to be a single most
probable orientation the hand will take and a continuum of less probable orientations
the further we get from that modal orientation. In such cases a Gaussian distribution
modal since q and −q represent the same orientation they should obviously be equally
likely. If we were to visualize S 3 as the earth then we can imagine the North and
South poles being the modes with the distribution being mirror images of each other
above and below the equator. Thus it is possible to restrict ourselves to just one
hemisphere and then flip any quaternion that is in the wrong hemisphere by taking
its antipode.
Gaussian density as our model for the tangent vectors taken at one of the modes.
1 1 T Σv
(3.29) f (q; Σ, m) = 3 1 e− 2 v ,
2π |Σ|
2 2
34
(3.30) Σ = PDPT ,
conceptually the rotation of the tangent space that is needed to align the principal
axes of the data with that of the tangent space and the D the diagonal matrix of
eigenvalues which can be interpreted as the variances along those axes. This provides
Since the exponential map preserves angles at the identity between longitudinal
lines as well as distances of points from the identity, isoprobability contours for this
distribution which are in the from of ellipsoids will map onto hyper-ellipses on S 3
centered at the tangent point. We shall call this the Tangent Gaussian distribution
limits. All joints in the human body allow only a limited range of orientations.
Even the most flexible joints, such as the wrist, do not allow complete freedom of
of these joint limits, for the purpose of filtering out any implausible orientations
from predictions we make. We concentrate on joints that allow rotations with three
degrees of freedom. Limits for joints with two or less degrees of freedom are easily
found.
The common practice is to create limits using the Euler Angle representations thus
creating one-dimensional limits for each Euler angle. Beyond the obvious problems
7 If we have less than three rotational degrees of freedom Σ will be singular!
35
tionally expensive to apply our quaternion data as we would first have to convert to
rotation matrices and then to Euler angles before applying the limits. Recent work
by Herda et al. (2002) attempts to estimate this boundary using quaternion fields,
but this is quite complex and it is vital that the data contain nearly all possible
orientations along the boundary of the joint limit as otherwise there will be “gaps”
the joint for which we are trying to obtain the limit. It would be centered at a
low-stress, neutral equilibrium orientation and the further we get from this point the
more extreme and less comfortable the orientation would be. We can then equate
probability and low comfort = low probability. For simplicity, we approximate the
This would then mean that on the tangent space, these limits can be expressed as
for simplicity and speed as the purpose of using the limit is as a quick check on
prediction plausibility. These ellipsoidal joint limits can be obtained from data by
Suppose we wish to find the range of motion limit to a joint that links segment
A with segment B. The first step is to make sure that we are using local quaternion
data of segment A with respect to segment B. For the most part we would not use
global orientations for the limit as it does not isolate the joint in question but rather
provides the accumulated effect of every joint in the body. Thus for datasets with
complex motions that has the figure not only moving its arm but turning,twisting
36
and walking; a global joint range of motion limit could conceivably mean the entire
quaternion m as:
1
(3.31) dMah (q) = kD− 2 PT logmap(q ∗ m∗ )k
where D and P are the diagonal matrix of eigenvalues and its corresponding matrix of
Let γ be the value of this distance that denotes the joint range of motion limit. A
logical estimator of γ is the maximal Mahalanobis distance obtained from our data,
i.e.,
One needs to keep in mind that this estimator is dependent on the point at which
we take our tangent space m and therefore we need to make sure when we apply this
Obviously, the quality of this estimated limit depends on the quality of the data.
We would ideally like for the data to be a random sample of orientations where the
joint reaches the boundary of its range of motion limit. We will discuss the problems
that arise when this assumption does not hold true when we apply our limit to real
the shortest geodesic path which in this case would be the great circle arc that goes
through the two quaternions. The slerp between two quaternions q1 and q2 is given
by:
sin(1 − α) θ2 sin α 2θ
(3.33) slerp(q1 , q2 , α) = q1 + q2 ,
sin θ2 sin θ2
where cos 2θ = q1 · q2 . Visualizing this geometrically, we see that the slerp embodies
Euler’s rotation theorem in that it finds the rotation that will take it from the initial
to the final orientation and the interpolation path is obtained by varying the angle
The slerp interpolator is native to S 3 and is not necessarily preserved on the tan-
gent space, i.e. the slerp interpolation path between two quaternions when mapped
onto the tangent plane does not equal the interpolation path obtained by using
a normal convex sum based linear interpolation between the two tangent mapped
the point at which the tangent space is taken. This is directly due to the fact that
the exponential map preserves the angle of rotation metric of a quaternion from the
identity.
Unfortunately, the likelihood that our motion data contains just two key frames or
postures is basically zero, and the slerp cannot be used to create a smooth interpola-
tion path between more than two. A more complex spline-type approach is required
for this. With the tangent mapping approach we are no longer restricted to the the
surface of the hypersphere, and thus we can call upon an abundance of well-defined
methods. Prentice (1987) also uses this idea, employing the exponential map derived
directly from SO(3), which is also a Lie group and is a higher dimensional extension
The approach we will be taking is to fit regression splines 8 to our tangent mapped
quaternion trajectories using cubic B-spline basis functions. The reason we make this
choice is two-fold; we reduce the dimensionality of our data and by using an equal
number of uniform knot points, combined with a rescaling of actual time to relative
time, we can circumvent the problem of having varying lengths for the trajectories.
Dimension reduction is a major issue with motion data as a five second motion
points on our orientation trajectory. This is the method used by Faraway (2000)
Let us denote the function we are approximating as q(t). The spline function is
where t ∈ [0, 1] denotes proportional time. Since we only observe q(t) at fixed
where
and n denotes the number of frames or postures in the observed trajectory. The
Ψ matrix is made up of the basis function values and its derivation is given in the
appendix . Using least squares, the matrix of spline control points, P, is calculated
as:
The raw marker data obtained from the measurement devices tend to have a lot
of noise. Filtering methods are used to smooth the marker data and consequently
produce smooth orientation trajectories. Due to this filtering, sensitivity with the
capture any true systematic patterns but not so large that it will start capturing any
The exponential and logarithm map, as we have defined it, is a mapping between
π
one hemisphere of S 3 and a subset of IR3 , namely the ball of radius 2
. Thus we
require the data to be in the hemisphere centered at the point at which the tangent
is taken which we will call the tangent hemisphere. As quaternions are antipodally
symmetric this is not a hard problem: we need only choose the antipode closest to
Here is a simple, two-step algorithm for achieving this common hemisphere. Sup-
pose that we have posture data q1 , . . . , qn and we wish to take the tangent at q
1. Calculate q · qi for i = 1, . . . , n.
This “flipping” method where we take the antipode of quaternions not already
in the tangent hemisphere is suitable for posture data, but there exists a potential
that is close to the hemisphere border and that it passes through it. The flipping
algorithm would then result in the sections of the trajectory that were in the non-
tangent hemisphere being flipped to the opposite side of the sphere thus introducing
40
Figure 3.4: Illustration of the potential problem in using the flipping algorithm on an orientation
trajectory that exists on the boundary between hemispheres. The original trajectory
starts in the upper hemisphere and curves down to the lower hemisphere before returning
back to the upper hemisphere. Using the flipping algorithm we would flip our “smile”
on the lower hemisphere to the other side of the sphere to create a “frown” on the upper
hemisphere.
discontinuities to the path, as seen in figure 3.4. This makes it impossible for us
to apply not only the interpolation and spline techniques mentioned previously, but
For this reason we introduce the concept of slerp residuals. The slerp interpolator
slerp residuals to be the “difference” between the actual orientation trajectory and
the slerp model trajectory. By “difference” we mean the rotation required to take
us from a point on the slerp model trajectory to a corresponding point on the actual
tations, q1 , . . . , qn . The first step in obtaining our slerp residuals is to calculate our
slerp model trajectory. One possible method for obtaining our trajectory is to use
41
Figure 3.5: Illustration of the slerp model and the slerp residuals. The slerp model(a) gives the
shortest trajectory on the sphere between two points. The slerp residuals (b) are the
rotations, shown as arrows, that take us from the slerp trajectory to the actual observed
trajectory
the slerp interpolator to create n equally spaced postures, i.e., the angle between
each subsequent posture orientation is constant. Our slerp trajectory would then be
(3.38)
1 2 n−2
q1 , slerp q1 , q2 , , slerp q1 , q2 , , . . . , slerp q1 , q2 , , qn ,
n−1 n−1 n−1
constant angular speed profile. Such a model is unrealistic as people do not move at
constant speeds unless trying to do so on purpose. However, that is not a problem for
the purpose of calculating slerp residuals. The angular speed profile of the observed
The purpose of the slerp residuals is not only for us to avoid the potential of
a discontinuity being introduced by the flipping algorithm, but also to reduce the
This improves the quality of our linear approximation on the tangent plane which
slerp residuals is to apply the angular speed profile from our observed trajectory
to our slerp model trajectory. The constant speed slerp model would result in less
Note that we are using an angular speed profile and not a velocity profile. The
slerp interpolator produces orientations from a fixed axis of rotation and so these
two are the same but for our observed trajectory it is unlikely that we have one.
Thus we need to ignore the directional aspect of a velocity profile and use a speed
q1 , . . . , qn , as:
for i = 1, . . . , n − 1.
Using this angular speed profile we create the following speed adjusted slerp model
trajectory:
(3.40) ! !
P2 Pn−2 !
s1 i=1 s i si
q1 , slerp q1 , q2 , Pn−1 , slerp q1 , q2 , Pn−1 , . . . , slerp q1 , q2 , Pi=1
n−1 , qn .
i=1 si i=1 si i=1 si
constant, along with our observed trajectory q1 , . . . , qn and from these we calculate
(3.41) ri = s∗i ∗ qi ,
Thus we have, in effect, transformed our data to form slerp residual trajectories
43
that start and end at the identity. The extent to which we have concentrated our
data depends upon how close our slerp model trajectories are to the actual observed
trajectories, but it should result in data that are much less spread out and therefore
algorithm.
The drawback with this residual approach is that we lose information on the
starting and ending orientation of our trajectory. Thus we would need to either
predict these separately or be given this information as input, which is usually the
case. On the other hand, if the task is to predict an orientation trajectory that is
constrained to start and end at specified orientations then this method is the only
motion with respect to covariates such as age, anthropometry, gender, target location
and starting and ending orientations. Our approach is to treat these trajectories
as functions and therefore use statistical functional data analysis techniques. The
reference for this sort of analysis is the book by Ramsay and Silverman (1997).
All of the sections in this chapter preceding the current one have dealt with
(1997) introduces this functional regression model for univariate functions. Suppose
we have n response functions given by y(t) = (y1 (t), . . . , yn (t) and xi being the p-
variate vector of covariates for the ith response function. The functional linear model
44
This is similar to the standard regression model except that the response yi (t), error
term ǫi (t) and vector of regression coefficients β(t) are now all functions. We can
interpret the jth coefficient function βj (t) for j = 1, . . . , p as the effect of the jth
covariate on the entire response function given a fixed level of the other covariates.
where x is the n × p matrix of covariates whose rows are given by the xi ’s.
A cubic B-spline basis approach is used to approximate the response functions for
We can now use the spline control points yik in place of our functional response yi (t),
in effect converting our problem from a functional to a multivariate one. Thus the
(3.45) Yn×m Ψm×1 (t) = Xn×p Bp×mΨm×1 (t) + ǫn×m Ψm×1 (t),
where m is the number of basis functions used and Ψ(t) is the vector of those basis
which is a multivariate regression model of the spline control points on the covariates.
As we have stated at the beginning of this chapter, the problem we face with
our quaternion trajectory data is that it is non-linear and therefore we cannot fit a
linear model such as the one we have just described. However, by using the tangent
mapping approach we can linearize our data, thus opening the way for linear models
to be fit. Since this is a local linearization at the tangent point, our approximation
gets worse the further away we get from this tangent point. We would like, ideally,
How accurate and reliable our methods are depends on the spread or variability
of the data that we are working with. In our application of human motion, this vari-
ability will depend in part on how wide a range of orientations the particular body
segment we are modeling can take. The wrist allows, perhaps, the most amount of
flexibility and thus orientation data for the hand will tend to have more variability
than say that of the foot where the ankle allows a markedly smaller range of orienta-
tions. If the variability of the data is such that we have a large number of trajectory
observations close to the tangent hemisphere border we will have to use the slerp
Let us denote these quaternion trajectories or functions as q(t) = (q1 (t), . . . , qN (t))
where each trajectory observation qi (t) consists of differing numbers of observed pos-
1. The first task is to find the average of all the postures in our data using the
“Eigenvector” method:
(d) The mean q̄ is the eigenvector associated with the largest eigenvalue.
3. Check on the spread of our data to see if there are any quaternions that are
close to π away from q̄ in terms of our angle of rotation metric, i.e. check if
2 arccos(q̄ · qij ) >= π. If so, we will have to use a slerp residual analysis. If,
as in the case for our model in chapter 4, we are asked to make predictions
for orientation trajectories that start and end at user-defined positions then we
4. First try the constant speed slerp residuals to see if that is enough to pull our
data away from the hemisphere border. If that is not achieved then we will have
The reason we would prefer to use the constant speed residuals is because it
allows us to directly convert any eventual predictions we make from our functional
regression model back to a real orientation trajectory. For speed adjusted slerp
convert our predicted residual trajectories back. Whichever method we use, we will
end up with slerp residual trajectories for which we will have to find the mean. Let
Let us assume that we have made use of the slerp residuals, otherwise we would
just proceed through the next steps using our original data. The next step is to
use the logarithm map to map our data over to the tangent space taken at q̄ by
trajectories V(t) = (v1 (t), . . . , vN (t)) where vi (t) consists of (vi1 , . . . , vini ) and vij =
Following the blueprint for the univariate case we next approximate each trivariate
By (3.37) we see that this unfortunately results in a matrix of control points Pi m×3
for each trajectory due to the multivariate nature of the response. This means that we
becomes:
(3.50) PvN ×3m Ψv3m×1 (t) = XN ×p Bp×3m Ψv3m×1 (t) + ǫN ×3m Ψv3m×1 (t),
48
where PvN ×3m is a matrix where the vectors pvi T make up the rows and
Ψ1 (t)
..
.
Ψm (t)
Ψ1 (t)
(3.51) v
Ψ3m×1 (t) =
.
.
.
.
Ψm (t)
Ψ1 (t)
..
.
Ψm (t)
which is a standard multivariate regression model just like in (3.46). We assume that
ǫ̂T ǫ̂
(3.54) Σ̂ = ,
N −p
where
(3.55) ǫ̂ = P − XB̂,
Work needs to get this back to a predicted orientation trajectory as we will have
steps:
1. Use the exponential map to map our predicted tangent vectors data back onto
S 3.
2. Revert back to the original co-ordinate system by multiplying each of our pre-
3. Convert the predicted slerp residuals back to a real orientation trajectory. Note
that we require the start and end orientation to be either predicted or given
to us. We need to calculate either the constant speed slerp model trajectory
method we used to get our slerp residuals and then reverse (3.41) to obtain our
(see Johnson and Wichern (2002), Rencher (2002)) for comparing nested models ω
and Ω where dim(Ω) = p, dim(ω) = q and p > q. The likelihood ratio test statistic
1 |Σ̂Ω |
(3.57) −(N − p − q − (3m − q + 1)) log
2 |Σ̂ω |
(N −p)Σ̃
where Σ̂ = N
is the maximum likelihood estimator of the covariance. For N
d.f.
Unfortunately there is a problem with using this, as explained in Shen and Far-
9 We will need to predict an angular speed profile for this or have one provided for us.
50
where λΩ ω
k and λk are the eigenvalues of Σ̂Ω and Σ̂ω in decreasing order. For large
m, the likelihood ratio test statistic can become dominated by what amounts to
λΩ
unimportant directions of variance due to the fact that log λkω does not get smaller
k
as k becomes larger. Slerp residuals, by definition, are 0 at the start and end and
thus it is almost certain that the first and last few spline control points are all going
to be pretty close to 0. This puts the majority of the interesting variability in the
middle increasing the chance we have only a small number of significant eigenvalues.
Other options, including Wilk’s Lambda, the Lawley-Hotelling trace, the Bartlett-
Nanda-Pillai trace and Roy’s maximum root, all suffer from the same problem.
Shen and Faraway (2004) propose a test similar to the usual F-test employed in
degrees of freedom:
tr(Σ̂Ω )2 tr(Σ̂Ω )2
(3.60) f1 = (p − q) and f2 = (N − p).
tr((Σ̂Ω )2 ) tr((Σ̂Ω )2 )
If we do, indeed, observe that we only have a small number of significant eigenvalues
then we recommend using this improved testing method which is robust to the choice
each of our spline control points but this only measures the fit of our model to our
tangent-mapped, speed-adjusted, slerp residual spline data and not with the actual
51
local quaternion trajectory. We would like to measure the model error with respect
to the entire process — tangent mapping, spline fitting and linear modeling.
The best way to tackle this would be to convert our fitted values from our regres-
sion model all the way back to a real trajectory. We can then calculate point-wise a
choice of mean, median or maximal differences between our fitted trajectory and our
observed one and then average it over all trajectories. We can then use the speed-
adjusted slerp model as a yardstick to see how well our model fits the data. Wang
(2006) proposes using dynamic time warping techniques to help remove any differ-
ences due to a timing element that might be involved. This algorithm has seen use in
equation:
DTW (QN −1 , RM )
(3.61) DTW (QN , RM ) = dist (qN , rM ) + min DTW (QN , RM −1)
DTW (QN −1 , RM −1 )
other trajectory up to the Mth frame. We use our angle of rotation distance metric
The Tangent Mapping approach described in the previous section uses a localized
plicity we lose some accuracy, the extent of which depends on the variability existing
in our data. With the Constraint approach we seek to model and analyze directly
could fit linear models that allowed us to easily relate our scalar covariates with our
linearized response. In the constraint approach this is not possible and we need to
The Bingham distribution (see Bingham (1974)) was introduced to model axial
data, that is data where x and −x are indistinguishable. For such data, distributions
nions represent rotations in IR3 uniquely up to a sign change and so the Bingham
distribution seems a natural fit to model quaternion data (see Prentice (1986)).
Let q be a random unit quaternion from a Bingham distribution denoted B4 (L, A),
1 T
(3.62) f (q; L, A) = {1 F1 ( , 2, L)}−1 exp{tr(LAqq′ A )}[dq],
2
the probability mass is clustered around a great circle. The Watson distribution
(see Watson (1983)) is a special case of the Bingham where the density exhibits
One can also show a close relationship between the Bingham and the multivariate
given by  and the MLE of the elements of L are functionally related to the elements
of Λ̂.
Prentice (1986) proves that if X = µ(x)12 then X has a matrix Von-Mises Fisher
distribution13 if and only if x has a Bingham distribution. From this it can be shown
that M̂ the MLE for the modal matrix M of the matrix Von-Mises Fisher distribution
M̂ = µ(m̂).
Sampling distributions for the Bingham are highly intractable mostly due to the
complexity of the normalizing constant and thus simpler asymptotic results are im-
portant. Most basic and important among these is the fact that for highly concen-
trated populations one can use normal approximations in the tangent spaces to S 3
(see Mardia and Jupp (2000), Rancourt et al. (2000)) which provides some legitimacy
for the tangent mapping approach. Other asymptotic results based on increasing di-
mensionality exist but are not of interest to us as we are interested only in quaternion
The slerp introduced in section 3.3.4 is native to S 3 but not useful when we
have three or more points to interpolate. There has been quite a lot of work in
interpolation algorithms for quaternions in the computer animation field and they
1. Geometric Transliteration
2. Arc Blend
3. Differential Equation
The geometric transliteration approach treats the geodesic great circle arc of the slerp
terms of it (see Schlag (1991)). The arc blend approach combines small arc segments
to get a smooth curve and is the cheapest to compute (see Wang and Joe (1993)). The
differential equation approach notes that natural cubic splines minimize acceleration,
Statisticians have also looked at developing spline techniques for general spherical
work was done by Thompson and Clark (1981) and Fisher and Lewis (1985).
S 3 analog of the regression splines we fit for our tangent mapped trajectories. In
quaternion. Buss and Fillmore (2001) introduced a more generalized method that
Suppose that q(t) is the quaternion trajectory we are trying to approximate. The
Xm
(3.63) ◦ pj Ψj (t),
j=1
55
where the pj ’s are the quaternion control points and the Ψj (t)’s are cubic B-spline
P
basis functions. The ◦ notation is taken from Buss and Fillmore (2001) and it
Xn n
X
(3.64) ◦ wi qi = arg min3 wi arccos |qi · q|,
i=1 q∈S
i=1
Pn
where wi are the weights such that i=1 wi = 1.
where |pj | = 1 for j = 1, . . . , m and the absolute value replaced by a square function.
lem. The weighted average can only be found using an iterative algorithm. Algo-
rithms such as the Augmented Lagrange Multiplier (ALM) and Sequential Quadratic
Programming (SQP) are viable options and one can code simple versions of these
with some effort. Notice also that first and second derivatives cannot be found ex-
plicitly, making the process even more cumbersome. It is vital to have a good initial
estimate of the control points to lessen the likelihood of the algorithm getting stuck
in a local minimum.
In practice the methods described in section 3.3.4 produce decent fits to the data
and the approach set out here may not be worth the computational time and hassle.
We can, therefore, perform the spline fitting in tangent space then map the spline
56
control points back onto S 3 . Since this is a tangent mapping technique it has the
Regression analysis for spherical data, i.e., data from S p (The surface of a p + 1
tectonic plates (also known as continental drift) on the Earth surface. For certain
points ui there exist estimates vi of their past position(which have some associated
error) and the task is to find the rotation that links them. In mathematical terms
ui are fixed points (the predictor) on S 2 , vi are independent random points (the
response) such that vi given ui has density g(vi′ Aui ) with respect to the uniform
data such that the ui and vi are quaternions instead of directional data on S 2 .
as the response and ui as the predictor. We, however, require a model where our
predictors are scalar and so this appraoch is not useful for our purposes.
Rivest developed two statistical methods for analysing orientation data, both of
which were applied to human motion experiments. The first (see Rancourt et al.
(2000)) is a one-way ANOVA-style model for comparing terminal posture data be-
tween six different task locations. The second (see Rivest (2001)) method seeks to
fit a fixed-axis model to a single orientation trajectory. The first model is of more
variable. We use this as inspiration for our model which we present next.
57
As we have stated before the major problem we have with the non-linearity of S 3
is that there is no simple arithmetic operation between a scalar and a quaternion that
will keep the result on S 3 . In fact, if we go back to chapter two, the only operation
them as the difference between the observed orientation and the slerp predicted
orientation and defined it as (3.41). Inherent in this formulation is the idea that
other words:
(3.67) x1 + x2 ⇋ q2 ∗ q1
(3.68) x1 − x2 ⇋ q∗2 ∗ q1 .
presented with a choice of ordering. The particular ordering above represents the
fact that when we use multiple quaternions to rotate vectors, we do the operation
that has been available to statisticians since R.A. Fisher, the “father of statistics”,
introduced it in 1918. With the processing power of modern day computers, the
estimation and fitting of the model is handled automatically and efficiently using
matrix algebra techniques. We sometimes forget that all the parameters in ANOVA
can be estimated using means. Older books on ANOVA such as the one by Scheffe
58
(1959) show us how to estimate parameters for main-effects and interactions using
dently N(0, σ 2 ). This ηij , which can be interpreted as the true mean response at the
ith level of A and the jth level of B, can then be further split into
where
4. γij is the interaction of the ith level of A with the jth level of B.
X
(3.71) αi = 0,
i
X
(3.72) βj = 0,
j
X
(3.73) γij = 0 for all j,
i
X
(3.74) γij = 0 for all i.
j
14 Factor A has I levels; factor B has J levels and each cell has an equal number of replicates given by K.
15 Otherwise the least squares estimates will not be unique.
59
(3.75) µ = η.. ,
where
P
ηij
ij
(3.79) η.. =
I ×J
P
j ηij
(3.80) ηi. =
PJ
i ηij
(3.81) η.j = .
I
The least squares estimate of these parameters are the sample counterparts of the
η’s and thus the ability to calculate sample means is all that is required for estimation
in an ANOVA model.
We know how to calculate sample means of quaternions (see section 3.2) and
combining this with the notion that quaternion multiplication acts as addition and
comparison to the two-way ANOVA shown above. Let us define the model as:
where η ij = E(qijk ) and ǫijk are independent and identically distributed centered
(3.83) η ij = γ ij ∗ β j ∗ αi ∗ µ,
where
60
3. αi the main rotational effect of the ith level of factor A. We interpret this as
the excess rotational effect caused by the presence of the ith level of factor A
5. γ ij is the rotational interaction of the ith level of A with the jth level of B.
Keeping in mind the inherent non-commutativity of this and given the particular
order of terms in (3.83), one possible definition for the parameters is the following:
(3.84) µ = η .. ,
(3.85) αi = η i. ∗ η ∗.. ,
(3.86) β j = η ∗.. ∗ η .j ,
X
(3.88) ◦ αi = 0,
i
X
(3.89) ◦ βj = 0,
j
X
(3.90) ◦ γ ij = 0 for all j,
i
X
(3.91) ◦ γ ij = 0 for all i.
j
61
We see that all the parameters are unit quaternions, i.e., µ, α, β, γ ∈ S 3 as the
η’s are basically means that we would estimate using their sample counterparts. We
defined the parameters above in a particular order such that we have “cancellation” of
terms, i.e., each term will cancel out with each conjugate if it exists. This cancellation
is needed for equation 3.83 to hold true. The non-commutativity of the quaternion
product implies again that our estimates will change if we switch the order of the
terms.
Inference can be performed using the angle of rotation metric as a test statistic.
Suppose we wish to compare nested models ω and Ω where dim(Ω) > dim(ω). The
Ω fit with that of the ω fit over all the observations. We would reject the ω or null
model if our test statistic is larger than some critical value. We use a permutation
test procedure to find a critical value at which the size of the test is α. By randomly
permuting the assignment of the factors of interest (those that are in Ω but not in
ω), and fitting our null and alternative QANOVA models each time, we obtain the
forward manner. By using the techniques laid out in section 3.4.2 we obtain the
quaternion spline coefficients. We then fit identical QANOVA models to all m co-
efficients to get estimates of the mean quaternion spline function for each factor
combination. This is analogous to the functional regression models we fit in the tan-
gent mapping approach. Inference is done by replacing the angle of rotation metric
62
with the DTW metric (3.61) in our test statistic formulation. Thus (3.92) becomes
Pn
Ω ω
i=1 DTW Q̂i , Q̂i
(3.93) t=
n
where Q̂Ω ω
i is the fitted trajectory under the alternative model and Q̂i is that under
the null model. These fitted trajectories are obtained by converting the fitted spline
need to“factorize” any that are continuous. This in turn produces prediction inter-
polation issues and thus the technique is more useful as an inference tool rather than
as a prediction model.
As we have stated throughout the previous subsection the ordering of the QANOVA
terms affects our estimates. We would like to compare the power of the functional
QANOVA test for different orderings of the model terms. Simulation studies were
and gripping a wooden block. The data we chose for this simulation study was for
reaches made to one of these blocks. There are four possible ways to grip this block
and we want to see if there is a significant “grip” effect. We have 104 observations
1. Fit a mean-only model using our functional regression model in the tangent
mapping approach. We then obtain the fitted spline coefficients from this model.
63
2. Fit another model with the factor “grip”. We again obtain the fitted spline
3. Generate independent 3m variate Gaussian error terms that have mean 0 and
covariance Σ̂.
4. Add this error to both the mean-only model coefficients as well as to the model
5. Convert these tangent mapped spline coefficients back to quaternions using the
exponential map.
with that of the “grip” model spline coefficients using the slerp algorithm. The
weight, θ, runs from 0 (which produces the null fit) to 1 (which produces the
alternative fit).
Thus we set the value of our nuisance parameter, which is the overall mean, as the
For each set of simulated data, we fit the null functional QANOVA model such
that the fitted value of the uth quaternion spline coefficient at the ith level of the
u u u
(3.94) q̂i = µ̂ = η̂ . .
There are only two possible orderings of the terms for the alternative model in this
(3.95) u
q̂i = u
µ̂ ∗ u
α̂i = u
η̂ . ∗ u η̂ ∗. ∗ u
η̂ i
64
Power Plots
1
Order 1
0.9 Order 2
Lik ratio
0.8
0.7
0.6
power
0.5
0.4
0.3
0.2
0.1
0
0 0.2 0.4 0.6 0.8 1
theta
Figure 3.6: Plots of power versus θ for the one-way functional QANOVA simulation study. We have
two curves for the two different term orderings and a curve for the likelihood ratio test.
(3.96) u
q̂i = u
α̂i ∗ u µ̂ = u
η̂ ∗. ∗ u
η̂ i ∗ u η̂ .
We conducted the DTW based tests on both orderings and either accepted or rejected
the null model. We calculated the proportion of times we rejected the null out of the
2000 trials and plotted these versus θ (see figure 3.6). When θ is zero this proportion
gives us the size and for all other θ it gives us the power. We used the permutation
critical values for the DTW test (for each ordering) as well as the likelihood ratio test
so that we could set the size for all the tests to be exactly 0.05. We see that for this
simple univariate case the different ordering has no effect on the power. We also used
the likelihood ratio test from the functional regression tangent-mapping approach.
There appears to be very little difference between the methods with perhaps a slightly
lower power for the likelihood ratio test when θ is between 0.1 and 0.6.
significant “pod” effect in the presence of a “block” and “grip” effect. Using the
65
same process as before, we have the null functional QANOVA fitted value of the uth
quaternions spline coefficient at the ith level of “pod” (α), the jth level of “block”
u u
(3.97) q̂ijk = γ̂ k ∗ u β̂ j ∗ u µ̂
(3.98) = u
η̂ ∗... ∗ u
η̂ ..k ∗ u
η̂ ∗... ∗ u
η̂ .j. ∗ u
η̂ ... .
We then looked at three different orderings for the alternative fits. The first two
have the “pod” effect term added either at the front of the null model ordering or at
the end which is an analagous case to the the simple one-way study we did before.
This gives us
u u u
(3.99) q̂ijk = α̂i ∗ γ̂ k ∗ u β̂ j ∗ u
µ̂
(3.100) = u
η̂ ∗... ∗ u η̂ i.. ∗ u
η̂ ∗... ∗ u
η̂ ..k ∗ u
η̂ ∗... ∗ u
η̂ .j. ∗ u
η̂ ... ,
and
u u u
(3.101) q̂ijk = γ̂ k ∗ β̂ j ∗ u µ̂ ∗ u
α̂i
(3.102) = u
η̂ ∗... ∗ u η̂ ..k ∗ u η̂ ∗... ∗ u η̂ .j. ∗ u η̂ ... ∗ u η̂ ∗... ∗ u η̂ i.. .
u u u
(3.103) q̂ijk = β̂ j ∗ µ̂ ∗ u α̂i ∗ u
γ̂ k
(3.104) = u
η̂ ∗... ∗ u η̂ .j. ∗ u η̂ ... ∗ u η̂ ∗... ∗ u η̂ i.. ∗ u
η̂ ∗... ∗ u
η̂ ..k .
The power curve plot in figure 3.7 was then obtained again with the likelihood
ratio test given as a comparison. We see that the power level for the first two
orderings are almost the same, as expected, while the final ordering produces a much
higher power. All three QANOVA methods are more powerful than the likelihood
ratio test.
66
Power Plots
1
Order 1
0.9 Order 2
Order 3
0.8 Lik ratio
0.7
0.6
power
0.5
0.4
0.3
0.2
0.1
0
0 0.2 0.4 0.6 0.8 1
theta
Figure 3.7: Plots of power versus θ for the second simuation study. We have three curves for the
different QANOVA term orderings and one for the likelihood ratio test.
In the simple case of one-way QANOVA the two orderings have little effect on the
power but it does make a difference for the more complicated scenario. The more
terms we have in the model the exponentially greater the possible orderings become
and thus more difficult to assess which ordering will provide the greatest power.
We still need to discover, first of all, why there is such a discrepancy and whether
there is a systematic method for figuring out which ordering produces the highest
all possible orderings, although time consuming, may be the only way of finding the
optimal order. For readers who are interested in recreating these graphs please send
an e-mail to choes@umich.edu.
Critical values for the QANOVA tests need to be obtained using the permutation
procedure. For main effects this process is simple, but if we wish to test the presence
permutation method for such situations — possibly using a Latin Squares approach.
CHAPTER IV
Application
In this section we apply the techniques set out in the previous chapter and describe
a model for the right hand that forms part of the HUMOSIM full-body motion
prediction model. This application was the main impetus for my research.
The purpose of our model is to predict an orientation trajectory for the right hand
during reaching motions. The hand is considered the end effector in this case and is
not holding any sort of object. The user of this model will provide the starting and
ending location and orientation of the hand (we envision a graphical interface where
the end-user places target “hand prints” — see figure 4.1) as well as information
The data with which the model was built are from an experiment conducted at
the HUMOSIM laboratory in the summer of 2000. The purpose of the experiment
was to assess how the terminal hand orientation affected the entire body posture
during seated motions. Experimental fixtures were built wherein a subject would
67
68
Figure 4.1: Illustration of how the user will place target “hand-prints” for the human model to
reach to.
69
reach to an object placed in different locations and grasp it with the hand in several
rotated orientations.
The experiment task was implemented by presenting a set of five standard grip
blocks clustered on the faces of a cube array. The cube was constructed with each
side face turned 20 degrees to the front to enhance visibility and to tighten the
cluster of blocks. Each cluster or pod represented a spatial locality and each of the
five near faces of the array represented a direction effect. Four hand orientations
for gripping different edges of the five blocks provided an orientation effect. The
edges of the grip blocks were color-coded: Top was green, right was red, bottom
was blue, and left was yellow. Three clusters were stacked and supported from
a post (tower) that was repositioned with respect to the subject to provide four
lateral locations. Figure 4.2 illustrates this experimental setup. This created a
combinations for the hand of which 210 were deemed reachable. Thus the entire
Twenty subjects were selected to distribute age, sex and height. Table 4.1 shows
flex” optical tracking system and a five-sensor “Flock of Birds” electromagnetic sys-
tem. Since these were seated reaches, subjects were outfitted with sensors only from
the hip and above. Figure 4.3 shows placement of the sensors. Using a combina-
from the subjects, the x-y-z coordinate trajectories for each marker location in the
All subjects began their reach motions from a “home” position with the right hand
70
Figure 4.2: Illustration of experiment setup. (a) Each cluster consists of five blocks. The blocks were
color-coded and the subject was asked to grip the block with the thumb on a selected
color side. (b)Three clusters were placed at different heights on a tower. (c)The tower
was then placed in four positions: 45◦ to the left, forward, 45◦ to the right, 90◦ to the
right.
71
(a) Front
(b) Back
Figure 4.3: Illustration of placement of optical markers (shown as circles) and electromagnetic sen-
sors (shown as squares) on a subject
72
Figure 4.4: Illustration of the marker positions for the HUMOSIM linkage system. For our experi-
ment we will not have any of the markers below the hip.
73
Table 4.1: Anthropometry of subjects in Terminal Hand Orientation and Effort Reach Study, 2000
resting on the right thigh. Subjects also had to push or pull the block after gripping
it but we decided not to differentiate between this as the purpose of our model was
to predict reaching tasks1 . We divided each reach into two distinct trajectories: one
for going toward the target and one for returning to the home position, giving us
a total of 8820 motions. We fit separate models for each: the “Go” model and the
“Return” model.
4.1.3 Data Preparation and Fitting of the Speed-Adjusted Slerp Residual Functional
Regression Model
We calculated the local orientation trajectory of the right hand with respect to
the right forearm using the techniques laid out in section 3.1. The first step for this
was to obtain the rotation matrices with respect to the global coordinate system
1 Analysis seemed to indicate that there was no siginificant difference
74
for both the hand and the forearm. Using the marker nomenclature in figure 4.42 ,
the basis vectors that form the rotation matrices’ columns are given as, first for the
hand:
(rgrip − rwrist)
(4.1) xhand = ,
k(rgrip − rwrist)k
(rhand − rwrist) × (rgrip − rwrist)
(4.2) yhand = ,
k(rhand − rwrist) × (rgrip − rwrist)k
xhand × yhand
(4.3) zhand = .
kxhand × yhand k
(rwrist − relbo)
(4.4) xforearm = ,
k(rwrist − relbo)k
(rwrist − relbo) × (rshoul − relbo)
(4.5) zforearm = ,
k(rwrist − relbo) × (rshoul − relbo)k
zforearm × xforearm
(4.6) yforearm = ,
kzforearm × xforearm k
where × represents the cross product. Using this method of calculation, we define the
identity or reference orientation of the hand to be aligned with the forearm and have
the palm facing downwards. We shall call this the neutral orientation; see figure
4.4. We discovered though that there were instances of instability in the forearm
orientation due to problems with zforearm . This basis vector is calculated as the
normal vector to the plane formed by the forearm and the upper arm. When the arm
is bent at the elbow this plane is well-defined but when the arm is straight the forearm
and the upper arm is aligned and the plane collapses causing the cross-product to
become unstable. With no alternative way to obtain the forearm orientation the
data for such cases had to be dropped. There were additional problems that included
coincident and missing marker positions. All told, the amount of motions that were
2 rshoul, relbo and rwrist are the joint center locations (which are derived) of the right shoulder, elbow and wrist,
respectively. rhand is the location of the electromagnetic marker placed of the back of the right hand. rgrip is a
derived location that represents the grip center or the middle of the palm
75
Figure 4.5: “Handplot” of the neutral orientation. The conical cylinder shows the forearm aligned
parallel to the x-axis. The hand is, in turn, aligned to the fore arm with the palm facing
downwards.
used to produce each model was 3071 for the “Go” model and 3096 for the “Return”
model.
Using the appropriate conversion algorithm (see appendix) these rotation matri-
ces were converted into global quaternions for the hand and the forearm. The local
quaternion trajectory for the hand was then calculated from the resulting global tra-
jectories using (3.1). Depending upon the domain and range of the inverse trigono-
metric functions in the computer software, it is possible that the calculated trajec-
tories will flip between antipodes. Since we have smooth motions and each posture
is only one twentieth of a second apart we can use a simple modification of the flip
algorithm to select the antipode that is closer to the posture preceding it.
The data also needed to be “cut” to remove some of the frames at the beginning,
before the hand begins its rotational motion, and at the end, after the hand has
completed its rotational motion. We need to do this to get rid of this unwanted
source of variability and also to maximize the use of our cubic B-splines so that we
76
is no definite rule on how to determine these cut points and that makes this somewhat
arbitrary. As a first step to determining these cuts and for use in the speed-adjusted
slerp, we obtain the angular speed profile (3.39) for each of our observed trajectories.
We define the starting cut point as the frame just before the speed profile first exceeds
5◦ per second and the end cut point as the frame just after the speed profile last falls
Comparing our rotational cut points with the translational cut points obtained
by Wang (2006), it appears that the hand starts to rotate before translational motion
begins and finish after translation ends. Histograms of the difference between the cut
points are shown in figure 4.6. The difference in the starting point is small enough
such that we can probably attribute it to the fact that we used separate methods
to cut our data but the discrepancy in the endpoint is quite large. Plots of the cut
speed profiles (see figure 4.7) typically show a right skewed shape indicating that
there is a period of fine-tuning of the orientation toward the end of the motion.
We then proceeded to fit our speed-adjusted slerp model to our cut local quater-
nion trajectories using (3.40) and from that, obtained our speed-adjusted slerp resid-
ual trajectories. Since all these start and end at the identity the mean quaternion
was very close to it (around 4◦ different) and so we decided to take the tangent space
We then fit cubic B-splines to our tangent mapped residuals using (3.34). We
had to restrict the B-spline curves to start and end at the origin 0 due to the nature
of the residual trajectories (see appendix). We used 8 basis functions for our spline
fit as we judged this to be the minimum amount required to provide a good fit to
the data. The use of more basis functions did not produce a substantial increase
77
0.25
0.20
0.15
0.10
0.05
0.0
0 20 40 60
(a) Start
0.06
0.05
0.04
0.03
0.02
0.01
0.0
0 20 40 60 80
(b) End
Figure 4.6: Histograms of the difference in the start cutoff points and end cutoff points between
rotational and translational motion defined as ∆ = Rotation − Translation. The units
are the number of frames.
78
in fit and it was deemed to be not worth the increase in dimensionality; see table
4.2. A few trajectories had less than the minimum 14 frames required to fit our
spline. Rather than throw these observations away, we used the slerp algorithm to
interpolate between successive frames so that we doubled the frames available; this
was enough to ensure that all such trajectories had the requisite 14 frames.
Now that we had our response data — the stacked trivariate spline control points
5. Rdist: Angle of rotation distance of the hand orientation at the target from
the neutral orientation (see figure 4.5). For the “Go” model this would be
obtained from the last observation, qend in each local quaternion trajectory.
79
“Return” model the same formula is applied to the first observation qstart .
6. Radius, Theta, Phi: Spherical co-ordinates of right hand wrist joint at target.
For “Go model we would use the final hand position and for the “Return model
the initial hand position. We set up a Cartesian co-ordinate system such that
the mid-point of the hip (obtained by averaging the left and right hip markers)
is the origin and the x-axis extends to the right of the torso parallel to the
ground, the y-axis extends forward and finally the z-axis extends perpendicular
to the ground. Radius r is the Euclidean distance (in cm) to the right hand
y
(4.7) θ = arctan ,
x !
p
x2 + y 2
(4.8) φ = arcsin .
r
7. Expx, Expy, Expz: This is the orientation of the right hand at the target location
with respect to the forearm. We use the logarithm map to convert these to
tangent vector form. For the“Go model we would use logmap(qend ) and for
Target information was converted from factors — tower, pod, block, grip, to
location settings. We also used spherical co-ordinates with respect to the midpoint
of the hip to allow us to predict in instances when the subject moves about such that
We used S-plus to fit our model using the “mlm” package. Using the Wilkinson-
80
+ Phi+Expx+Expy+Expz)
where the poly(. . . ,2) represents a second order polynomial model. The first model
had 22 regression coefficients to estimate while the second model had 132 due to the
interaction terms. This was done for both the “Go” and the ”Return” model.
In both cases a likelihood ratio test was performed to compare the two nested
models using (3.57) resulting in a p-value that was almost zero. Thus there was a
significant statistical difference between both models. A test of both models against
the mean only model also resulted in a rejection of the null model. Fit however
81
Table 4.2: DTW distance as compared to actual observed local quaternion trajectory
Model Go Return
Spline 8 7.0761◦ 6.5046◦
Spline 10 7.0022◦ 6.3815◦
Spline 12 6.9554◦ 6.3197◦
Slerp 10.7696◦ 11.0869◦
1st order 9.9027◦ 9.9040◦
2nd order 9.2827◦ 9.4976◦
appeared to be poor; adjusted R2 values for each of the 24 spline control points were
very low— the highest of them being around 20% for the first order models and 25%
We converted our fitted spline control points all the way back to a local quater-
nion trajectory to compare with our observed trajectories. We also looked at the
speed adjusted slerp trajectories as well as the spline fit trajectories. The spline fit
trajectories are, in effect, what we are treating as our observed data when we fit
our functional regression model and would therefore be considered the best we could
possibly do. We looked at spline fits using eight, ten and twelve basis functions to see
if there were substantial improvements to be made with using more basis functions.
This turned out not to be the case. We used the DTW method to make our com-
parisons. Table 4.2 shows the mean DTW distances for each of the fitting methods
To illustrate how to interpret these numbers, let us look at the comparison between
the spline fit trajectory and the actual trajectory. The DTW distance indicates that
on average each the orientation of the right hand in each frame of the spline fit
trajectory differs by 7.0761◦ from its counterpart frame from the actual trajectory.
Thus the process of first mapping onto the tangent space and then approximating
using cubic regression splines introduced an error of this magnitude. We also need
82
Figure 4.9: Picture depicting the local orientation of the hand with respect to the forearm (forearm
remains stationary), a “handplot”, for a reach where the first order model fit showed
a 10◦ DTW difference with the actual observed trajectory. The speed-adjusted slerp
trajectory is also shown. The frames are equally spaced in the time domain. Most of
the noticeable difference occurs in the second and third frames.
to note that by definition, all of our fitted trajectories are restricted to be the same
as the actual at the beginning and the end. To get a better idea of how much a 10◦
figure 4.9. There appears to be only a small noticeable difference between the actual
We see that the speed-adjusted slerp fares only slightly worse than the slerp
residual functional regression models. This seems to indicate that whatever source
of variability that remains after the speed-adjusted slerp has been fit does not seem
to depend very much on the explanatory variables we included in our model. The
very low R2 values that we obtained also provide evidence that this is so.
83
Table 4.3: DTW distance for the different models when data are subdivided by angular distance
to target orientation
model for simple reaches where the target hand orientation was close to the initial
hand orientation. For more extreme reaches we had expected a substantial improve-
ment in prediction ability for our slerp residual model. This however turned out to
be not the case. Using the Rdist variable we subdivided our data to those where
the target orientation was greater than 2 radians or 115◦ different from the initial
position. Table 4.3 shows the comparisons for all our models via the average DTW
distance measure. The slerp performs almost a 1◦ worse for such “extreme” reaches
while the first order model exhibits a fall of less than 0.25◦ so the data does seem to
indicate that the slerp residual model does a little bit better but it is definitely not
To study this further we grouped the data into twenty separate classes based on
Rdist. We then calculated the 5th, 50th and 95th percentile DTW distance for the
first order model and the slerp model at each class level. A plot of these percentiles
against the Rdist classes are given in figure 4.10. The plot seems to agree with
the conclusion that there does not appear to be a large difference between the slerp
fit and the first order model fit, even for reaches to targets with a large rotational
difference.
The speed-adjusted slerp can be considered the “straight line” model in rotational
terms and since it has no predictors is the simplest model possible. Its simplicity will
84
Rdist vs DTW
0.2
0.18
0.16
0.14
0.08
0.06
0.04
0.02
0 2 4 6 8 10 12 14 16 18 20
Rdist Class (1−20)
Figure 4.10: Plot of 5th, 50th and 95th percentile DTW distance for the first order model and the
slerp model by Rdist class. The Rdist variable measures the angle of rotation metric
between the orientation of the hand at the target with the “neutral” orientation. We
grouped the data into 20 separte classes based on the Rdist.
make it robust for prediction purposes and easy to implement. Since the predictors we
have chosen seem to have little effect on the model we must conclude that either there
are other more effective predictors that we don’t know about or that the remaining
we did not have subjects replicating reaches to targets so it is is not possible to assess
this.
We made the assumption that there is no effect on the orientation trajectory due
of the constraint approach and the functional QANOVA we will test this on a small
subset of the data. We look at just the “Go” reaches made to the front tower, middle
pod and center block. This resulted in a total of 104 observed trajectories with at
least 1 reach per subject (except for subject 11) and ranging from 1 observation for
85
We again use the speed-adjusted slerp residuals as our base data such that any
predictions we make will start and end at the orientations specified by the user. The
first step was to fit spherical regression splines (see section 3.4.2)to our slerp residuals
but found that our ALM optimization program had difficulty in finding a solution.
The use of professional optimization software might have solved this but we did not
have such software available to us. As we mentioned already, the splining method
using the tangent approach produced good fits to the data and we decided to modify
In the tangent mapping approach we had to map all of our trajectories onto a single
tangent space before fitting our spline data. This process introduced on average an
error of 7.0761◦ in DTW distance due mostly to the distortion effects of the tangent
mapping procedure. If we were to map each trajectory onto a separate tangent space
taken at its mean point we can reduce this distortion effect even further. We can do
this since we are going to map our spline control points back onto S 3 which we require
for our QANOVA model. However, we do need to keep track of the mean points for
each trajectory, which makes prediction using this method impossible unless we fit
Since the purpose of the model was to illustrate the QANOVA method and assess
the existence of the push/pull effect we went ahead with using the modified tangent
splining method. Using the formulation similar to (3.94)—(3.96), we define the first
(4.9) u
q̂i = u
µ̂ ∗ u α̂i = u
η̂ . ∗ u
η̂ ∗. ∗ u η̂ i ,
86
(4.10) u
q̂i = u
α̂i ∗ u
µ̂ = u
η̂ ∗. ∗ u η̂ i ∗ u
η̂ . ,
where i has two levels — push or pull. The null model is given by
u u u
(4.11) q̂i = µ̂ = η̂ . .
We then calculated the DTW test statistic for both orderings using (3.93), ob-
taining 0.8077 and 0.8119, respectively. The next step was to use the permutation
procedure described in section 3.4.4 to obtain the null distribution of the test statis-
tic and hence the critical value. The critical values for a 5% level test of the two
orderings were obtained to be 2.0117 and 2.0036 and thus we would fail to reject the
null in both cases. This seems to suggest that, at least for this subset of the data,
In section 3.3.3 we set out a quick and simple method for estimating the range
of motion limit for a joint from data using the empirical maximum Mahalanobis
measure. In our experiment we had a wide range of orientations for the right hand
including many that were on or close to the limit. The terminal local orientations
of the hand could potentially be used as data for estimating the joint limit. Unofor-
tunately, we cannot assume that this data follows the required assumption, namely,
of possible hand orientations, but as a result of the layout of the targets per
our experimental design. Thus there is a possible bias in our estimate of the
87
covariance matrix which would affect the general shape of the ellipsoid — the
directions of the three principal axes and the ratio of the three radii.
2. Using the maximal Mahalanobis distance makes our limit sensitive to data prob-
lems. Outliers caused by faulty data would not only affect the shape of the el-
lipsoid but also result in us perhaps choosing too large an isoprobability contour
The first problem is difficult to solve. One way to reduce the bias is if we remove
the interior points and keep only those that form the convex hull of our tangent
mapped terminal orientations. This way we remove nearly all of the potential bias
sources and weight each of the exterior extreme orientations equally. The second
distance we could use the ninety-fifth percentile. We could also use a more complex
robust covariance estimate such as that produced by the nearest neighbour variance
We used the tangent vectors of the target local orientations taken at the identity—
Expx, Expy and Expz which we already calculated as a covariate for our func-
tional regression model. We then identified the convex hull of these tangent vec-
tors and used just these exterior points for our covariance estimation. We recal-
culated the quaternion mean of the convex hull points, which turned out to be
tangent gaussian. There were fifty of these points and we looked at each one to
see if any had obvious faults. All were extreme but realistic orientations that were
on or close to the joint limit and thus we decided that we didn’t need to use the
We estimated the covariance matrix of our recentered fifty tangent vectors to be:
0.4982 0.0598 0.0266
(4.12) Σ̂ = 0.0598 0.1758
−0.0263
0.0266 −0.0263 0.1286
The sample mahalanobis distances for each of our vectors v1 , . . . , vn is given by:
h i 12
(4.13) dMah (vi ) = viT Σ̂−1 vi
We then obtained the maximal distance γ̂ = 2.3632 and thus the formula for our
where
−0.1324 −0.1226 −0.9836
(4.15) P = 0.4715
0.8651 −0.1713
0.8719 −0.4864 −0.0567
A plot of the joint limit and the data are given in figure 4.11. To assess the effec-
tiveness of the joint limit we sampled 25 points from the surface of the ellipsoid (see
figure 4.12) and produced handplots for each (see figure 4.13). Unfortunately, we can
see a few orientations that seem impossible3 — [1,4], [2,1] and [2,4], and a few that
do not seem as extreme as one would hope — [3,3] and [3,4]. If the estimated limit
rsults in too many impossible orientations, we can improve upon it simply by using
We can easily check if a potential prediction orientation lies beyond our calculated
Figure 4.11: Ellipsoidal Joint Range of Motion Limit estimated from our terminal local orientations
Figure 4.12: 25 sampled points from our Ellipsoidal Joint Range of Motion Limit
90
Figure 4.13: Handplots of the 25 sampled points from our Ellipsoidal Joint Range of Motion Limit.
Using a matrix index to identify a plot, e.g. [2,4] is the plot that is on the second row
and fourth column, we identify those that appear to be impossible — [1,4], [2,1] and
[2,4], and those that appear not to be
. on the joint limit boundary — [3,3] and [3,4]
91
1. Map the predicted quaternion onto the tangent space centered at q̄.
3. Look at the prediction more carefully if the distance is close to the limit given
by γ̂ = 2.3632.
accurately depict the joint limit. The joint limit for the shoulder produced by Herda
et al. (2002) appears to be quite a bit more complex and it would be reasonable to
assume that this is the case for the wrist as well. Still the ellipsoid appears to be a
reasonable approximation and can be used as a quick and effective check to see if a
We can also study the variability of the joint limits by subject. If we make the
naive assumption that the shape of the limit is the same for everyone4 , then we
can use the maximum mahalanobis distance as a simple univariate measure of how
flexible or “limber” a particular subject’s wrist is. We modeled this with respect to
the sex, age, weight and height of the subject. Only weight and sex appeared to be
it appears that wrist flexibility increases with weight for females while the opposite is
true for males. Our original experimental design had all twenty subjects reaching to
the same set of targets but due to data problems we had to drop some observations.
This means that we cannot really compare the limits between subjects as they were
4 This assumption would exclude the possibility that some people can be more flexible in a certain direction while
Figure 4.14: Plot of mahalanobis distance versus weight of subject. Males are indicated by “M” and
females are indicated by “F”. The regression line for males is given by the solid line
while the one for females is given by the dashed line. It appears as if wrist flexibility
increases with weight for females while the opposite holds true for males.
CHAPTER V
We shall now briefly summarize the contributions we have made as a result of this
research:
1. The idea of tangent mapping quaternions is not new (see Grassia (1998)). Many
authors including Prentice (1989), Rancourt et al. (2000) have used this as a
tool for analysis, where the data that they modeled were concentrated enough
such that the distortion effect was minimal. Our method of using slerp residuals
allows us to use the tangent mapping approach when the data are not initially
well concentrated.
2. Previous asymptotic results for the Bingham distribution have shown that we
the tangent plane. This result is presented in the literature as basically a tool
for allowing inference to be done on such data. We have presented the tan-
(see Prentice (1989), Rivest (2001)) were designed to model pairs of orienta-
93
94
tions where one was considered the response and the other the predictor. Our
and likelihood ratio tests can then be used for inference purposes.
categorical or factor covariates. Simulation studies have indicated that they are
that the hand seems to basically follow a slerp trajectory during reaching tasks
and that differences in anthropometry and target location cannot explain ap-
parent deviations from it. We have also introduced a simple way of estimating
sure. These limits are not meant to be an accurate representation but rather a
quick method for checking the quality of any predictions made from our model.
One way to improve upon our functional regression method would be to use a
better curve fitting procedure. The cubic B-spline approach that we have used is not
the “action” occurs in a relatively small portion of the trajectory and thus we are
our tangent-mapped residuals are in IR3 we could apply the modeling techniques set
out by Wang (2006). The Bezier curves use fewr parameters and might improve the
95
fit.
of the quaternion product is a problem. The greater the number of terms there are
in the model the more variable the estimates will be. Further study needs to be done
to figure out how variable these estimates are and which order would produce the
“best” estimate. We also need to discover why there is such a discrepancy in the
power for different orderings and whether there is a systematic method for figuring
out which ordering produces the highest power. Critical values for the QANOVA
tests need to be obtained using the permutation procedure as we do not have a de-
fined null distribution for the DTW test statistic. For main effects this process is
simple but if we wish to test the presence of interaction effects it is not so obvious.
We need to find a way of adapting the permutation method for such situations.
A major weakness of our hand orientation trajectory model is that all of our data
consisted of reaches that start and end at a “home” position. In our “Go” model we
have no variability at all in our starting orientation and therefore this severely limits
the predictive ability of our model when the user specifies a start orientation that
is far from neutral. This is true for our “Return” model which has no variability in
the final orientation. An ad-hoc blending approach that combined a prediction from
the “Go” model with one from the “Return” model was implemented for predictions
where the initial and target hand orientations were far from neutral. This blending
middle of the trajectory. Suppose that we have a subject that starts at an awkward
orientation and reaches to a target that is spatially distant but requiring a similarly
awkward posture. If a simple slerp trajectory was fit then we would have the subject
maintaining that awkward posture of the hand throughout the course of the reach.
96
By creating a weighted blend between the slerp model and the combination of the
“Go” and “Return” model1 we can control the amount by which the tendency to
neutral occurs. Still, the absence of real data makes this approach mere conjecture.
We still do not have a viable way of obtaining confidence regions for our predicted
univariate trajectories but not for our trivariate tangent vector trajectories, let alone
our quaternions trajectories. In the regression model we are predicting the spline
control point values and, assuming each is trivariate normal, we expect the confidence
how the spline curve will change if we vary each control point within its confidence
ellipsoid.
the translational aspect of the motion to produce a complete six degree of freedom
prediction model for the hand. Our work and that of Wang (2006) will be combined
along with other parts of the HUMOSIM framework to create a full figure motion
predicted trajectory of the right hand reaching to the bottom block of the lower pod
1 actually applied the other way round as the “Return” model predicts a trajectory that starts at a non-neutral
orientation and ends at the neutral and the “Go” model is the other way around.
97
Figure 5.1: Combined reach trajectory predicted by our model to a target from the HUMOSIM
experiment.
APPENDICES
98
99
APPENDICES
The first section of the appendix will cover algorithms that we can use to con-
vert between the various rotation parameterizations. There are numerous reasons
we would wish to do this. We have already seen that the easiest way to obtain the
our analysis. The Euler angle representation can be used to better interpret our
results. In an analysis conducted on torso motion of people with spinal cord injuries
and lower back pain we converted predicted orientation trajectories into Euler an-
gles such that we can better assess and interpret the effects of these problems by
The second section will explain how we obtained the spline design matrix or Ψ
matrix in (3.33). The Ψ matrix is made up of the spline basis functions and can be
Conversion Algorithms
A great reference and the source of the algorithms shown here is Baker (2006).
The backward conversion can vary in difficulty depending on whether or not the
matrix is exactly special orthogonal i.e. SO(3). Rounding errors, in particular, could
have occurred during its synthesis and would result in the matrix not being exactly
follows:
m23 −m32
(b) x = 4w
,
m31 −m13
(c) y = 4w
,
m12 =m21
(d) z = 4w
,
−m22 −m33
2. else w = 0 and if 2
> 0 then
q
−m22 −m33
(a) x = 2
,
101
m12
(b) y = 2x
,
m13
(c) z = 2x
,
1−m33
3. else x = 0 and if 2
> 0 then
q
1−m33
(a) y = 2
,
m23
(b) z = 2y
,
4. else y = 0 and z = 0.
As mentioned before Euler angles are defined by their order and thus our conver-
sion algorithms depend on this. Let us assume that we are using the XY Z ordering
for the Euler angles and define the angles as a triple (α, β, γ). If we wish to convert
2xy+2wz
1. γ = arctan 1−2y 2 −2w 2 ,
2. β = arcsin(−2xz + 2wy),
2xw+2yz
3. α = arctan 1−2x 2 −2y 2 .
102
a regression spline to this data using m B-spline basis functions of degree p. For
t − ki ki+p+1 − t
Bi,p+1(t) = Bi,p (t) + Bi+1,p (t)
ki+p − ki ki+p+1 − ki+1
where k are known as knot points. If the function yt is constrained such that it starts
and ends at 0,2 then our knot sequence is given by k1 , . . . , km+p+3 where k1 = . . . =
we have that:
ψij = Bj,p+1(ti )
matrix with two extra columns Ψ∗n×(m+2) . ψij ∗ , the ijth element of this new matrix
is given as:
ψij∗ = Bj,p+1(ti )
103
104
BIBLIOGRAPHY
Khatri, C. and K. Mardia (1977). The Von-Mises Fisher Distribution in Orientation Statistics.
Journal of the Royal Statistical Society, Series B(Methodological), Vol. 39, 95-106.
Mardia, K. and P. Jupp (2000). Directional Statistics. John Wiley & Sons LTD.
Prentice, M. (1986). Orientation Statistics Without Parametric Assumptions. Journal of the
Royal Statistical Society. Series B(Methodological), Vol. 48, Issue 2, 214-222.
Prentice, M. (1987). Fitting Smooth Paths to Rotation Data. Applied Statistics, Vol. 36, Issue
3, 325-331.
Prentice, M. (1989). Spherical Regression on Matched Pairs of Orientation Statistics. Journal of
the Royal Statistical Society. Series B (Methodological), Vol. 51, No. 2, 241-248.
Ramsay, J. and B. Silverman (1997). Functional Data Analysis. Springer, New York.
Rancourt, D., L. Rivest, and J. Asselin (2000). Using Orientation Statistics to Investigate Vari-
ations in Human Kinematics. Applied Statistics, 49, 81-94.
Rencher, A. (2002). Methods of Multivariate Analysis. Wiley $ Sons, New York.
Rivest, L. (2001). A Directional Model for the Statistical Analysis of Movement in Three Dimen-
sions. Biometrika, 88, 3, 779-791.
Scheffe, H. (1959). The Analysis of Variance. Wiley & Sons, New York.
Schlag, J. (1991). Using Geometric Construction to Interpolate Orientations with Quaternions.
Graphics Gems II, Academic Press, 377-380.
Shen, Q. and J. Faraway (2004). An F Test for Linear Models with Functional Responses.
Statistica Sinica, Vol. 14, 1239-1257.
Shoemake, K. (1985). Animating Rotation with Quaternion Curves. ACM SIGGRAPH, Vol. 19,
No. 3.
Shoemake, K. (1987). Quaternion Calculus and Fast Animation. ACM SIGGRAPH, Course
Notes on State of the Art Image Synthesis, 101-121.
Thompson, R. and R. Clark (1981). Fitting Polar Wander Paths. Physics of the Earth and
Planetary Interiors, 27, 1-7.
Wang, J. (2006). Statistical Modeling for 3-D Trajectories. PhD Thesis, Department of Statistics,
University of Michigan.
Wang, N. and A. Raftery (2002). Robust covariance estimation via nearest neighbor cleaning.
Journal of the American Statistical Association, 97, 994-1019.
Wang, W. and B. Joe (1993). Orientation Interpolation in Quaternion Space using Spherical
Biarcs. Proceedings of Graphics Interface, pg 24-32, Morgan Kauffman, San Francisco.
Watson, G. (1983). Statistics on Spheres. Wiley & Sons, New York.
Weisstein, E. (2006). mathworld.wolfram.com.
ABSTRACT
to Human Motion
by
Su Bang Choe
sured in terms of its location and orientation. The purpose of the work presented
here is to develop statistical methods for modeling the orientation aspect of mo-
tion. The methods use the quaternion parameterization of orientation, the domain
of which is the four dimensional unit hypersphere. This advantages provided by this
parameterization are that it is compact, interpretable and free from coordinate sin-
gularities. The focus is on applying our methods to human motion analysis where
we seek to predict the orientation trajectory of a body segment during a motion task
using covariates such as anthropometry and location and orientation of the body
There are two approaches to analyzing quaternion data: a tangent mapping ap-
proach that uses the exponential and logarithm maps to approximately linearize
1
the quaternion space and a constraint approach in which we treat the quaternion
Existing regression techniques for orientation data had been limited to modeling a
single frame response with a single orientation covariate. This model allows us to re-
distribution for our tangent mapped quaternions is presented along with a quick and
simple method for estimating a joint range of motion limit from existing data. We
also introduce the concept of slerp residuals that provide a way of reducing the error
inherent in the tangent mapping process. Finally, using the constraint approach, we
develop a quaternion ANOVA model (QANOVA) and its functional extension for
making inference decisions about the effect of factor covariates on orientation data.
We illustrate our methodology using experimental data obtained from the HU-
MOSIM laboratory at the University of Michigan. Using this data we analyze and
develop a prediction model for the orientation trajectory of the right hand during un-
laden reach motions. Given the initial and final orientation we use a speed adjusted
spherical linear interpolation, or slerp, to predict the orientation trajectory path be-
tween them. Our functional regression model shows that deviations from this slerp