The Haenpflug Matrix Tenor Notation D.N.J. El Dept of Mech Mechatron Eng Univ of Stellenboch, South Africa e-mail: dnjel@un.ac.za 2009/09/01 Abtract Thi i a ample document to illutrate the typeetting of vector, matrice tenor according to the matrix tenor notation of Haenpflug (1993, 1995). The firt ection decribe the bare baic of the notation pleae note that there i much more to the notation than the little bit decribed here. Keyword: vector, matrix, tenor, notation. N.B.: Thi document i neither a guide nor a reference document for the Haenpflug notation. For any reference to the material in ection 1, pleae cite the original copyrighted article (Haenpflug 1993, 1995). Content 1 Haenpflug matrix tenor notation................. 2 1.1 Baic vector notation..................... 2 1.2 Vector tranformation.................... 3 1.3 Vector rotation...................... 4 2 General rotation........................ 5 2.1 The general rotation matrix (odriguez formula).......... 5 2.2 Multiple rotation...................... 7 2.3 Infiniteimal rotation.................... 7 3 otation kinematic....................... 8 3.1 Angular velocity...................... 8 3.2 otation kinematic..................... 9 4 Attitude determination..................... 10 4.1 General......................... 10 4.2 Euler ymmetric parameter.................. 10 eference.......................... 12 1
1 Haenpflug matrix tenor notation 1.1 Baic vector notation All vector are in the 3-dimenional Euclidean pace 3 tenor in 3 3. Any other vector pace will be explicitly tated. The ret of thi ection lit the baic definition of the notation of Haenpflug (1993, 1995) Phyical vector: x e 1 x 1 e 2 x 2 e 3 x 3 (1.1) The phyical vector i the general repreentation of a vector in any coordinate ytem. The unit vector e i, i 1, 2, 3, define the direction of the axe in a right-hed orthogonal Carteian ytem. The component, e i x i, are the component of the vector the calar quantitie, x i, the element of the vector. Column vector: x a1 x a x a2 (1.2) x a3 The column matrix of the element of a vector i called a column vector i the algebraic repreentation of a vector. The bar above the ymbol of the vector indicate a column vector the upercript (a) the index of the pecific coordinate ytem in which the element of the vector are expreed. ow vector: x a x a T xa1 x a2 x a3 (1.3) The row matrix of the element of a vector i called a row vector. The bar below the ymbol of the vector indicate a row vector the ubcript (a) the index of the pecific coordinate ytem in which the element of the vector are expreed. It i important to note that in general i x a T x T a for kew curved coordinate (ee Haenpflug 1995). The format in equation (1.3) without the tranpoe ign i only valid in Carteian coordinate. Norm: x x, (1.4a) x x x x x 2 1 x2 2 x2 3 (1.4b) The norm of a vector i the algebraic ize or length of the vector. The econd equation, (1.4b), in element form, i only valid in Carteian coordinate or Euclidean pace. Scalar, dot or inner product: x u x u x u co ϕ, (1.5a) x u x u x 1 u 1 x 2 u 2 x 3 u 3 (1.5b) The calar product of two vector reult in a calar. The angle ϕ i the angle in pace between x u. x 1 u 1 x 1 u 2 x 1 u 3 Dyad or outer product: x u x u x 2 u 1 x 2 u 2 x 2 u 3 (1.6) x 3 u 1 x 3 u 2 x 3 u 3 The dyad or outer product of two vector reult in a quare matrix. There exit a well defined algebra for dyad. It i ometime convenient to hle econd-rank Carteian tenor uch a inertia tenor a a linear polynomial of dyad, called a dyadic. Vector or cro product: x u ( x 2 u 3 x 3 u 2 ) e1 ( x 3 u 1 x 1 u 3 ) e2 ( x 1 u 2 x 2 u 1 ) e3 (1.7a) x u x u in ϕ (1.7b) 2
The cro product of the two vector x u reult in a vector perpendicular to both x u. Thi operation i only defined in 3-dimenional Carteian pace. The angle ϕ i the angle in pace between x u. The cro product can alo be defined in term of a matrix-vector operation x u x u 0 x 3 x 2 Cro product tenor: x x 3 0 x 1 (1.8) x 2 x 1 0 Variou identitie for the cro product tenor can be verified. Thee identitie will be extenively ued throughout thi article. x T x x u ũ x x u x ũ ũ x x 2 x x x 2 I x u x ũ x 3 x2 x 2n 2 2n 1 x 1 n 1 x x 1 n 1 x (1.9) with I the 3 3 identity matrix. 1 0 0 Identity matrix: I 0 1 0 (1.10) 0 0 1 1.2 Vector tranformation In thi ection only a baic overview of vector rotation tranformation i given to etablih the baic nomenclature definition. For a more in-depth dicuion refer to Haenpflug (1993). Conider two Carteian axi ytem denoted by r a hown in figure 1(a). From the general definition of a vector, equation (1.1), it follow x 1 e1 x e2 e3 x 2 E x (1.11) x 3 2 2 r 2 r 2 x 2 x r 1 x r 1 er2 e2 x r1 er2 e2 x r1 x r1 er1 x e1 x 1 1 e1 x 1 x 1 1 (a) Tranformation (b) otation Figure 1: Vector tranformation 3
The quantity, E e 1 e2 e3, i the bae of the axi ytem denoted by. It conit of the three orthogonal vector parallel to the axe. From the outer product, equation (1.6), follow for the invere of bae E : E T E E E I E T E 1 E (1.12) We can repeat the procedure of equation (1.11) for the vector x in term of bae E r. The relationhip of the element of vector x in term of bae E bae E r i then x E r x r x E E E x r E r xr x r r E E E r (1.13) x The matrix quantitie E r Er are then the tranformation matrice of the component of a vector between the two bae E E r. The column of the tranformation matrix E r are the element of the unit vector e i expreed in bae E the row are the unit vector e j expreed in bae E r. E r e r1 e r2 e r3 e 1 e 2 r r e 3 r (1.14) The propertie of the tranformation matrix are well known, for example E T r E 1 r r E (1.15) 1.3 Vector rotation Conider the cae of a vector in pace with initial poition x. The vector i rotated to a new poition in pace, x. Define the rotation tenor operation then a x x (1.16) If the operation i applied to the rotation of all the direction vector of a bae E to a new rotated bae E r, then E r E (1.17) or E r E E (1.18) With reference to figure 1(b), conider the cae of a vector fixed in a rotating bae E r with initial poition x final poition after a rotation of x. If the initial orientation of E r correpond with that of E then the numerical value of the component of x x r are equal or x x r. From the tranformation of x it then follow that r x x E r x (1.19) If the rotation matrix i tranformed between bae, then with the aid of equation (1.18) follow r r Er E r E r E r E r E r (1.20) 4
The rotation matrix i therefore identical in term of both bae we can denote it without the bae indice if there i no ambiguity. The rotation matrix between bae E E r in term of the tranformation matrix i given by E r (1.21) 1 T E r (1.22) 2 General rotation 2.1 The general rotation matrix (odriguez formula) Euler theorem tate that the mot general diplacement of a rigid body with one point fixed i equivalent to a ingle rotation about ome axi through that point. With reference to figure 2, conider a vector with initial poition x. The vector i rotated about an axi defined by the unit vector a, through an angle ϑ. The vector after rotation i denoted by x. From the geometry in figure 2(a) it can be hown (e.g., Shabana 1998, 2.1) for the vector component in term of the tationary bae E that x x in ϑ a x 1 co ϑ ( a a x ) (2.1) ewrite equation (2.1) in term of the cro product tenor defined in equation (1.8) x I in ϑ ã 1 co ϑ ã ã x (2.2) with I i the 3 3 unit matrix. By comparing equation (2.2) (1.20), the general format of the rotation matrix for a rotation through an angle ϑ about an axi a fixed in bae E i given by I in ϑ ã 1 co ϑ ã ã (2.3) T I in ϑ ã 1 co ϑ ã ã (2.4) (a) Single rotation (b) Multiple rotation Figure 2: General vector rotation 5
Equation (2.3) i alo known a the odriguez formula. Note that four calar parameter (ϑ the three component of a ) the contraint a 1 decribe three degree of rotational freedom. If x i fixed to a rotating bae E r, with x x r (ee figure 1(b)), then E r tranformation matrix from bae E r to bae E i the E r Er T (2.5) Note for the tranformation of the cro product tenor aociated with the rotation axi, i ã ãr r ã, becaue the component are identical in both the bae. Equation (2.3) can alo be written in exponential format by exping in ϑ co ϑ a Taylor erie in ϑ ϑ ϑ3 ϑ5 3! 5! co ϑ 1 ϑ2 ϑ4 2! 4! With the aid of equation (1.9) follow the elegant olution by Argyri (1982) which i the exponential matrix ( ) ( I ϑ ϑ3 ϑ5 ϑ 2 3! 5! ã 2! ϑ4 4! ) 2 ã (2.6) I ϑ ã ϑ2 2 ϑ 3 3 ϑ n n ã ã ã (2.7) 2! 3! n! e ϑã T e ϑã (2.8) For numerical purpoe equation (2.3) can be written a a ingle matrix. Let c co ϑ in ϑ, then the rotation or tranformation matrix i given by a 2 E r 1 1 cc a 1a 2 1 c a 3 a 1 a 3 1 ca 2 a 1 a 2 1 ca 3 a 2 2 1 cc a 2a 3 1 c a 1 (2.9) a 1 a 3 1 c a 2 a 2 a 3 1 ca 1 a 2 3 1 cc It i frequently neceary to find the rotation axi a rotation angle ϑ for a known tranformation matrix, E r E ij. From equation (2.9) variou relationhip can be deducted. Two of the more important one are 2 co ϑ E 11 E 22 E 33 1 (2.10) E 32 E 23 2 in ϑ a E 13 E 31 (2.11) E 21 E 12 When ϑ π equation (2.11) can not be ued to find a. Another more general approach, i to conider the characteritic polynomial of E r. det E r λi λ2 2λ co ϑ 11 λ 0 (2.12) It lead to the eigenvalue λ e iϑ, e iϑ, 1. It can therefore be tated that λ 1 i alway an eigenvalue of E r that an eigenvector or axi a a a r exit that i unchanged by the rotation. The rotation axi can be obtained with a numerical method by olving the eigenvector problem E r a a. 6
2.2 Multiple rotation For the cae of multiple rotation of a vector a hown in figure 2(b), let x 1 x with 1 ϑ 1, a 1 (2.13) x 2 x with 2 ϑ 2, a 2 (2.14) then with x 2 x 2 1 x x (2.15) 2 1 (2.16) If x i fixed to a rotating bae E r, with x bae E r to bae E x r, then E r i the tranformation matrix from E r 2 1 (2.17) E r T T T 2 1 1 2 (2.18) Note that in general i 2 1 2 1. If we write equation (2.18) in term of the exponential repreentation of equation (2.8) then ( ) e ϑ 1ã1 e ϑ 2ã2 ϑ e 1 ã 1 ϑ 2 ã 2 (2.19) Thi mean that the rotation are not vector that can be added. The only exception i when the rotation axe are parallel, a 1 a 2. 2.3 Infiniteimal rotation In cae of an infiniteimal rotation ϑ, econd higher order term in the erie expanion in equation (2.7) can be neglected, reulting in I ϑ ã T I ϑ ã (2.20) In the previou ection it wa proven that finite rotation are not vector quantitie that can be added. Infiniteimal rotation are vector quantitie that can be added to give a total rotation. Conider two infiniteimal rotation ϑ 1 ϑ 2 about axe a 1 a 2 For a multiple rotation 1 I ϑ 1 ã 1 2 I ϑ 2 ã 2 (2.21) 1 2 I ϑ 1 ã 1 I ϑ 2 ã 2 I ϑ 1 ã 1 ϑ 2 ã 2 ϑ 1 ϑ 2 ã 1 ã 2 (2.22) I ϑ 1 ã 1 ϑ 2 ã 2 where econd higher order term were again ignored. Thi reult in 1 2 2 1 (2.23) 7
proving that two ucceive infiniteimal rotation about different axe can be added that an infiniteimal rotation i a vector. For n ucceive rotation it can be hown that 1 2 n n i I ϑ 1 ã 1 ϑ 2 ã 2 ϑ n ã n i1 I n ϑ i ã i i1 n n 1 1 (2.24) 3 otation kinematic 3.1 Angular velocity Conider three ucceive infiniteimal rotation ϑ 1, ϑ 2 ϑ 3 about the unit vector in the axi direction e 1 1 0 0 T, e 2 0 1 0 T e 3 0 0 1 T. The total infiniteimal rotation i then from equation (2.24) with ϑ ϑ 1 ẽ 1 1 2 3 I ϑ (3.1) ϑ 2 ẽ 2 ϑ 3 ẽ 3 0 ϑ 3 ϑ 2 ϑ 3 0 ϑ 1 (3.2) ϑ 2 ϑ 1 0 The total infiniteimal rotation of a vector x with fixed length about three perpendicular axe i then x x I ϑ x x ϑ x (3.3) The change vector i x x x ϑ x (3.4) Divide equation (3.4) by the time increment t during which the rotation take place. For the limit a t approache zero follow x dx lim t 0 t dt ẋ (3.5) ϑ lim t 0 t x ω x ω x (3.6) o that the time derivative of a rotating vector of fixed length become ẋ ω x ω x (3.7) The vector ω i defined a the angular velocity with component ω i lim t 0 ϑ i t i 1, 2, 3 (3.8) the intantaneou rotation rate about the three coordinate axe. It mut emphaized that the angular velocity i a defined vector not the derivative of any quantity. Thi implie that the angular velocity cannot be integrated to the obtain the attitude or orientation of a vector or bae or any other quantity. 8
A an application of equation (3.7), the time derivative of a tranformation matrix in equation (1.14) from a tatic bae E to a rotating bae E r can be obtained E r e r1 e r2 e r3 ω e r1 ω e r2 ω e r3 ω E r (3.9) or for the angular velocity in term of the rotating bae E r E r E r ωr r Er E r E r ωr r (3.10) 3.2 otation kinematic Define the vector x ẋ dx /dt a the poition velocity of a particle or point with component in term of a tatic bae E, while x r ẋ r are the poition apparent velocity in term of a rotating bae E r. x E r xr (3.11) ẋ E r ẋ r E r Ė r xr E r ẋ r ω r r xr (3.12) The cro product tenor of the angular velocity ω i from equation (3.9) (3.9) ω r r Er Ė r ω E r ωr r Er Ėr Er (3.13) We proceed next to obtain ω a a function of a ϑ. The following identitie can then be verified from the fact that a i a unit vector, a a 1, implying that a ȧ 0: ã ã ã a ȧ ã 0 ã ã ã ã a ȧ ã ã 0 (3.14) The angular velocity tenor in equation (3.13), after the differentiation of the tranformation matrix equation (2.3) algebraic manipulation with the aid of equation (3.14) (1.9) i ω r r ϑ ã in ϑ ã 2 in 2 ϑ 2 ã ã ã ã ϑ ã in ϑ ã 2 in 2 ϑ 2 ã ȧ (3.15) From equation (3.15), the vector equation for ω r ω (where the latter can be derived with the ame argument), follow then a ω r ϑ a in ϑ ȧ 2 in 2 ϑ 2 ã ȧ ω ϑ a in ϑ ȧ 2 in 2 ϑ 2 ã ȧ (3.16) The inner or calar product of equation (3.16) give the norm of the angular velocity ω 2 ω r ω r ω ω ϑ 2 4 in ϑ 2ȧ2 (3.17) From equation (3.16) the time derivative of the rotation angle ϑ i ϑ a ω r a ω (3.18) 9
Multiply equation (3.18) with a. With the aid of the triple cro-product identitie, it then follow ϑ a a ω r a ω r ã ã ω r a ω a ω ã ã ω (3.19) Inpection of equation (3.16) to (3.18) reveal that a ω ϑ ω. The angular velocity vector ω i therefore in general not in the direction of the intantaneou rotation axi a. The vector ȧ can be obtained from equation (3.16) by the ubtitution of equation (3.19) auming a olution of the form I α ã β ã ã. With the aid of the identitie in equation (3.14) (1.9), it lead to ȧ 1 2 ã cot ϑ2 ã ã ω r K r ω r (3.20) ã cot ϑ2 ã ã ω K ω 1 2 Note the notation in equation (3.20) for K r. It i a tenor in a mixed bae (ee Haenpflug 1993), becaue a r a. For the tranformation between bae it can alo be confirmed that K r K E r (3.21) The general kinematic equation for a rotating bae are given by equation (3.18) equation (3.20). The four calar equation decribe only three degree of freedom are contrained by a 1. Thee equation can be integrated to obtain E r a a function of time, but equation (3.20) i ingular for value of ϑ 0, ±2π,, which render a general numeric olution impractical. 4 Attitude determination 4.1 General The claic problem in rotation kinematic i that the angular velocity cannot be integrated to obtain the orientation of a rotating bae, becaue the integral i dependent on the path of integration. The mot baic method to find the orientation of E r a a function of time i to integrate equation (3.13) directly, E r ω E r ω e r1 ω e r2 ω e r3 E r ωr r Er ω r e r 1 ω r e r 2 ω r e r (4.1) 3 Only two of the vector need to be integrated. The third vector can be obtained from the cro product e 1 e 2 e 3. Thi method involve ix parameter while there are only three degree of freedom. With a lot of effort by careful election of element from the orthogonality contraint requirement E r Er I, it can be refined to three parameter. It i alo adviable that the contraint equation be enforced through frequent normalization, to compenate for the fact that the contraint are not taken into account during integration. 4.2 Euler ymmetric parameter Throughout hitory many parameterization method were devied to obtain the relationhip between the orientation of a rotating bae it angular velocity. 10
The Euler ymmetric parameter method 1 i one of the claic method. It ha gained popularity in the aeropace engineering environment for foolproof attitude determination algorithm, becaue it contain no numerical ingularitie. It ha the diadvantage that it i a four-parameter method decribing three degree of freedom, therefore an additional differential equation, together with it contraint, mut be olved. After inpection of equation (2.3), define the four Euler parameter q 0 co ϑ 2 q 1 q in ϑ 2 a q 2 (4.2) q 3 The tranformation matrix equation (2.3), in term of the Euler parameter, i then E r q 0, q I 2q 0 q 2 q q (4.3) E r q 0, q E r q 0, q (4.4) or in element form 2q 2 E r q 0 2q2 1 1 2q 1q 2 q 3 q 0 2q 1 q 3 q 2 q 0 0, q 2q 1 q 2 q 3 q 0 2q 2 0 2q2 2 1 2q 2q 3 q 1 q 0 (4.5) 2q 1 q 3 q 2 q 0 2q 2 q 3 q 1 q 0 2q 2 0 2q2 3 1 The four Euler parameter are not independent, but are contrained by the condition for the tranformation matrix, E r Er I, which implie that q 2 0 q2 1 q2 2 q2 3 q2 0 q q 1 (4.6) which i indeed atified by equation (4.2). From equation (4.3) it i clear that changing the ign of all the Euler parameter imultaneouly doe not affect the tranformation matrix E r q 0, q E r q 0, q (4.7) The initial value of q 0 q can be obtained for a known tranformation matrix E r Eij from equation (4.5). The following equation are the relationhip that can be deducted 4q 2 0 1 E 11 E 22 e 33 4q 2 1 1 E 11 E 22 e 33 4q 2 2 1 E 11 E 22 E 33 (4.8) 4q 1 q 0 E 32 E 23 4q 2 q 0 E 13 E 31 4q 3 q 0 E 21 E 12 4q 2 3 1 E 11 E 22 E 33 4q 1 q 2 E 12 E 21 4q 1 q 3 E 13 E 31 4q 2 q 3 E 23 E 32 (4.9) The abolute value of Euler parameter are obtained from equation (4.8). 2 q 0 1 E 11 E 22 E 33 2 q 1 1 E 11 E 22 E 33 2 q 2 1 E 11 E 22 E 33 (4.10) 2 q 3 1 E 11 E 22 E 33 1 It i alo called the rotation quaternion becaue it can be repreented a a unit quaternion, obeying all the rule of quaternion algebra. 11
The unity contraint equation (4.6), implie that at leat one of the Euler parameter i not zero. Furthermore, a imultaneou ign change of all the Euler parameter ha no effect on the tranformation matrix, ee equation (4.7). To avoid ingularitie for the bet numerical accuracy, elect the abolute value of the larget parameter from equation (4.10) a initial value then calculate the Euler parameter accordingly from equation (4.8) (4.9). q 0 q 1 q 2 q 3 2 q 0 2 E 32 E 23 2 2 q 0 E 13 E 31 2 2 q 0 E 21 E 12 2 2 q 0 or E 32 E 23 2 2 q 1 2 q 1 2 E 12 E 21 2 2 q 1 E 13 E 31 2 2 q 1 or E 13 E 31 2 2 q 2 E 12 E 21 2 2 q 2 2 q 2 2 E 23 E 32 2 2 q 2 or E 21 E 12 2 2 q 3 E 13 E 31 2 2 q 3 E 23 E 32 2 2 q 3 2 q 3 2 (4.11) The time derivative of the Euler parameter equation (4.2), with the aid of equation (3.18) (3.20), are for ω in term of bae E r q 0 1 2 in ϑ 2 ϑ q 1 2 co ϑ 2 ϑ a in ϑ 2 ȧ 1 2 in ϑ 2 a ωr 1 2 co ϑ 2 ωr 1 2 in ϑ 2 ã ωr (4.12) 1 2 q ωr 1 2 q 0 ω r 1 2 q ωr The ame procedure can be repeated for ω in term of bae E. Equation (4.12) can be rewritten in the more familiar matrix format q0 1 0 ωr q0 q 2 ω r ω r 1 0 ω q0 q 2 r ω ω (4.13) q The contraint equation, equation (4.6) in differential form i q0 q 0 q 0 q 1 q 1 q 2 q 2 q 3 q 3 q 0 q 0 (4.14) q If equation (4.13) i ubtituted into equation (4.14), it confirm, a expected, that equation (4.13) till atifie the contraint condition. eference Argyri, J. (1982). An excurion into large rotation. Computer Method in Applied Mechanic Engineering, vol. 32, no. 1, pp. 85 155. Haenpflug, W.C. (1993). Matrix Tenor Notation Part I. ectilinear Orthogonal Coordinate. Computer & Mathematic with Application, vol. 26, no. 3, pp. 55 93. Haenpflug, W.C. (1995). Matrix Tenor Notation Part II. Skew Curved Coordinate. Computer & Mathematic with Application, vol. 29, no. 11, pp. 1 103. Shabana, A.A. (1998). Dynamic of Multibody Sytem. 2nd edn. Cambridge Univerity Pre, Cambridge, UK. 12