Rotation Matrices 2 - University of DelawareRotation Matrices 2 . WCR 2017-04-21 . Outline Markers...
Transcript of Rotation Matrices 2 - University of DelawareRotation Matrices 2 . WCR 2017-04-21 . Outline Markers...
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 rotation-of-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 ππ12 ππ13ππ21 ππ22 ππ23ππ31 ππ32 ππ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 β ππππππππ) + π’π’πππππππ π ππ ππππππππ β π’π’πΊπΊ2(1 β ππππππππ)
οΏ½ (14)
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) ππ02 β ππ12 + ππ22 β ππ32 2(ππ2ππ3 + ππ0ππ1)2(ππ1ππ3 + ππ0ππ2) 2(ππ2ππ3 β ππ0ππ1) ππ02 β ππ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β12
(18)
ππππππππππππππ = ππππππππ οΏ½ππ11+ππ22+ππ33β12
οΏ½ (19)
It can be shown by algebra (http://www.kwon3d.com/theory/jkinem/helical.html, retrieved 2013-03-24) that each column of the following matrix is a scaled version of the rotation axis, n.
ππ = ({π π 1} {π π 2} {π π 3}) = 12οΏ½π π βππππππππππππ + π π βπππππππππππππποΏ½ + πΌπΌ(1 β ππππππππ) (20)
where I is the identity matrix. Combining equations 17, 18, and 20, we get
ππ = ({π π 1} {π π 2} {π π 3}) = 12οΏ½π π ππ2ππ + π π ππ2πππποΏ½ + πΌπΌ οΏ½1 β ππ11+ππ22+ππ33β1
2οΏ½ (21)
ππ = ({π π 1} {π π 2} {π π 3}) = 12οΏ½π π ππ2ππ + π π ππ2ππππ + πΌπΌοΏ½1 β (ππ11 + ππ22 + ππ33)οΏ½οΏ½ (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)
and
ππβ = π π πππππποΏ½RβπππππππποΏ½π π ,βπππππππππππππποΏ½ β Rππ2πποΏ½ (23b)
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)
Internal/external rotation: ππππ = ππnz (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 00 ππππππππππ πππππ π ππππ0 βπππππ π ππππ ππππππππππ
οΏ½ (29)
π π πποΏ½πππΊπΊοΏ½ = οΏ½πππππππππΊπΊ 0 βπππππ π πππΊπΊ
0 1 0πππππ π πππΊπΊ 0 πππππππππΊπΊ
οΏ½ (30)
π π ππ(πππΊπΊ) = οΏ½πππππππππΊπΊ πππππ π πππΊπΊ 0βπππππ π πππΊπΊ πππππππππΊπΊ 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 Rtotal = 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β π π ππππππ = π π ππ(ππππ2)π π πποΏ½πππΊπΊοΏ½π π ππ(ππππ1) Y then Xβ then Yβ π π ππππππ = π π πποΏ½πππΊπΊ2οΏ½π π ππ(ππππ)π π πποΏ½πππΊπΊ1οΏ½ X then Zβ then Xβ π π ππππππ = π π ππ(ππππ2)π π ππ(πππΊπΊ)π π ππ(ππππ1) Z then Xβ then Zβ π π ππππππ = π π ππ(πππΊπΊ2)π π ππ(ππππ)π π ππ(πππΊπΊ1) Y then Zβ then Yβ π π ππππππ = π π πποΏ½πππΊπΊ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 1οΏ½οΏ½
ππππππππππ 0 βπππππ π ππππ0 1 0
πππππ π ππππ 0 πππππππππποΏ½οΏ½
1 0 00 ππππππππππ πππππ π ππππ0 βπππππ π ππππ ππππππππππ
οΏ½ (35)
π π ππππππ = οΏ½ππππππππππ πππππ π ππππ 0βπππππ π ππππ ππππππππππ 0
0 0 1οΏ½οΏ½
ππππππππππ πππππ π πππππππππ π ππππ βπππππππππππππππ π ππππ0 ππππππππππ πππππ π ππππ
πππππ π ππππ βπππππ π ππππππππππππππ πππππππππππππππππππποΏ½ (36)
π π ππππππ = οΏ½ππππππππππππππππππππ πππππ π πππππππππ π ππππππππππππππ + πππππππππππππππ π ππππ βπππππππππππππππ π ππππππππππππππ + πππππ π πππππππππ π ππππβπππππππππππππππ π ππππ βπππππ π πππππππππ π πππππππππ π ππππ + ππππππππππππππππππππ πππππππππππππππ π πππππππππ π ππππ + πππππ π ππππππππππππππ
πππππ π ππππ βπππππ π ππππππππππππππ πππππππππππππππππππποΏ½(37)
Choose the angles ΞΈX,ΞΈY,ΞΈZ to make RXYZ equal the measured Q, from equation 13:
ππ = π π ππππππππππππβ1π π ππππππππ = οΏ½ππ11 ππ12 ππ13ππ21 ππ22 ππ23ππ31 ππ32 ππ33
οΏ½ (38)
RXYZ equals Q when
ππππ = πππππππ π 2(βππ21, ππ11) (39)
ππππ = πππππππ π 2(βππ32, ππ33) (40)
ππππ = πππππππ π 2(ππ31, +οΏ½ππ112 + ππ212 ) (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 1οΏ½οΏ½
1 0 00 ππππππππππ πππππ π ππππ0 βπππππ π ππππ ππππππππππ
οΏ½οΏ½ππππππππππ 0 βπππππ π ππππ
0 1 0πππππ π ππππ 0 ππππππππππ
οΏ½ (43)
π π ππππππ = οΏ½ππππππππππ πππππ π ππππ 0βπππππ π ππππ ππππππππππ 0
0 0 1οΏ½οΏ½
ππππππππππ 0 βπππππ π πππππππππ π πππππππππ π ππππ ππππππππππ πππππ π πππππππππππππππππππππππππππππ π ππππ βπππππ π ππππ ππππππππππππππππππππ
οΏ½ (44)
π π ππππππ = οΏ½ππππππππππππππππππππ+πππππ π πππππππππ π πππππππππ π ππππ πππππππππππππππ π ππππ βπππππ π ππππππππππππππ + πππππ π πππππππππππππππππππ π ππππβπππππππππππππππ π ππππ + πππππ π πππππππππ π ππππππππππππππ ππππππππππππππππππππ πππππ π πππππππππ π ππππ + πππππ π ππππππππππππππππππππππππ
πππππππππππππππ π ππππ βπππππ π ππππ πππππππππππππππππππποΏ½(45)
Choose the angles ΞΈX,ΞΈY,ΞΈZ to make RYXZ equal the measured Q, from equation 13:
ππ = π π ππππππππππππβ1π π ππππππππ = οΏ½ππ11 ππ12 ππ13ππ21 ππ22 ππ23ππ31 ππ32 ππ33
οΏ½ (46, same as 38)
RYXZ equals Q when
ππππ = πππππππ π 2(ππ12, ππ22) (47)
ππππ = πππππππ π 2(ππ31, ππ33) (48)
ππππ = πππππππ π 2(βππ32, +οΏ½ππ312 + ππ332 ) (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(ππ31, +οΏ½ππ112 + ππ212 ) (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 twice-rotated 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 ππ12 ππ13ππ21 ππ22 ππ23ππ31 ππ32 ππ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 return points in rotated coordinate system rot_coordsXYZmtx.m return rotation-of-coordinate-system matrix rot_helixmtx.m return rotation-of-points matrix for any helical rotation rot_pointsXYZ.m return rotated points (rotations not in moving segment axes) shouldersim1.m simulation code using rot_pointsXYZ.m shouldersim2.m simulation code using rot_coordsXYZmtx.m shouldersimdata1.txt simulated data made with shouldersim1.m shouldersimdata2.txt simulated data made with shouldersim2.m euleranglesXYZ.m compute Euler angles for X-Yβ-Zβ, from Rprox, Rdist euleranglesYXZ.m compute Euler angles for Y-Xβ-Zβ, from Rprox, Rdist helicalangles.m compute helical angles from Rprox, Rdist shoulder_angle_estimation.m estimate Euler and helical angles from shoulder marker data