* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Rotation Matrices 2
Jordan normal form wikipedia , lookup
Determinant wikipedia , lookup
Eigenvalues and eigenvectors wikipedia , lookup
Matrix (mathematics) wikipedia , lookup
System of linear equations wikipedia , lookup
Covariance and contravariance of vectors wikipedia , lookup
Non-negative matrix factorization wikipedia , lookup
PerronβFrobenius theorem wikipedia , lookup
Gaussian elimination wikipedia , lookup
Singular-value decomposition wikipedia , lookup
CayleyβHamilton theorem wikipedia , lookup
Four-vector wikipedia , lookup
Matrix calculus wikipedia , lookup
Matrix multiplication wikipedia , lookup
Rotation Matrices 2
WCR 2017-04-21
Outline
Markers and Measured Orientation Vectors
Rotation-of-Points Matrix
Rotation-of-Coordinate-System Matrix
Summary
Helical Axis and Angles
Simulating Movement with Helical Angles
Euler Angles
Simulating Movement with Euler Angles
Shoulder Joint
Hip Joint
Markers and Measured Orientation Vectors
Marker locations are determined in the global (lab) reference system (GRS), using motion
capture techniques. These marker locations are used to estimate orthogonal unit vectors
iprox,jprox,kprox for the proximal segment and idistal,jdistal,kdistal for the distal segment, at each time
point. Since the markers are in the GRS, the unit vectors are also expressed in the GRS. We
assume vectors are expressed as column vectors. We also assume that i,j,k of the proximal and
distal segments are defined so that they are aligned in the neutral position. Another way of
saying this is that the joint angles (flexion/extension, abduction/adduction, internal/external
rotation) are assumed to be zero when i,j,k point in the same directions for both segments. (The
ankle joint may be an exception to this general rule.)
Our goal is to use our knowledge of the unit vector orientations at each time to determine the
angles of flex/ext, abd/add, and IR/ER, of the distal segment relative to the proximal, at each
time.
At each time, we arrange the orthogonal unit vectors of the proximal and distal segments into
two 3x3 matrices. Each column is a unit vector expressed in the GRS:
π
ππππ₯ = (πππππ
π
πππ π‘ππ = (ππ
πππππ
πππππ
ππ
πππππ
ππΊπ
ππ₯,ππππ₯
πππππ ) = (ππΊπ
ππ¦,ππππ₯
ππΊπ
ππ§,ππππ₯
ππΊπ
ππ₯,πππ π‘ππ
ππ
πππππ ) = (ππΊπ
ππ¦,πππ π‘ππ
ππΊπ
ππ§,πππ π‘ππ
ππΊπ
ππ₯,ππππ₯
ππΊπ
ππ¦,ππππ₯
ππΊπ
ππ§,ππππ₯
ππΊπ
ππ₯,πππ π‘ππ
ππΊπ
ππ¦,πππ π‘ππ
ππΊπ
ππ§,πππ π‘ππ
ππΊπ
ππ₯,ππππ₯
ππΊπ
ππ¦,ππππ₯ )
ππΊπ
ππ§,ππππ₯
ππΊπ
ππ₯,πππ π‘ππ
ππΊπ
ππ¦,πππ π‘ππ )
ππΊπ
ππ§,πππ π‘ππ
(1)
(2)
Rotation-of-Points Matrix
The rotation matrix that will move the vectors in the proximal segment into alignment with the
distal segment is Rp2d :
π
π2π π
ππππ₯ = π
πππ π‘ππ
(3)
π
π2π π
ππππ₯ π
ππππ₯ β1 = π
πππ π‘ππ π
ππππ₯ β1
(4)
π
π2π πΌ = π
πππ π‘ππ π
ππππ₯ β1
(5)
π
π2π = π
πππ π‘ππ π
ππππ₯ π
(6)
In going from eq. 5 to eq. 6, we used the fact that R-1=RT when R is a rotation matrix. Note that
the rotation matrix Rp2d rotates the vectors, or (equivalently) the points on the segment. Rp2d is
not a rotation of the coordinate system. The rotation matrices in Winter, 4th ed., chapter 7, are
rotations-of-coordinate-systems, which leave the points themselves unmoved. Therefore we
calculate Rp2d according to the equation 6. Saying it again, slightly differently, because it is
important to understand: Rp2d is the matrix which, if we multiply it times the unit vectors in the
proximal segment (as they are at one instant), will give us a set of unit vectors that are identical
to the distal segment unit vectors, as they are at that instant. At most joints (the ankle being an
exception), we assume the distal and proximal segment unit vectors are aligned in the neutral
position. In that case, Rp2d tells us how the distal segment is rotated relative to its neutral
orientation.
Rotation-of-Coordinate-System Matrix
An alternate approach to quantifying the relative orientation of segments is to consider rotation
of the coordinate reference system, instead of rotation of the distal segment relative to the
proximal. Mathematically, there is no particular reason to prefer rotation-of-points or rotationof-coordinate-systems: either approach will successfully account for rotations in three
dimensions. The rotation-of-points approach is, perhaps, easier to visualize, since one rotates the
segment itself. However, the rotation-of-coordinate-system approach has a practical advantage
for biomechanics: when we do successive rotations of the coordinate system, the second and
third rotations will be relative to the rotated (distal segment) axes, because the rotation of
coordinates βtakes the axes alongβ. Rotations-of-points do not βtake the axes alongβ, so
successive rotations are always about the original axes, and not about the moving distal segment
axes.
Imagine rotating the coordinate system along with the distal segment. When we multiply the
rotation-of-coordinate-system matrix by a vector, we get the expression of that vector in the
rotated reference system. Therefore, the rotation-of-coordinate-system matrix representing the
combined movement of the distal segment relative to the proximal will express the unit vectors
of the proximal segment (represented by the identity matrix) in the distal segment coordinate
system. Put another way, the columns of the rotation-of-coordinate-system matrix express what
iprox, jprox, and kprox βlook likeβ to an observer in the distal segment coordinate system. We
know, from experimental observation of markers, Rprox and Rdistal, whose columns are the unit
vectors of the proximal and distal segments, expressed in the GRS. The following equations
show how we can use that information to express iprox, jprox, kprox in terms of idistal, jdistal, kdistal.
πππππ = ππ
πππππ π11 + ππ
πππππ π21 + ππ
πππππ π31
(7)
πππππ = ππ
πππππ π12 + ππ
πππππ π22 + ππ
πππππ π32
(8)
πππππ = ππ
πππππ π13 + ππ
πππππ π23 + ππ
πππππ π33
(9)
The above three equations can be written as a matrix equation:
(πππππ
πππππ
πππππ ) = (ππ
πππππ
ππ
πππππ
π11
π
ππ
πππππ ) ( 21
π31
π12
π22
π32
π13
π23 )
π33
(10)
where iprox, etc., are column vectors. Matrix Qβ‘(qij) is the rotation-of-coordinate-system matrix.
The columns of Q are the proximal coordinate system unit vectors, expressed in terms of the
distal coordinate system. We apply equations 1 and 2 to equation 10:
π
ππππ₯ = π
πππ π‘ππ π
(11)
π
πππ π‘ππ β1 π
ππππ₯ = π
πππ π‘ππ β1 π
πππ π‘ππ π
(12)
π = π
πππ π‘ππ π π
ππππ₯
(13)
Compare equation 6 to equation 13. Equation 6 is the rotation-of-points matrix that moves the
proximal segment unit vectors into alignment with the distal coordinate system vectors. Q in
equation 13 is the rotation-of-coordinate-system matrix, that expresses the proximal segment unit
vectors in terms of the distal segment coordinate system.
Summary
We have demonstrated two ways to represent the relative orientation of the distal and proximal
segments: by the rotation-of-points (Rp2d) or by the rotation-of-coordinate-systems (Q). We
need to estimate the proximal and distal segment unit vectors in the GRF (Rprox and Rdistal) to
estimate Rp2d or Q. The next step is to use Rp2d or Q to estimate the joint angles,
Helical Axis and Angles
In the helical approach, we will do a single rotation about an axis which may not be aligned with
any of the principle axes in either segment. It is always true that for any non-zero rotation of a
segment, there is a single axis n=(nx;ny;nz) and an associated angle ο¦ such that a rotation by angle
ο¦ about n will move the proximal i,j,k into the distal i,j,k. (If the distal segment is in the neutral
position relative to the proximal, then the angle ο¦ will be zero and the axis will be undefined.) If
n is a unit vector (which we can assume without loss of generality), then the components of n
along the X, Y, and Z axes tell us how to βallocateβ ο¦ to flexion/extension, abduction/adduction,
and internal/external rotation. Now we show how to determine n=(nx;ny;nz) from Rp2d.
(Remember that we have already determined Rp2d from marker locations.)
The rotation-of-points matrix arising corresponding to rotation by ο¦ about n=(nx;ny;nz) is
β π’π₯2 (1
πππ π
β πππ π)
(π’π₯ π’π¦ (1 β πππ π) + π’π§ π πππ
π’π₯ π’π§ (1 β πππ π) β π’π¦ π πππ
π
βππππππ =
π’π₯ π’π¦ (1 β πππ π) β π’π§ π πππ
πππ π β π’π¦2 (1 β πππ π)
π’π¦ π’π§ (1 β πππ π) + π’π₯ π πππ
π’π₯ π’π§ (1 β πππ π) + π’π¦ π πππ
π’π¦ π’π§ (1 β πππ π) β π’π₯ π πππ) (14)
πππ π β π’π§2 (1 β πππ π)
which can also be written as
π
βππππππ
π02 + π12 β π22 β π32
= ( 2(π1 π2 β π0 π3 )
2(π1 π3 + π0 π2 )
2(π1 π2 + π0 π3 )
β π12 + π22 β π32
2(π2 π3 β π0 π1 )
π02
2(π1 π3 β π0 π2 )
2(π2 π3 + π0 π1 ) )
2
π0 β π12 β π22 + π32
(15)
(http://mathworld.wolfram.com/EulerParameters.html, retreived 2013-03-22) where
e0=cos(ο¦/2)
(16a)
e1=nxsin(ο¦/2), e2=nysin(ο¦/2), e3=nzsin(ο¦/2)
(16b)
The helical angle approach finds the one single axis n=(nx;ny;nz), about which we can rotate the
segment to move it from its neutral to its observed position, and it finds the angle of rotation, ο¦.
We wish to find the unit vector n and the rotation angle ο¦ which will make the theoretical
rotation-of-points matrix Rhelical equal to the measured rotation-of-points matrix Rp2d:
π
βππππππ = π
π2π
(17)
when
πππ π =
π11 +π22 +π33 β1
(18)
2
π11 +π22 +π33 β1
πππππππ = ππππ (
2
)
(19)
It can be shown by algebra (http://www.kwon3d.com/theory/jkinem/helical.html, retrieved 201303-24) that each column of the following matrix is a scaled version of the rotation axis, n.
π = ({π1 }
{π2 }
1
{π3 }) = (π
βππππππ + π
βππππππ π ) + πΌ(1 β πππ π)
2
(20)
where I is the identity matrix. Combining equations 17, 18, and 20, we get
π = ({π1 }
π = ({π1 }
{π2 }
{π2 }
1
{π3 }) = (π
π2π + π
π2π π ) + πΌ (1 β
2
π11 +π22 +π33 β1
2
)
1
{π3 }) = (π
π2π + π
π2π π + πΌ(1 β (π11 + π22 + π33 )))
2
(21)
(22)
To minimize round-off errors, estimate n by choosing the column from (22) above which has the
largest magnitude. Normalize that column vector to have unit length:
π
π = βππππ₯ β
πππ₯
(23)
where nmax = column of N with largest magnitude = maxnorm(n1, n2, n3).
Before proceeding further, check that the values for n and ο¦prelim generate a rotation matrix equal
to Rp2d, by plugging n and ο¦prelim into equation 14 and computing Rhelix. If Rhelix does not match
Rp2d to good precision, set ο¦=-ο¦prelim. This is necessary because the estimation of ο¦ by equation
19 may result in a sign error for ο¦. You might think that n would then point the opposite way, in
which case we would still get correct answers for angles, but this is not always the case. We do
not want small round-off differences between matrices to make us erroneously conclude that the
sign of Οprelim needs changing. Therefore we use equations 14 to compute two rotation-of-points
matrices: Rhelix(n,+Οprelim) and Rhelixn,-Οprelim). We choose the sign of Ο that gives a matrix that
is βcloser toβ the matrix Rp2d , the rotation of points matrix computed with equation 6. We
define βcloser toβ by computing
π+ = ππππ(R βππππ₯ (π, +πππππππ ) β R π2π )
(23a)
πβ = ππππ(R βππππ₯ (π, βπππππππ ) β R π2π )
(23b)
and
where norm denotes the 2-norm, or equivalently, the Euclidean norm, of a matrix. If d- is
smaller than d+, we choose Ο = -Οprelim ; otherwise, we choose Ο = +Οprelim.
The projections of ο¦n onto the proximal segment axes are the respective amounts of flex/ext,
abd/add, and IR/ER. If +X points right (flex/ext axis), +Y points forward (add/abd axis), and +Z
points up (IR/ER axis), then
Flexion/extension:
ππ = πnx
(24)
Adduction/abduction:
ππ = πny
(25)
ππ = πnz
Internal/external rotation:
(26)
The algorithm just described, for finding the helical axis and angles, fails when the proximal and
distal segments are exactly aligned. It is not surprising that it fails, because when the segments
are aligned, the rotation angle should be zero, and in that case there is no uniquely defined axis
of rotation. Mathematically, the problem occurs in equation 23: n=nmax/||nmax||. When the
proximal and distal segments are aligned, Rp2d is the identity matrix, and when Rp2d=I, the
matrix N in equations 20-22 is the zero matrix, and so the vector nmax has length 0, and
equation 23 has an undefined (divide by zero) result. This problem is handled by checking for
Rp2d=I. If Rp2d=I, the helical angles are set equal to zero, and the axis can be arbitrarily set to
n=(1;0;0), or can be estimated by interpolating from nearby time points at which the axis is well
defined.
Simulating Movement With Helical Angles
Simulation of movement using helical angles is fairly straightforward. Create a 3xN matrix P,
whose columns Pj, j=1..N, are the N points in an object. Choose the axis of rotation n and the
desired rotation angle ο¦. Use equations 15, 16, and 14 to create the rotation-of-points matrix R.
Rotation about the origin moves the points P to Protated:
ππππ‘ππ‘ππ = π
π
(27)
where P and Protated are both expressed in the same coordinate system, such as the global
reference system. Rotation about a point C is achieved as follows, assuming P, C, and Protated
are all expressed in the same coordinate system:
ππππ‘ππ‘ππ = π
(π β (πΆ β¦ πΆ)) + (πΆ β¦ πΆ)
(28)
where (Cβ¦C) denotes a 3xN matrix composed of N replicates of the column vector C.
Euler Angles
One can decompose a rotation in three dimensions into three successive rotations about axes that
are anatomically defined. This is in contrast to the helical approach, in which a single rotation is
done about an axis that is not anatomically defined. When using Euler angles, we must define
axes and choose the order of rotations. The order of rotation matters. The order dependence can
be understood mathematically as a result of the fact the matrix multiplication is not commutative:
if A and B are matrices, it is generally true that ABβ BA. The order dependence can be
understood physically as meaning that, for example, 45° flexion followed by 45° abduction
(about the rotated ab/adduction axis) will result in a different segment orientation than 45°
abduction followed by 45° flexion (about the rotated flexion/extension axis). The angles of
rotation are called Euler angles.
We choose to use matrices that represent rotating the coordinate system while leaving the points
in place: the rotation-of-coordinate-system matrices. We choose this even though it may be
easier to visualize the action of rotation-of-points, which moves the segment itself. To
recapitulate the reason, which was also described above: if we do successive rotations of points,
each successive rotation is about the original coordinate axes, since points are always expressed
in the original coordinate system. This means that the combined rotation matrix
RpointsXYZ = RpointsZRpointsYRpointsX, for example, represents rotation about proximal X, then
proximal Y, then proximal Z. Thatβs not what we want. We want to rotate about X (which is the
same for proximal and distal segments initially), then about Yβ= distal segment Y, then about
Zβ=twice-rotated distal segment Z. For this reason, we must use rotation-of-coordinate-system
matrices.
There are two kinds of rotation sequences that can be used to account for any rotation in three
dimensions: Euler sequences and Cardan sequences. Euler sequences use a shared axis in the
aligned proximal and distal segments for the first rotation, then an axis in the distal segment,
which has been rotated by the first rotation, for the second rotation, and finally, the same distal
segment axis that was used for the first rotation is used again for the final rotation β but due to
the first two rotations, this axis now points in a different direction than it did initially. An
example of such a sequence is X-Yβ-Xβ, or simply X-Y-X. This sequence indicates a rotation
about X, followed by a rotation about the rotated Y axis (called Yβ to indicate that it moved
during the first rotation), and then about the rotated X axis (denoted Xβ). There are six possible
Euler sequences: X-Y-X, X-Z-X, Y-X-Y, Y-Z-Y, Z-X-Z, Z-Y-Z. Euler sequence rotations can
not be accomplished with rotation-of-points. If one attempts to do so, one finds that the first and
final rotation axes are the same, and thus there are really only two independent axes of rotation.
A rotation sequence with two pre-defined axes is not sufficiently general to account for most
rotations in three dimensions.
The second type of rotation sequence is called a Cardan sequence. A Cardan sequence involves
rotation about three different axes. The first one is shared between proximal and distal segment,
since they are presumed to be aligned initially. The second and third rotations are about the
other two orthogonal axes, which are fixed in the distal segment. Because they are fixed in the
distal segment, they move with each rotation. An example of a Cardan sequence is X-Yβ-Zβ, or
simply X-Y-Z, denoting an initial rotation about the X axis, then about the rotated Y-axis in the
distal segment (denoted Yβ), and finally about the twice-rotated Z-axis (Zβ) of the distal segment.
There are six possible Cardan sequences: X-Y-Z, X-Z-Y, Y-X-Z, Y-Z-X, Z-X-Y, Z-Y-X.
With either kind of sequence, the rotation can be represented by multiplying three rotation
matrices.
The matrices that represent rotations of the coordinate system about an axis (rather than
rotations of the points themselves) are as follows:
1
π
π (ππ₯ ) = (0
0
0
πππ ππ₯
βπ ππππ₯
πππ ππ¦
π
π (ππ¦ ) = ( 0
π ππππ¦
πππ ππ§
π
π (ππ§ ) = (βπ ππππ§
0
0
π ππππ₯ )
πππ ππ₯
(29)
0 βπ ππππ¦
1
0 )
0 πππ ππ¦
(30)
π ππππ§
πππ ππ§
0
0
0)
1
(31)
The rotation matrices above operate on points represented as column vectors, and therefore the
rotation matrix is to the left of the column vector, or the matrix of points. When several rotations
are done, the matrix for the first rotation is right-most and the last rotation is left-most. This
allows the first (right-most) matrix to operate first on the point or points. For example,
ππ₯
π
expression of point π0 = ( π¦ ) in a coordinate system that is rotated about X, then Yβ, then Zββ is
ππ§
represented with matrices as follows:
ππππππ = π
π (ππ§ )π
π (ππ¦ )π
π (ππ₯ )π0 = π
π (ππ§ )π
π (ππ¦ )π1 = π
π (ππ§ )π2
(32)
ππππππ = π
π‘ππ‘ππ π0
(33)
where Rtotal is the rotation-of-coordinate-system matrix, and P0 and Pfinal are the same vector,
expressed in the initial (proximal) and final (distal) coordinate systems respectively. Rtotal
depends on the rotation sequence chosen, as shown in the following table.
Cardan Sequences
X then Yβ then Zβ
Y then Xβ then Zβ
X then Zβ then Yβ
Z then Xβ then Yβ
Y then Zβ then Xβ
Z then Yβ then Xβ
Euler Sequences
X then Yβ then Xβ
Y then Xβ then Yβ
X then Zβ then Xβ
Z then Xβ then Zβ
Y then Zβ then Yβ
π
πππ
π
πππ
π
πππ
π
πππ
π
πππ
π
πππ
Rtotal =
= π
π (ππ§ )π
π (ππ¦ )π
π (ππ₯ )
= π
π (ππ§ )π
π (ππ₯ )π
π (ππ¦ )
= π
π (ππ¦ )π
π (ππ§ )π
π (ππ₯ )
= π
π (ππ¦ )π
π (ππ₯ )π
π (ππ§ )
= π
π (ππ₯ )π
π (ππ§ )π
π (ππ¦ )
= π
π (ππ₯ )π
π (ππ¦ )π
π (ππ§ )
π
πππ = π
π (ππ₯2 )π
π (ππ¦ )π
π (ππ₯1 )
π
πππ = π
π (ππ¦2 )π
π (ππ₯ )π
π (ππ¦1 )
π
πππ = π
π (ππ₯2 )π
π (ππ§ )π
π (ππ₯1 )
π
πππ = π
π (ππ§2 )π
π (ππ₯ )π
π (ππ§1 )
π
πππ = π
π (ππ¦2 )π
π (ππ§ )π
π (ππ¦1 )
Z then Yβ then Zβ
π
πππ = π
π (ππ§2 )π
π (ππ¦ )π
π (ππ§1 )
Table 1. Rotation-of-coordinate-system matrices for all Cardan
and Euler sequences.
If P0 and Pfinal are direction vectors, as is the case when we are estimating joint angles from
segment unit vectors, then it does not matter if the two systems share an origin or not, since
direction vectors are independent of origin. If P0 and Pfinal are position vectors, then the origin
matters, and equation 33 will be correct if and only if the proximal and distal systems share an
origin.
We will now complete the explanation of how to use Rtotal and the matrix Q, which we obtain
from motion capture data, to estimate Euler angles. We use the rotation-of-coordinate-system
matrices (equations 29-31) for RX, RY, and RZ to compute the theoretical Rtotal for our preferred
rotation sequence. Then we assign values to the angles that will make the theoretical matrix
Rtotal equal to the experimentally measured matrix Q.
Euler example 1
If we choose to rotate about X, then Yβ, then Zβ, then we see from Table 1 that
π
π‘ππ‘ππ = π
πππ = π
π (ππ§ )π
π (ππ¦ )π
π (ππ₯ )
(34)
which after plugging in from equations 29-31 becomes
π
πππ
πππ ππ
= (βπ ππππ
0
πππ ππ
π
πππ = (βπ ππππ
0
πππ ππ πππ ππ
π
πππ = (βπππ ππ π ππππ
π ππππ
0 πππ ππ
0) ( 0
1 π ππππ
π ππππ
πππ ππ
0
π ππππ
πππ ππ
0
0 πππ ππ
0) ( 0
1 π ππππ
0 βπ ππππ 1
1
0 ) (0
0 πππ ππ
0
π ππππ π ππππ
πππ ππ
βπ ππππ πππ ππ
π ππππ π ππππ πππ ππ + πππ ππ π ππππ
βπ ππππ π ππππ π ππππ + πππ ππ πππ ππ
βπ ππππ πππ ππ
0
πππ ππ
βπ ππππ
0
π ππππ )
πππ ππ
βπππ ππ π ππππ
π ππππ
)
πππ ππ πππ ππ
(35)
(36)
βπππ ππ π ππππ πππ ππ + π ππππ π ππππ
πππ ππ π ππππ π ππππ + π ππππ πππ ππ )(37)
πππ ππ πππ ππ
Choose the angles ο±X,ο±Y,ο±Z to make RXYZ equal the measured Q, from equation 13:
π11
π = π
πππ π‘ππ β1 π
ππππ₯ = (π21
π31
π12
π22
π32
π13
π23 )
π33
(38)
RXYZ equals Q when
ππ = ππ‘ππ2(βπ21 , π11 )
(39)
ππ = ππ‘ππ2(βπ32 , π33 )
(40)
2
2
ππ = ππ‘ππ2(π31 , +βπ11
+ π21
)
(41)
where atan2(y,x) = four quadrant arctangent function. With the above definitions, ο±X and ο±Z will
be in the range [-ο°,+ο°], and ο±Y will be in the range [-ο°/2,+ο°/2].
Euler example 2
If we reverse the order of the first and second rotations, we will rotate about Y, then Xβ, then Zβ.
Using the same approach as before, we now obtain
π
π‘ππ‘ππ = π
πππ = π
π (ππ§ )π
π (ππ₯ )π
π (ππ¦ )
(42)
which after plugging in from equations 29-31 becomes
π
πππ
πππ ππ
= (βπ ππππ
0
π ππππ
πππ ππ
0
πππ ππ
π
πππ = (βπ ππππ
0
0
0 1
0) (0 πππ ππ
1 0 βπ ππππ
π ππππ
πππ ππ
0
0
πππ ππ
π ππππ ) ( 0
πππ ππ
π ππππ
πππ ππ
0
π πππ
)
(
0
π π ππππ
1 πππ ππ π ππππ
πππ ππ πππ ππ +π ππππ π ππππ π ππππ
π
πππ = (βπππ ππ π ππππ + π ππππ π ππππ πππ ππ
πππ ππ π ππππ
0
πππ ππ
βπ ππππ
πππ ππ π ππππ
πππ ππ πππ ππ
βπ ππππ
0 βπ ππππ
1
0 )
0 πππ ππ
βπ ππππ
π ππππ πππ ππ )
πππ ππ πππ ππ
(43)
(44)
βπ ππππ πππ ππ + π ππππ πππ ππ π ππππ
π ππππ π ππππ + π ππππ πππ ππ πππ ππ )(45)
πππ ππ πππ ππ
Choose the angles ο±X,ο±Y,ο±Z to make RYXZ equal the measured Q, from equation 13:
π = π
πππ π‘ππ
β1
π
ππππ₯
π11
π
= ( 21
π31
π12
π22
π32
π13
π23 )
π33
(46, same as 38)
RYXZ equals Q when
ππ = ππ‘ππ2(π12 , π22 )
(47)
ππ = ππ‘ππ2(π31 , π33 )
(48)
2
2
ππ = ππ‘ππ2(βπ32 , +βπ31
+ π33
)
(49)
where atan2(y,x) = four quadrant arctangent function. With the above definitions, ο±Y and ο±Z will
be in the range [-ο°,+ο°], and ο±X will be in the range [-ο°/2,+ο°/2].
Simulating Movement With Euler Angles
The simulation of movement using successive rotations about axes that move with the segment is
not as simple as simulation with helical angles. We cannot use rotation-of-points matrices,
because they rotate about axes that remain fixed in the proximal (not-rotating) segment. If Rpoints
is the rotation-of-points matrix, and Rtotal is the rotation-of-coordinate-system matrix from Table
1, then it follows from equation 32b that
ππππππ = π
π‘ππ‘ππ (π
πππππ‘π π0 ) = π0 ,
(50)
because if we first rotate the point P0 with Rpoints, then rotate the coordinate system by an equal
amount with Rtotal, the final point Pfinal, which is expressed in the rotated coordinate system, will
have to equal the original point P0, which is expressed in the unrotated system. Equation 32b is
true if and only if
π
πππππ‘π = π
π‘ππ‘ππ β1 = π
π‘ππ‘ππ π ,
(51)
where we note that for rotation matrices, the inverse equals the transpose. If the rotation is done
about a point C other than the origin, and C is expressed in the proximal coordinate system, then
the rotated point Protated, expressed in the proximal coordinate system, is given by
ππππ‘ππ‘ππ = π
π‘ππ‘ππ π (π0 β πΆ) + πΆ.
(52)
We can rotate N points in a segment at once by making a 3xN matrix P, whose columns Pj are
the N points. Then
ππππ‘ππ‘ππ = π
π‘ππ‘ππ π (π β (πΆ β¦ πΆ)) + (πΆ β¦ πΆ)
(53)
where P and Protated are now 3xN matrices whose columns are points expressed in the proximal
coordinate system, and (Cβ¦C) is a 3xN matrix formed by N replicates of the column vector for
point C. To simulate rotation by an Euler sequence, specify the desired angles and rotation
sequence. Then evaluate Rtotal using Table 1 and equations 29-31. Then use equation 53 to
compute the coordinates of the rotated points in the proximal coordinate system.
Shoulder Joint
Shoulder joint recommendations of the International Shoulder Group (ISG) were published by
Wu et al., J Biomech 38 (2005) 981β992. The recommendations include description of a
βthoracohumeral jointβ. A more anatomically correct description involves the thoracoclavicular,
claviculoscapular, and scapulohumeral joints. It is difficult to track the 3D motions of clavicle
and scapula with skin markers, due to movement artifacts. For this reason, the thoracohumeral
joint is often used to describe shoulder motion. The markers and axis definitions for the thorax
and humerus are shown below. GH is the glenohumeral joint center, determined by regression or
spherical fitting.
Figure 2 of Wu et al., 2005, below, shows the thorax coordinate system.
Yt: The line connecting the midpoint between PX and T8 and the midpoint between IJ and C7,
pointing upward.
Zt: The line perpendicular to the plane formed by IJ, C7, and the midpoint between PX and T8,
pointing to the right.
Xt: The common line perpendicular to the Zt-and Yt-axis, pointing forwards.
Figure 5 of Wu et al., 2005, below, shows the humerus coordinate system, recommendation 1.
Yh1: The line connecting GH and the midpoint of EL and EM, pointing to GH.
Xh1: The line perpendicular to the plane formed byEL, EM, and GH, pointing forward.
Zh1: The common line perpendicular to theYh1- and Zh1-axis, pointing to the right.
Wu et al., 2005, also give a second humerus coordinate recommendation, in which the long axis
of the flexed forearm is used to define the Xh axis, rather than using the EL and EM markers.
The disadvantage of recommendation 1 is that it uses EL and EM to define Zh. Since EL and
EM are close together, small marker placement variation or skin movement can make large angle
differences. The disadvantage of the recommendation 2 is that it requires tracking the forearm,
and it doesnβt work if the elbow is extended.
Figure 7 of Wu et al., 2005, below, shows the ISG recommendation for decomposing
thoracohumeral motion into three rotations: Yh-Xh-Yh.
The first rotation is about Yh. This is referred to in Figure 7 as βPlane of elevationβ because this
rotates the plane in which the humerus will be elevated in the middle rotation. The middle
rotation is about Xh, and is elevation. Note that Xh points anteriorly in the neutral or initial
position. Therefore, if the first rotation is zero, the rotation about Xh is abduction/adduction. (It
is called negative elevation because elevating the right humerus is a negative rotation about Xh.)
The final rotation is about Yh again: a final axial (internal/external) rotation. Wu et al., 2005,
chose the Yh-Xh-Yh sequence because it is well known that if one allows both flex/ext (i.e
rotation about Zh) and abd/add (rotation about Xh), the angles obtained are different depending
on the sequence chosen. The solution of Wu et al. is to do only one βelevationβ, and so avoid the
issue of how much is abd/add and how much is flex/ext. A sagittal plane motion of the humerus,
which is traditionally and clinically regarded as flexion/extension, is described by the ISG
recommendation as 90° internal rotation, then elevation, then 90° external rotation.
The rotation matrix representation of the ISG recommended sequence is
π
πΌππΊ = π
π (π2 )π
π (π)π
π (π1 )
(54)
where ο±1 is the initial rotation about the humerus long axis (βrotation of the plane of elevationβ),
ο¦ is the elevation, and ο±2 is the final rotation about the humerus long axis (internal/external
rotation). Note that this is an Euler sequence, since the first and final rotation axes are the same,
in the distal segment.
An alternative to the ISG recommendation is to do a Cardan sequence. We will now introduce an
alternative set of axis definitions used by some investigators including James Richards. In this
set of axis definitions, +X points to the subjectβs right, +Y points forward, and +Z points upward.
Using the Richards et al. axes, positive rotation about X is shoulder flexion, positive about Y is
right humerus ADduction, and positive about Z is right humerus internal rotation.
If the final rotation is IR/ER, and if we use the axis definitions of Richards et al., then there are
two Cardan sequences to choose from Xh-Yh-Zh or Yh-Xh-Zh. The Xh-Yh-Zh sequence
correspond to flex/ext, then add/abd, then IR/ER (positive/negative in each case, for the right
shoulder). Its matrix representation is
π
πππ = π
π (ππ )π
π (ππ )π
π (ππ )
(55)
The Yh-Xh-Zh sequence correspond to add/abd, then flex/ext, then IR/ER. Its matrix
representation is
π
πππ = π
π (ππ )π
π (ππ )π
π (ππ )
(56)
where ο±ο±X=flexion/extension, ο±ο±Y=adduction/abduction, and ο±ο±Z=internal/external rotation. We
showed above (equations 37-41) that RXYZ equals Q when
ππ = ππ‘ππ2(βπ21 , π11 )
(39, again)
ππ = ππ‘ππ2(βπ32 , π33 )
(40, again)
2
2
ππ = ππ‘ππ2(π31 , +βπ11
+ π21
)
(41, again)
where atan2(y,x) = four quadrant arctangent function.
Hip Joint
We can use a similar approach at the hip as at the shoulder. With the pelvis and femur in the
neutral position, Xpelvis and Xfemur point to the subjectβs right, Ypelvis and Yfemur point forward, and
Zpelvis and Zfemur point upward. We can decompose hip motion with a sequence of
flexion/extension followed by adduction/abduction followed by internal/external rotation. This
means we rotate coordinates about Xpelvis=Xfemur, then about rotated Yfemur, then about twicerotated Zfemur. The rotation matrix representation of this sequence is
π
πππ = π
π (ππ )π
π (ππ )π
π (ππ )
(55, again)
where ο±ο±X=flexion/extension, ο±ο±Y=adduction/abduction, and ο±ο±Z=internal/external rotation, for
the right hip joint. For the left hip joint, ο±ο±X=flexion/extension, ο±ο±Y=ABduction/ADduction,
and ο±ο±Z=EXternal/INternal rotation. Unit vectors for pelvis and thigh segments are identified
from markers. The unit vectors, expressed as column vectors in the GRS, form the matrices
π
ππππ₯ = π
ππππ£ππ = (πππππππ
πππππππ
πππππππ )
(57)
π
πππ π‘ππ = π
ππππ’π = (ππππππ
ππππππ
ππππππ ).
(58)
Q is defined as in equation 38:
π = π
ππππ’π
β1
π
ππππ£ππ
π11
π
= ( 21
π31
π12
π22
π32
π13
π23 )
π33
(38, again)
and angles ο±X, ο±Y, ο±Z (flex/ext, ad/ab, IR/ER respectively) are determined using equations 39-41.
Grood and Suntay and Knee Joint
Grood & Suntay (1983), J Biomech Engin 105: 136-144, proposed a βjoint coordinate systemβ
for the knee joint which has been widely cited. They proposed a standard rotation sequence and
gave formulas for the rotation matrix in terms of βclinical anglesβ. They also gave equations for
changing from tibial to femoral coordinate system when there is translation as well as rotation at
the knee joint. They think about knee joint angles as arising from rotation about an axis fixed in
the proximal segment, followed by rotation about a floating axis, followed by rotation about an
axis fixed in the distal segment. The floating axis is perpendicular to the two body-fixed axes.
They say that their approach gives a sequence-independent description of knee joint.
I do not think their proposed scheme was as new as they thought it was. I also think it is not
sequence-independent, and their proposal does not βeliminate much of the confusion relative to
nomenclatureβ, as they think. They use a specific sequence of rotations. Their equations for
rotation matrix elements in their Appendix would be different if they had used a different
sequence, which indicates that their claim of sequence-independence is not true. Their
coordinate axes for thigh and shank are +X=right, +Y=anterior, and +Z=superior. They propose
to rotate about X, then Y, then Z. This means flexion/extension, then AB/ADduction, then
internal/external rotation. What they call the βfloating axisβ is really just the once-rotated Y
axis, the axis of AB/ADduction. They call it βfloatingβ because it is not aligned with any of the
principle axes at the start or at the end. But that is standard for the axis of the middle rotation of
a Cardan sequence. It is also worth noting that the βclinical anglesβ ο’ and ο§ of Grood & Suntay
1983 are not defined positively by the RH rule in the right knee, as is usually the case.
Matlab files
rot_coordsXYZ.m
rot_coordsXYZmtx.m
rot_helixmtx.m
rot_pointsXYZ.m
shouldersim1.m
shouldersim2.m
shouldersimdata1.txt
shouldersimdata2.txt
euleranglesXYZ.m
euleranglesYXZ.m
helicalangles.m
shoulder_angle_estimation.m
return points in rotated coordinate system
return rotation-of-coordinate-system matrix
return rotation-of-points matrix for any helical rotation
return rotated points (rotations not in moving segment axes)
simulation code using rot_pointsXYZ.m
simulation code using rot_coordsXYZmtx.m
simulated data made with shouldersim1.m
simulated data made with shouldersim2.m
compute Euler angles for X-Yβ-Zβ, from Rprox, Rdist
compute Euler angles for Y-Xβ-Zβ, from Rprox, Rdist
compute helical angles from Rprox, Rdist
estimate Euler and helical angles from shoulder marker data