98
1 NOTES ON ROTATIONS SOLO HERMELIN INITIAL INTERMEDIATE FINAL Updated: 3.03.07 Run This http://www.solohermelin.com

Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

Embed Size (px)

DESCRIPTION

Mathematics of rotation in 3d space, a lecture that I've prepared. This presentation is at a Undergraduate in Science (Math, Physics, Engineering) level. Please send comments and suggestions to [email protected]. Thanks! Fore more presentations, please visit my website at http://www.solohermelin.com/

Citation preview

Page 1: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

1

NOTES ON ROTATIONS

SOLO HERMELIN

INITIAL INTERMEDIATE FINAL

Updated: 3.03.07Run This

http://www.solohermelin.com

Page 2: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

2

ROTATIONS

TABLE OF CONTENT

SOLO

Rotation of a Rigid Body

Mathematical Computation of a Rotation

Rotation Matrix

Computation of the Rotation Matrix

Consecutive Rotations

Decomposition of a Vector in Two Different Frames of Coordinates

Differential Equation of the Rotation Matrices

Computation of the Angular Velocity Vector from .AB nRtC xB

A ˆ,33

Computation of and as functions of .ABtd

d td

ndn

ˆˆ

Quaternions

Computation of the Rotation Matrix

Definition of the Quaternions

Product of Quaternions Rotation Description Using the Quaternions

Page 3: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

3

ROTATIONS

TABLE OF CONTENT (continue – 1)

SOLO

Rotation as a Multiplication of Two Matrices

Relations Between Quaternions and Euler Angles

Description of Successive Rotations Using Quaternions

Differential Equation of the Quaternions

Computation of as a Function of the Quaternion and its Derivatives tB

AB

Computation of as a Function of , and their Derivatives tBAB n

Differential Equation of the Quaternion Between Two Frames A and B Using the Angular Velocities of a Third Frame I

Euler Angles

The PiogramSuccessive Euler Rotations

321 231 312 132 213 123

121 131 212 232 313 323

Page 4: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

4

ROTATIONS

TABLE OF CONTENT (continue – 2)

SOLO

Cayley-Klein (or Euler) Parameters and Related Quantities

Rotation Matrix in Three Dimensional Space

Euler Parameters

Elementary Features of the 2x2 Rotation Matrix

Gibbs Vector

Differential Equation of Gibbs Vector

References

Page 5: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

5

ROTATIONS

Rotation of a Rigid Body

SOLO

23r31r

12r1

3

2

P

P

1

2

331r

23r12r

A rigid body in mechanics is defined as a system of mass points subject to theconstraint that the distance between all pair of points remains constant through the motion.

To define a point P in a rigid body it is enough to specify the distance of this point to three non-collinear points. This means that a rigid body is completely definedby three of its non-collinear points. Since each point, in a three dimensional spaceis defined by three coordinates, those three points are defined by 9 coordinates.But the three points are constrained by the three distances between them:

313123231212 && constrconstrconstr

Therefore a rigid body is completely defined by 9 – 3 = 6 degrees of freedom.

Page 6: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

6

ROTATIONS

Rotation of a Rigid Body (continue – 1)

SOLO

We have the following theorems about a rigid body:

Euler’s Theorem (1775) The most general displacement of a rigid body with one point fixed is equivalent toa single rotation about some axis through that point.

Chasles’ Theorem (1839) The most general displacement of a rigid body is a translation plus a rotation.

Leonhard Euler 1707-1783

Michel Chasles 1793-1880

Page 7: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

7

ROTATIONS

Rotation of a Rigid Body (continue – 2)

SOLO

Proof of Euler’s Theorem P

'P

OA

'A

B

'BCC

r rr

rr

O – Fixed point in the rigid body

A,B – Two point in the rigid body at equal distance r from O.

rOBOA

__________

A’,B’ – The new position of A,B respectively.

Since the body is rigid rOBOA __________

''

Therefore A,B, A’,B’ are one a spherewith center O.

– plane passing through O such that A and A’ are at the same distance from it. – plane passing through O such that B and B’ are at the same distance from it.

PP’ – Intersection of the planes and The two spherical triangles APB and A’PB’ are equal.

The arcs AA’ and BB’ are equal. That means that rotation around PP’ that moves A to A’ will move B to B’.

q.e.d.

Page 8: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

8

ROTATIONS

Mathematical Computation of a Rotation

SOLO

AB

C

O

n

v

1v

We saw that every rotation is defined by three parameters:

• Direction of the rotation axis , defined by two parameters.n

• The angle of rotation , defines the third parameter. Let rotate the vector around by a large angle , toobtain the new vector

OAv n

OBv1

From the drawing we have:

CBACOAOBv1

vOA

cos1ˆˆ

vnnAC Since direction of is: sinˆˆ&ˆˆ vnnvnn

and it’s length is:

AC

cos1sin v

sinˆ vnCB

Since has the direction and the

absolute valueCB

vn

ˆsinsinv

sinˆcos1ˆˆ1 vnvnnvv

Page 9: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

9

ROTATIONS

Computation of the Rotation Matrix

SOLO

We have two frames of coordinates A and B defined by the orthogonal unit vectors and AAA zyx ˆ,ˆ,ˆ BBB zyx ˆ,ˆ,ˆ

The frame B can be reached by rotating the A framearound some direction by an angle . n

We want to find the Rotation Matrixthat describes this rotation from A to B.

,ˆ33 nRC xBA

sinˆˆcos1ˆˆˆˆˆ

sinˆˆcos1ˆˆˆˆˆ

sinˆˆcos1ˆˆˆˆˆ

AAAB

AAAB

AAAB

znznnxz

ynynnxy

xnxnnxx

Let write those equations in matrix form.

0

0

1

sinˆ

0

0

1

cos1ˆˆ

0

0

1

ˆ AAAAB nnnx

0

0

0

ˆ

xy

xz

yz

A

nn

nn

nn

n 0ˆ ntrace

AxAz

Ay

Bz

By

BxO

n

Rotation Matrix

Page 10: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

10

ROTATIONS

Computation of the Rotation Matrix (continue – 1)

SOLO

AxAz

Ay

Bz

By

BxO

n

0

0

1

sinˆ

0

0

1

cos1ˆˆ

0

0

1

ˆ AAAAB nnnx

0

1

0

sinˆ

0

1

0

cos1ˆˆ

0

1

0

ˆ AAAAB nnny

1

0

0

sinˆ

1

0

0

cos1ˆˆ

1

0

0

ˆ AAAAB nnnz

AA

AB

AAAx

AB xCnnnIx ˆ

0

0

1

sinˆcos1ˆˆˆ 33

AA

AB

AAAx

AB yCnnnIy ˆ

0

1

0

sinˆcos1ˆˆˆ 33

AA

AB

AAAx

AB zCnnnIz ˆ

1

0

0

sinˆcos1ˆˆˆ 33

Rotation Matrix (continue – 1)

Page 11: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

11

ROTATIONS

Computation of the Rotation Matrix (continue – 2)

SOLO

AxAz

Ay

Bz

By

Bx

O

n

,ˆsinˆcos1ˆˆ 3333 nRnnnICC xAAA

xA

B

A

B

The matrix has the following properties: Anˆ

ATA nn ˆˆ

22

22

22

0

0

0

0

0

0

ˆˆ

yxzyzx

zyzxyx

zxyxyz

xy

xz

yz

xy

xz

yz

AA

nnnnnn

nnnnnn

nnnnnn

nn

nn

nn

nn

nn

nn

nn

Tx

zzyzx

zyyyx

zxyxx

nnI

nnnnn

nnnnn

nnnnn

ˆˆ

000

010

001

33

2

2

2

213ˆˆ AA nntrace

nn

nn

nn

nn

nnnnn

xy

xz

yz

zyxAT ˆˆ000

0

0

0

ˆˆ

AATAATx

AAA nnnnnnnnInnn ˆˆˆˆˆˆˆˆˆˆˆ 22

TxAAAAAA nnInnnnnn ˆˆˆˆˆˆˆˆ 33

skew-symmetric

Rotation Matrix (continue – 2)

Page 12: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

12

ROTATIONS

Computation of the Rotation Matrix (continue – 3)

SOLO

AxAz

Ay

Bz

By

Bx

O

n

BAxx

AAAx

TATATAx

TAB

CnRnR

nnnI

nnnIC

,ˆ,ˆ

sinˆcos1ˆˆ

sinˆcos1ˆˆ

3333

33

33

Note

The last term can be writen in matrix form as

Therefore

In the same way

End Note

In fact is the matrix representation of the vector product: vnn

ˆˆ

vInnvvnn xT

33ˆˆˆˆ

vvnnnnvvnnvnn

ˆˆˆˆˆˆˆˆ

Tx nnInn ˆˆˆˆ 33

nnnnvnvvnnnvnnn ˆˆˆˆˆˆˆˆˆˆˆ

nnnnnnvnnvnnnn ˆˆˆˆˆˆˆˆˆˆˆˆ

Rotation Matrix (continue – 3)

Page 13: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

13

ROTATIONS

Computation of the Rotation Matrix (continue – 4)

SOLO

AxAz

Ay

Bz

By

Bx

O

n

sin0cos123

sinˆcos1ˆˆ

sinˆcos1ˆˆ

33

33

AAA

x

TATATAx

BA

ntracenntraceItrace

nnnItracetraceC

Therefore cos21BACtrace

Let compute the trace (sum of the diagonal components of a matrix) of B

AC

Also we have

sinˆcos1ˆˆcos

sinˆcos1ˆˆ

sinˆcos1ˆˆ

33

3333

33

ATx

ATxx

TATATAx

BA

nnnI

nnnII

nnnIC

sin

0

0

0

cos1cos

000

010

001

2

2

2

xy

xz

yz

zzyzx

zyyyx

zxyxx

nn

nn

nn

nnnnn

nnnnn

nnnnn

Rotation Matrix (continue – 4)

Page 14: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

14

ROTATIONS

Computation of the Rotation Matrix (continue – 5)

SOLO

AxAz

Ay

Bz

By

Bx

O

n

Therefore we have

cos1cossincos1sincos1

sincos1cos1cossincos1

sincos1sincos1cos1cos

2

2

2

zxzyyzx

xzyyzyx

yzxzyxx

BA

nnnnnnn

nnnnnnn

nnnnnnn

C

We get

12

1cos B

AtraceC two solutions for

If ; i.e. we obtain0sin ,0

sin2/2,33,2 BA

BAx CCn

sin2/3,11,3 BA

BAy CCn

sin2/1,22,1 BA

BAz CCn

Rotation Matrix (continue – 5)

Page 15: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

15

ROTATIONS

Consecutive Rotations

SOLO

- Perform first a rotation of the vector , according to the Rotation Matrix to the vector .

v 1133 ,ˆ nR x

1v

- Perform a second a rotation of the vector , according to the Rotation Matrix to the vector .

1v

2233 ,ˆ nR x

2v

vnRv x

11331 ,ˆ

vnRvnRnRvnRv xxxx

,ˆ,ˆ,ˆ,ˆ 3311332233122332

The result of those two consecutive rotation is a rotation defined as:

1133223333 ,ˆ,ˆ,ˆ nRnRnR xxx

Let interchange the order of rotations, first according to the Rotation Matrixand after that according to the Rotation Matrix .

2233 ,ˆ nR x

1133 ,ˆ nR x

The result of those two consecutive rotation is a rotation defined as:

22331133 ,ˆ,ˆ nRnR xx

Since in general, the matrix product is not commutative

2233113311332233 ,ˆ,ˆ,ˆ,ˆ nRnRnRnR xxxx

Therefore, in general, the consecutive rotations are not commutative.

Rotation Matrix (continue – 6)

Page 16: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

16

ROTATIONSSOLO

INITIALINITIAL INTERMEDIATEINITIAL INTERMEDIATE FINAL

Consecutive Rotations of a DiceRotation Matrix (continue – 7)

Page 17: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

17

ROTATIONS

Decomposition of a Vector in Two Different Frames of Coordinates

SOLO

We have two frames of coordinate systems A and B, with the same origin O.

We can reach B from A by performing a rotation.

Let describe the vector in both frames. v

Ax

Az

Ay

Bx

BzBy

v

OxAv

zAv

yAv

xBv

zBv

yBv

BzBByBBxBAzAAyAAxA zvyvxvzvyvxvv

111111

zA

yA

xA

A

v

v

v

v

zB

yB

xB

B

v

v

v

v

&

BBABBABBAA

BBABBABBAA

BBABBABBAA

zzzyyzxxzz

zzyyyyxxyy

zzxyyxxxxx

ˆˆˆˆˆˆˆˆˆˆ

ˆˆˆˆˆˆˆˆˆˆ

ˆˆˆˆˆˆˆ1ˆˆ

zABBABBABBA

yABBABBABBA

xABBABBABBA

vzzzyyzxxz

vzzyyyyxxy

vzzxyyxxxxv

ˆˆˆˆˆˆˆˆˆ

ˆˆˆˆˆˆˆˆˆ

ˆˆˆˆˆˆˆ1ˆ

from which

Rotation Matrix (continue – 8)

Page 18: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

18

ROTATIONS

Decomposition of a Vector in Two Different Frames of Coordinates (continue – 1)

SOLO

zA

yA

xA

BABABA

BABABA

BABABA

zB

yB

xB

v

v

v

zzzyzx

yzyyyx

xzxyxx

v

v

v

ˆˆˆˆˆˆ

ˆˆˆˆˆˆ

ˆˆˆˆˆˆ

Ax

Az

Ay

Bx

BzBy

v

OxAv

zAv

yAv

xBv

zBv

yBv ABA

B vCv

where is the Transformation Matrix (or Direction Cosine Matrix – DCM) from frame A to frame B.

BAC

BABABA

BABABA

BABABABA

B

A

zzzyzx

yzyyyx

xzxyxx

CC

ˆˆˆˆˆˆ

ˆˆˆˆˆˆ

ˆˆˆˆˆˆ

:

In the same way BAB

BBA

A vCvCv

1

therefore 1 B

AA

B CC

Rotation Matrix (continue – 9)

Page 19: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

19

ROTATIONS

Decomposition of a Vector in Two Different Frames of Coordinates (continue – 2)

SOLO

Ax

Az

Ay

Bx

BzBy

v

OxAv

zAv

yAv

xBv

zBv

yBv

ATAABA

TBA

TAABA

TABA

BTB vvvCCvvCvCvvv

2

Since the scalar product is independent of the frame of coordinates, we have

1 B

A

TBA

BA

TBA CCICC

100

010

001

3,33,23,1

2,32,22,1

1,31,21,1

3,32,31,3

3,22,21,2

3,12,11,1

BA

BA

BA

BA

BA

BA

BA

BA

BA

BA

BA

BA

BA

BA

BA

BA

BA

BA

BA

TBA

CCC

CCC

CCC

CCC

CCC

CCC

CC

or

3,2,10

3,2,11,,

3

1 jji

ijikjCkiC ij

k

BA

BA

Those are 9 equations in , but by interchanging i with j we get the sameconditions, therefore we have only 6 independent equations.

3,2,1,, jijiC BA

We see that the Rotation Matrix is ortho-normal (having real coefficients and therows/columns are orthogonal to each other and of unit absolute value.

Rotation Matrix (continue – 10)

This means that the relation between the two coordinate systems is defined by9 – 6 = 3 independent parameters.

Page 20: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

20

ROTATIONS

Differential Equations of the Rotation Matrices

SOLO

We want to develop the differential equation of the Rotation Matrix as a function of the Angular Velocity of the Rotation. Let define by:

-the Rotation Matrix that defines a frame of coordinates B at the time t relative to some frame A.

tC BA

-the Rotation Matrix that defines the frame of coordinates B at the time t+Δt relative to some frame A.

ttC BA

,ˆ33xR -the Rotation Matrix from the frame of coordinates B at the time t to B at time t+Δt relative to some frame A.

tCRttC BAx

BA ,ˆ33

and

2cos

2sinˆ2

2sinˆˆ2

sinˆcos1ˆˆ,ˆ

233

3333

x

xx

I

IR

Rotation Matrix (continue – 11)

Page 21: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

21

ROTATIONS

Differential Equations of the Rotation Matrices (continue – 1)

SOLO

Let differentiate the Rotation Matrix

tCdt

dIRtC

t

IR

tCt

IR

t

tCtCR

t

tCttC

t

C

dt

dC

BA

xxBA

xx

t

BA

xx

t

BA

BAx

t

BA

BA

t

BA

t

BA

3333

0

3333

0

3333

0

33

0

00

,ˆlim

,ˆlim

,ˆlim

,ˆlim

limlim

ˆ

2cos

2

2sin

ˆ2

2

2sin

ˆˆlim,ˆ

lim 2

2

0

3333

0

xx IR

and

Therefore tC

dt

d

dt

tdC BA

BA ˆ

Rotation Matrix (continue – 12)

Page 22: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

22

ROTATIONS

Differential Equations of the Rotation Matrices (continue – 2)

SOLO

The final result of the Rotation Matrix differentiation is:

Since defines the unit vector of rotation and the rotation rate from B at time t

to B at time t+Δt, relative to A, then is the angular velocity vector of the frame

B relative to A, at the time t

dt

d

ˆ

dt

d

ˆdt

dBAB

tCtdt

tdC BA

BAB

BA

By changing indixes A and B we obtain

tCtdt

tdC AB

ABA

AB

Rotation Matrix (continue – 13)

Page 23: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

23

ROTATIONS

Differential Equations of the Rotation Matrices (continue – 3)

SOLO

Let find the relation between and BAB A

AB

For any vector let perform the following computationsv

AAB

BA

BAB

BBAB vCvv

BAB

AAB

BA

ABA

AB

AAB

BA

AAAB

BA vCCvCCCvC

Since this is true for any vector we havev

AB

AAB

BA

BAB CC

Pre-multiplying by and post-multiplying by we get:A

BCB

AC

BA

BAB

AB

AAB CC

Rotation Matrix (continue – 14)

Page 24: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

24

ROTATIONS

Differential Equations of the Rotation Matrices (continue – 4)

SOLO

Let differentiate the equation 33xA

BB

A ICC

to obtain

0 dt

dCC

dt

dCCCC

dt

dCCC

dt

dC ABB

AB

AB

ABB

AA

BB

AB

AB

ABB

AA

B

BA

Post-multiplying by we getA

BC

AB

AAB

AB

BA

BAB

AB

BAB

AB

AB CCCCCdt

dC

We obtained for the differentiation of the Rotation Matrix

BAB

AB

AB

AAB

AB

ABA

AB ttCtCttCtdt

tdC

Note

We can see that tttt ABBAA

ABA

BA

End Note

Rotation Matrix (continue – 15)

Page 25: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

25

ROTATIONS

Differential Equations of the Rotation Matrices (continue – 5)

SOLO

Suppose that we have a third frame of coordinates I (for example inertial) and we have the angular velocity vectors of frames A and B relative to I.

We have

BI

BIB

BI Cdt

dC A

IA

IA

AI Cdt

dC

AI

BA

BI CCC

dt

dCCC

dt

dC

dt

dC AIB

AAI

BA

BI

IA

AI

AIA

BA

IA

BI

BIB

IA

AIB

AI

A

BI

BA CCCCCC

dt

dCCC

dt

dC

dt

dC

or

From which we get:

AIA

BA

BA

BIB

BA CCdt

dC

Rotation Matrix (continue – 16)

Page 26: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

26

ROTATIONSSOLO

From the equation

Computation of the Angular Velocity Vector from .AB nRtC xB

A ˆ,33

tCtdt

tdC BA

BAB

BA

we obtain

TBA

BAB

AB tCdt

tdCt

Since the Rotation Matrix is defined also by and

sinˆcos1ˆˆcosˆ, 3333 nnnInRC Tx

BA

tC BA n

we can compute as function of and their derivativesnABtd

d td

ndn

ˆˆ

(this is a long procedure described in the complementary work “Notes on Rotations”, and a simpler derivation will be given later, we give here the final result)

sinˆcos1ˆˆˆ

nnnnAB

Rotation Matrix (continue – 17)

Page 27: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

27

ROTATIONSSOLO

Computation of and as functions of .ABtd

d td

ndn

ˆˆ

Let pre-multiply the equation by and useTn sinˆcos1ˆˆˆ

nnnnAB

0ˆˆ,0ˆˆ,1ˆˆ

nnnnnn TTT to obtain

ABTTTT

ABT nnnnnnnnn

ˆsinˆˆcos1ˆˆˆˆˆˆ

Let pre-multiply the equation by and use n sinˆcos1ˆˆˆ

nnnnAB

nnInnnnnnn xT ˆˆˆˆˆˆˆ,0ˆˆ 33

to obtain

sinˆˆcos1ˆsinˆˆcos1ˆˆˆˆˆˆ

nnnnnnnnnnn AB

Let pre-multiply the equation by sinˆˆcos1ˆˆ

nnnn AB

n

cos1ˆˆsinˆsinˆˆˆcos1ˆˆˆˆ

nnnnnnnnnn AB

Rotation Matrix (continue – 18)

Page 28: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

28

ROTATIONS

Computation of and as functions of (continue – 1)

SOLO

ABtd

d td

ndn

ˆˆ

We have two equations:

ABnnnn

ˆsinˆˆcos1ˆ

ABnnnnn

ˆˆcos1ˆˆsinˆ

with two unknowns and

n

nn ˆˆ

From those equations we get:

sinˆˆcos1ˆsincos1ˆ 22ABAB nnnn

or

sinˆˆcos1ˆcos1ˆ2 ABAB nnnn

Finally we obtain:

ABTn ˆ

ABnnnn

2cotˆˆˆ

2

Rotation Matrix (continue – 19)

Page 29: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

29

ROTATIONS

Quaternions

SOLO

The quaternions method was introduced by Hamilton in 1843. It is based on Euler Theorem (1775) that states:

The most general displacement of a rigid body with one point fixed is equivalent toa single rotation about some axis through that point.

Therefore every rotation is defined by three parameters:

• Direction of the rotation axis , defined by two parameters

• The angle of rotation , defines the third parameter

n

William Rowan Hamilton 1805 - 1865

sinˆcos1ˆˆ1 vnvnnvv

The rotation of around by angle is given by:n v

AB

C

O

n

v

1v

that can be writen

sinˆcos1ˆˆ1 vnvvnnvv

or

sinˆcos1ˆˆcos1 vnvnnvv

Page 30: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

30

ROTATIONSQuaternions (continue – 1)

SOLO

Computation of the Rotation Matrix

We found the Rotation Matrixthat describes this rotation from A to B.

,ˆ33 nRC xBA

sinˆˆcos1ˆˆˆˆˆ

sinˆˆcos1ˆˆˆˆˆ

sinˆˆcos1ˆˆˆˆˆ

AAAB

AAAB

AAAB

znznnxz

ynynnxy

xnxnnxx

AxAz

Ay

Bz

By

BxO

n

AA

AB

AAAx

AB xCnnnIx ˆ

0

0

1

sinˆcos1ˆˆˆ 33

AA

AB

AAAx

AB yCnnnIy ˆ

0

1

0

sinˆcos1ˆˆˆ 33

AA

AB

AAAx

AB zCnnnIz ˆ

1

0

0

sinˆcos1ˆˆˆ 33

or

from which

,ˆsinˆcos1ˆˆ 3333 nRnnnICC xAAA

xA

B

A

B

Page 31: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

31

ROTATIONSQuaternions (continue – 2)

SOLO

Definition of the Quaternions

AxAz

Ay

Bz

By

BxO

n

The quaternions (4 parameters) were defined by Hamilton as a generalization of the complex numbers

32100 , qkqjqiqqq

2/cos0 q

n2/sin

zyx nqnqnq 2/sin&2/sin&2/sin 111

where satisfy the relations: kji

,,

1 kkjjii

kijji

ijkkj

jkiik

1 kji

i

j

k

the complex conjugate of is defined asq

32100* , qkqjqiqqq

Page 32: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

32

ROTATIONSQuaternions (continue – 3)

SOLO

Product of Quaternions

Product of two quaternions andAq Bq

3210321000 ,, BBBBAAAABBAABA qkqjqiqqkqjqiqqqqq

3210321033221100 AAABBBBABABABABA qkqjqiqqkqjqiqqqqqqqqq

122131132332 BABABABABABA qqqqkqqqqjqqqqi

therefore

BAABBABABABBAABA qqqqqqqq

000000 ,,,

Let use this expression to find

23

22

21

20

222000

*00

* 1ˆˆ2

sin2

cos,,,, qqqqnnqqqqqqqqq

The quaternion product can be writen in matrix form as:

A

A

BxBB

TBB

B

B

AxAA

TAA

BA

q

Iq

qq

Iq

qqq

qq

0

330

00

330

00

1 kjikkjjii

kijji

ijkkj

jkiik

Page 33: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

33

ROTATIONSQuaternions (continue – 4)

SOLO

Rotation Description Using the Quaternions

Let compute the expression:

AAAAAAAA

AAAAA

vvqvqvqvvvqqv

qvvqvqvqqvq

002

000

0000*

,

,,,,0,

A

AAAA

AAAAAAA

vqq

vvqqvv

vvqvqvqvvv

22,0

2,0

,0

02

0

02

0

002

0

Using the relations:

nnq

nnnn

q

n

q

ˆsinˆ2/sin2/cos22

ˆˆcos1ˆˆ2/sin22

1

ˆ2/sin

2/cos

0

2

20

0

and AAAAx

ABA

B vnnnIvCv sinˆcos1ˆˆ33

we obtain

AAABB vqqvqqvqvv

221,0,,0,,0 000*

Page 34: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

34

ROTATIONSQuaternions (continue – 5)

SOLO

Rotation Description Using the Quaternions (continue – 1)

Using the fact that we obtain:

22 033 qIC xBA

0

0

0

0

0

0

2

0

0

0

2

100

010

001

12

13

23

12

13

23

12

13

23

0

qq

qq

qq

qq

qq

qq

qq

qq

qq

q

22

213231

322

12

321

31212

22

3

1020

1030

2030

2222

2222

2222

022

202

220

100

010

001

qqqqqq

qqqqqq

qqqqqq

qqqq

qqqq

qqqq

2

22

110323120

32102

12

33021

203121302

22

3

2212222

2222122

2222221

qqqqqqqqqq

qqqqqqqqqq

qqqqqqqqqq

123

22

21

20 qqqq

2

32

22

12

010323120

32102

32

22

12

03021

203121302

32

22

12

0

22

22

22

qqqqqqqqqqqq

qqqqqqqqqqqq

qqqqqqqqqqqq

C BA

Page 35: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

35

ROTATIONSQuaternions (continue – 6)

SOLO

Rotation as a Multiplication of Two Matrices

22 033 qIC xBA

22 0332

0 qIq xT

330332

0 2 xT

x IqIq

33330330 xT

xx IIqIq

For any vector we can write

aaaa

or in matrix notation

Tx

Tx

Tx

TT IIaIa

333333

Therefore we have

33330330 xT

xxBA IIqIqC

Txx IqIq

330330

321

3

2

1

012

103

230

012

103

230

qqq

q

q

q

qqq

qqq

qqq

qqq

qqq

qqq

Page 36: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

36

ROTATIONSQuaternions (continue – 7)

SOLO

Rotation as a Multiplication of Two Matrices (continue – 1)

330

330

012

103

230

321

0123

1032

2301

x

T

xBA

Iq

Iq

qqq

qqq

qqq

qqq

qqqq

qqqq

qqqq

C

330

330

012

103

230

321

0123

1032

2301

x

T

xBA

Iq

Iq

qqq

qqq

qqq

qqq

qqqq

qqqq

qqqq

C

T

x

xBA

Iq

Iq

qqq

qqq

qqq

qqq

qqqq

qqqq

qqqq

C

330

330

321

012

103

230

3012

2103

1230

T

x

xBA

Iq

Iq

qqq

qqq

qqq

qqq

qqqq

qqqq

qqqq

C

330

330

321

012

103

230

3012

2103

1230

Page 37: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

37

ROTATIONSQuaternions (continue – 8)

SOLO

Relation Between Quaternions and Euler Angles

x

Ax

B

x

qvqv

iq

*

2sin

2cos

Rotation around x axis

Ax

1

Ay

1

Az

1Bz

1 By

1

y

Ay

B

y

qvqv

jq

*

2sin

2cos

Ax

1

Ay

1

Az

1Bz

1

Bx

1

Rotation around y axis

z

Az

B

z

qvqv

kq

*

2sin

2cos

Ax

1

Ay

1

Az

1

Bx

1

By

1

Rotation around z axis

Page 38: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

38

ROTATIONSQuaternions (continue – 9)

SOLO

Description of Successive Rotations Using QuaternionsLet describe two consecutive rotations:- First rotation defined by the quaternion

1

111101 ˆ

2sin,

2cos, nqq

- Folowed by the second rotation defined by the quaternion

2

222202 ˆ

2sin,

2cos, nqq

After the first rotation the quaternion of the vector is transferred to 1*

1 qvq

After the second rotation we obtain 21*

2121*

1*

221*

1*

2 qqvqqqqvqqqqvqq

Therefore the quaternion representing those two rotation is:

2121

12

21

212121

21120210212010220110210

ˆˆ2

sin2

sinˆ2

cosˆ2

cos,ˆˆ2

sin2

sin2

cos2

cos

,,,,

nnnnnn

qqqqqqqqqq

210 , qqqq 21

21210 ˆˆ

2sin

2sin

2cos

2cos

2cos nnq

2121

12

21 ˆˆ

2sin

2sinˆ

2cosˆ

2cosˆ

2sin nnnnn

Page 39: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

39

ROTATIONSQuaternions (continue – 10)

SOLO

Description of Successive Rotations Using Quaternions (continue – 1)

210 , qqqq 21

21210 ˆˆ

2sin

2sin

2cos

2cos

2cos nnq

2121

12

21 ˆˆ

2sin

2sinˆ

2cosˆ

2cosˆ

2sin nnnnn

Two consecutive rotations, followed by , are given by:1q 2q

From those equations we can see that:

0ˆˆˆˆˆˆˆˆˆˆ 21212112211221

nnnnnnnnnnifonlyandifqqqq

The rotations are commutative if and only if are collinear.21 ˆ&ˆ nn

In matrix form those two rotations are given by:

First Rotation: 111111331133 sinˆcos1ˆˆcosˆ, nnnInR Txx

Second Rotation: 222222332233 sinˆcos1ˆˆcosˆ, nnnInR Txx

Total Rotation:

sinˆcos1ˆˆcosˆ,ˆ,ˆ, 331133223333 nnnInRnRnR Txxxx

Page 40: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

40

ROTATIONSQuaternions (continue – 11)

SOLO

Description of Successive Rotations Using Quaternions (continue – 2) Let find the quaternion that describes the Euler Rotations through the

angles respectively. Let write the rotations according to their order

123

,,

2sin

2cos

2sin

2cos

2sin

2cos

ijkqqqq xyz

BA

2sin

2sin

2cos

2sin

2cos

2sin

2cos

2cos

2sin

2cos

kjik

2sin

2sin

2sin

2cos

2cos

2cos

2cos

2sin

2sin

2sin

2cos

2cos

i

2cos

2sin

2cos

2sin

2cos

2sin

j

2sin

2sin

2cos

2cos

2cos

2sin

k

Page 41: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

41

ROTATIONSQuaternions (continue – 12)

SOLO

Differential Equation of the Quaternions

Let define

,0qtq BA - the quaternion that defines the position of B frame

relative to frame A at time t.

tqqttq BA

,00

- the quaternion that defines the position of B frame relative to frame A at time t+Δt.

tBA ntq ˆ

2sin,

2cos

- the quaternion that defines the position of B frame at time t+Δt relative to frame B at time t.

We have the relation: tqtqttq BA

BA

BA

or

,,0,1,,,,,ˆ2

sin,2

cos 00000000* qqqqqqqqttqtqntq B

ABAt

BA

therefore

tnqq ˆ2

sin,12

cos,, 00

tnqq ˆ2

sin,12

cos,, 00

or

Page 42: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

42

ROTATIONSQuaternions (continue – 13)

SOLO

Differential Equation of the Quaternions (continue – 1)

tnqq ˆ2

sin,12

cos,, 00

Let divide both sides by and take the limit .0 tt

tBttBt

ntqnqntt

tqtd

d

tt

2

1,0ˆ

2

1,0,ˆ

2

2sin

2

1,

2

12

cos

2

1,lim 0

0

0

But is the instant angular velocity vector of frame B relative to frame A.tnˆ

tB

AB nt ˆ ttn BAB

BABt ,0ˆ,0

So we can write

ttqtqtd

d BAB

BA

BA

2

1

This is the Differential equation of the quaternion that defines the position of B relative to A, at the time t as a function of the angular velocity vector of frame B relative to frame A, .

tq BA

tBAB

Page 43: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

43

ROTATIONSQuaternions (continue – 14)

SOLO

Differential Equation of the Quaternions (continue – 2)

Developing this equation, we get

ttqtqtd

d BAB

BA

BA

2

1

BAB

BAB

BAB

BAB qtq

dt

d

dt

dq

000 ,

2

1,0,

2

1,

from which

BABdt

dq

2

10

BAB

BABq

dt

d

02

1

or in matrix form

t

Iq

q

dt

d BAB

x

T

330

0

2

1

Page 44: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

44

ROTATIONSQuaternions (continue – 15)

SOLO

Differential Equation of the Quaternions (continue – 3)

zBAB

yBAB

xBAB

qqq

qqq

qqq

qqq

q

q

q

q

dt

d

012

103

230

321

3

2

1

0

t

Iq

q

dt

d BAB

x

T

330

0

2

1

BAAB

xBAByBABzBAB

xBABzBAByBAB

yBABzBABxBAB

zBAByBABxBAB

q

q

q

q

q

q

q

q

q

dt

d

2

1

0

0

0

0

2

1

3

2

1

0

3

2

1

0

After rearranging

or zBAByBABxBAB qqq

dt

dq 321

0

2

1

zBAByBABxBAB qqqdt

dq 230

1

2

1

zBAByBABxBAB qqqdt

dq 103

2

2

1

zBAByBABxBAB qqqdt

dq 012

3

2

1

Page 45: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

45

ROTATIONSQuaternions (continue – 16)

SOLO

Pre-multiply the equation

Computation of as a Function of the Quaternion and its Derivatives tB

AB

t

Iq

q

dt

d BAB

x

T

330

0

2

1

by

330 xIq

t

Iq

Iq

q

Iq BAB

x

T

xx

330

330

0

330 2

1

ttIIq

tIq

BBA

BBAx

TTx

T

BBAx

T

2

1

2

12

1

33332

0

332

0

Therefore

0

3302

q

Iqt xB

AB

Page 46: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

46

ROTATIONSQuaternions (continue – 17)

SOLO

Computation of as a Function of the Quaternion and its Derivatives (continue – 1)

But and are related. Differentiating the equation

tBAB

we obtain

0q

120

Tq

3300

0

330 22 xxB

AB Iqq

q

Iqt

0

0332

0330

0

21

2q

qIqIq

q

Tx

xT

From the equation

TT

qqqq

0000

10

we obtain

T

xB

AB qIqq 033

20

0

2

Page 47: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

47

ROTATIONSQuaternions (continue – 18)

SOLO

Computation of as a Function of , and their Derivatives tBAB n

Differentiate the quaternion

nqq ˆ

2sin,

2cos,0

to obtain

nnqq ˆ2

sinˆ2

cos2

,2

sin2

,0

Substitute this in the equation

0

3302

q

Iqt xB

AB

nn

nIn x

ˆ2

sinˆ2

cos2

2sin

2

ˆ2

sin2

cosˆ2

sin2 33

nnnnnnn ˆˆ

2sin2ˆˆ

2cos

2sinˆ

2cos

2sin2ˆ

2cosˆ

2sin 222

nnnnAB ˆˆcos1ˆsinˆ Finally we obtain

We recovered a result obtained before.

Page 48: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

48

ROTATIONSQuaternions (continue – 18)

SOLO

Differential Equation of the Quaternion Between Two Frames A and B Using the AngularVelocities of a Third Frame I

The relations between the components of a vector in the frames A, B and I arev

ABA

IAI

BA

IBI

B vCvCCvCv

Using quaternions the same relations are given by

BA

AI

IAI

BA

BI

IBI

B qqvqqqvqv***

Therefore

BA

AI

BI qqq B

IAI

BA qqq

*

Let perform the following calculationsBA

AI

BA

AI

BI q

dt

dqqq

dt

dq

dt

d

& BIB

BI

BI qq

dt

d

2

1 AIA

AI

AI qq

dt

d

2

1and use

BA

AI

BA

AIA

AI

BIB

BI q

dt

dqqqq

2

1

2

1 BA

AIA

AI

AI

BIB

BI

AI

BA qqqqqq

dt

d

1

**

2

1

2

1

to obtain BA

AIA

BIB

BA

BA qqq

dt

d

2

1

2

1

Page 49: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

49

ROTATIONSQuaternions (continue – 19)

SOLO

Differential Equatio of the Quaternion Between Two Frames A and B Using the AngularVelocities of a Third Frame I (continue – 1)

Using the relations

ABIAIB

and B

AA

IABA

BIA qq

* BA

AIA

BIA

BA qq

we have

0

2

1

2

1

2

1

2

1

2

1 BA

AIA

BIA

BA

BAB

BA

BA

AIA

BIA

BAB

BA

BA qqqqqq

dt

d

from which BA

AAB

BAB

BA

BA qqq

dt

d

2

1

2

1

Since BAAB we get

BA

ABA

BBA

BA

BA

AAB

BAB

BA

BA qqqqq

dt

d

2

1

2

1

2

1

2

1

From we get1*

BA

AB

BA

BA qqqq A

BBA qq

*

Therefore

B

AAB

BA

AB q

dt

dqqq

dt

d0

*BA

BA

AB

AB qq

dt

dqq

dt

d

Page 50: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

50

ROTATIONS

Euler Angles

SOLO

1

1

A1

A2

A3B3 B2

1

2A1

A2

A3B3

B1

2

2

The orientation of the Body Frame relative to theInertial Frame has three degrees of freedom. We will use 3 Euler Angles that define the orientationby three consecutive rotations around the consecutiveframe axes.

11

1111

0

0

001

:

cs

sc

22

22

22

0

010

0

:

cs

sc

100

0

0

: 33

33

33

cs

sc

The three basic Euler rotations aroundaxes are described by the rotation matrices:

,3,2,1

3A1

A2

A3

B1

B233

Page 51: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

51

ROTATIONSEuler Angles (continue – 1)

SOLO

Introduce the Piogram that represents the following notation:

(from Pio R.L. “Symbolic Representations of Coordinate Transformations”, IEEE on Aerospace and Navigation Electronics, Vol. ANE-11,June 1964, pp.128-134)

zBzAyA

yBzAyA

vvv

vvv

cossin

sincos

Piogramof

Rotationaroundx axis

yAvcos

cos

yBv

zBvzAv

sin

sin

yAv

zAv

yBv

zBv

MathematicalComputationof Rotation

by angle

The Piogram

Page 52: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

52

ROTATIONSEuler Angles (continue – 2)SOLO

cossin

sincos

zAyAzB

zAyAyB

xAxB

vvv

vvv

vv

Piogramof

Rotationaroundx axis

xAv

yAv

zAv

yBv

zBv

xBv

Ax

1

Ay

1

Az

1Bz

1 By

1

Rotation Around x Axis by an Angle .

cossin0

sincos0

001

xB

AC

BAAB xx

11

cossin0

sincos0

001

xA

BC

The Piogram (continue – 1)

Page 53: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

53

ROTATIONSEuler Angles (continue – 3)SOLO

Rotation Around y Axis by an Angle .

sincos

cossin

zAxAzB

yAyB

zAxAxB

vvv

vv

vvv

Piogramof

Rotationaroundy axis

xAv

yAv

zAv

yBv

zBv

xBv

Ax

1

Ay

1

Az

1Bz

1

Bx

1

cos0sin

010

sin0cos

yB

AC

BAAB yy

11

cos0sin

010

sin0cos

yA

BC

The Piogram (continue – 2)

Page 54: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

54

ROTATIONSEuler Angles (continue – 4)SOLO

Rotation Around z Axis by an Angle .

zAzB

yAxAyB

yAxAxB

vv

vvv

vvv

cossin

sincos

Piogramof

Rotationaroundz axis

xAv

yAv

zAv

yBv

zBv

xBv

Ax

1

Ay

1

Az

1

Bx

1

By

1

100

0cossin

0sincos

xB

AC

BAAB zz

11

100

0cossin

0sincos

xA

BC

The Piogram (continue – 3)

Page 55: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

55

ROTATIONS

Euler Angles (continue – 5)

SOLO

Using the basic Euler Angles we can define the following 12 different rotations:

(a) six rotations around three different axes:

321 231 312 132 213 123

(b) six rotations such that the first and third are around the sam axes, but the second is different:

121 131 212 232 313 323

Suppose that the Transfer Matrix from A to B is defined by threeconsecutive Euler Angles: around (unit vector in A Frame),around (unit vector in intermediate frame), around (unit vectorin B Frame).

BAC

i Ii jInterj

k Bk

TBA

BA

AB

AB

BAkkjjii

BA CCCICCC

1&

Page 56: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

56

ROTATIONSEuler Angles (continue – 6)SOLO

BB xx

11 '

'1 By

'1 Bz

Bz

1By

1

Ax

1

Ay

1

Az

1

'1 Ax

'1 Ay

'' 11 BA yy

'1 Ax

AA zz

11 '

'1 Bz

'1 Bx

123 Euler Angles rotations: using the Piogram

1.Rotation from A to A’ around the third axis by the angle

2. Rotation from A’ to B’ around the third axis by the angle

.

3. Rotation from B’ to B around the third axis by the angle

.

xAv

yAv

zAv

yBv

zBv

xBv

'xAv

'yAv

'zAv

'xBv

'yBv

'zBv

The Piogram (continue – 4)

Page 57: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

57

ROTATIONSEuler Angles (continue – 7)SOLO

123 Euler Angles rotations:

xAv

yAv

zAv

yBv

zBv

xBv

'xAv

'yAv

'zAv

'xBv

'yBv

'zBv

Piogram:

xAv

yAv

zAv

cos

cossin' yAxAyA vvv

zAzA vv '

cos

sin

sin

sincos' yAxAxA vvv

Example 1: Computation of the relation between to using the PiogramyBv zAyAxA vvv ,,

From the Piogram:

cossinsinsinsincoscoscossinsinsincos zAyAxAyB vvvv

using the Piogram (continue – 1)

xAv

yAv

zAv cos

cos

cossin' yAxAyA vvv

zAzA vv '

yByB vv '

cossin ''' zAxAzB vvv

cos

sin

sin

sin

sincos' yAxAxA vvv xAv

yAv

zAv

sincos '' zByByB vvv

cos

cos

cos

cossin' yAxAyA vvv

zAzA vv '

yByB vv '

cossin ''' zAxAzB vvv

cos

sin

sin

sin

sin

sincos' yAxAxA vvv

The Piogram (continue – 5)

Page 58: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

58

ROTATIONSEuler Angles (continue – 8)SOLO

123 Euler Angles rotations:

xAv

yAv

zAv

yBv

zBv

xBv

'xAv

'yAv

'zAv

'xBv

'yBv

'zBv

Piogram:

using the Piogram (continue – 2)

Example 2: Computation of the matrix (1st column) using the PiogramB

AC

1xAv

0yAv

0zAv

cos' xAv

sin' yAv

0' zAv

cos

cos

sin

sin

1xAv

0yAv

0zAv

cos' xAv

sin' yAv

0' zAv

sin' yBv

cossin' zBv

coscosxBv

cos

cos

sin

sin

cos

sin

cos

sin

1xAv

0yAv

0zAv

cos' xAv

sin' yAv

0' zAv

sin' yBv

cossin' zBv

coscosxBv

cossincos

sinsin

zBv

cossinsin

sincos

yBvcos

cos

sin

sin

cos

sin

cos

sincos

sin

cos

sin

ccssccscscss

csssscccsssc

ssccc

CCC

CCC

CCC

BA

BA

BA

BA

BA

BA

BA

BA

BA

3,32,31,3

3,22,21,2

3,12,11,1

The Piogram (continue – 6)

Page 59: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

59

ROTATIONSEuler Angles (continue – 9)SOLO

123 Euler Angles rotations:

xAv

yAv

zAv

yBv

zBv

xBv

'xAv

'yAv

'zAv

'xBv

'yBv

'zBv

Piogram:

Example 3: Computation of the angular velocity using the Piogram

using the Piogram (continue – 3)

AB

xAAB

yAAB

zAAB

0

0

0B

A

'A

'B

10

0

0

0

0

1

0

1

0

1

0

0

111 233'

'''

''

s

csc

scc

xCyCz BB

AB

AA

AA

AA

AAB

The Piogram (continue – 7)

Page 60: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

60

ROTATIONSEuler Angles (continue – 10)SOLO

123 Euler Angles rotations:

Piogram:

Example 4: Computation of the angular velocities and using the Piogramusing the Piogram (continue – 4)

IB

IA

xBIB

yBIB

zBIB

A 'A 'B BxAIA

yAIA

zAIA

xBIB

yBIB

zBIB

B

A'AxAIA

yAIA

zAIA

'B

Piogram:

zBIB

yBIB

xBIB

zAIA

yAIA

xAIA

AIA

0

0

0

0

0

0

123

zAIA

yAIA

xAIA

zBIB

yBIB

xBIB

BIB

0

0

0

0

0

0 321

IAIBBAAAB xyz '' 111

The Piogram (continue – 8)

Page 61: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

61

ROTATIONSEuler Angles (continue – 9)

SOLO

321 Euler Angles rotations: 'A 'B BA

ccscs

sccssccssscs

sscsccsssccc

C BA 123

10

0

0

s

csc

scc

s

csc

scc

zBAB

yBAB

xBAB

zBAB

yBAB

xBAB

csscs

ccsc

sc

c

0

01

2sin

2cos

2sin

2cos

2sin

2cos

kjiqqqq zyx

BA

2sin

2sin

2sin

2cos

2cos

2cos0

q

2cos

2sin

2sin

2sin

2cos

2cos1

q

2sin

2cos

2sin

2cos

2sin

2cos2

q

2sin

2sin

2cos

2cos

2cos

2sin3

q

Piogram

Page 62: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

62

ROTATIONSEuler Angles (continue – 10)

SOLO

231 Euler Angles rotations:

Piogram

'A 'B BA

ccssssccsssc

scccs

csscsssccscc

C BA 132

0

10

0

csc

s

scc

csc

s

scc

zBAB

yBAB

xBAB

zBAB

yBAB

xBAB

ssccs

ccsc

sc

c

0

01

2sin

2cos

2sin

2cos

2sin

2cos

jkiqqqq yzx

BA

2sin

2sin

2sin

2cos

2cos

2cos0

q

2cos

2sin

2sin

2sin

2cos

2cos1

q

2sin

2cos

2sin

2cos

2sin

2cos2

q

2sin

2sin

2cos

2cos

2cos

2sin3

q

Page 63: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

63

ROTATIONSEuler Angles (continue – 11)

SOLO

312 Euler Angles rotations:

Piogram

'A 'B BA

ccscs

cscssccssccs

csssccsssscc

C BA 213

10

0

0

s

scc

csc

s

scc

csc

zBAB

yBAB

xBAB

zBAB

yBAB

xBAB

ccsss

sccc

cs

c

0

01

2sin

2cos

2sin

2cos

2sin

2cos

kijqqqq zxy

BA

2sin

2sin

2sin

2cos

2cos

2cos0

q

2cos

2sin

2sin

2sin

2cos

2cos1

q

2sin

2cos

2sin

2cos

2sin

2cos2

q

2sin

2sin

2cos

2cos

2cos

2sin3

q

Page 64: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

64

ROTATIONSEuler Angles (continue – 12)

SOLO

132 Euler Angles rotations:

Piogram'A 'B BA

ccssssccsscs

sccssccssccs

scscc

C BA 231

0

0

10

csc

scc

s

csc

scc

s

zBAB

yBAB

xBAB

zBAB

yBAB

xBAB

sscsc

ccsc

sc

c

0

01

2sin

2cos

2sin

2cos

2sin

2cos

ikjqqqq xzy

BA

2sin

2sin

2sin

2cos

2cos

2cos0

q

2cos

2sin

2sin

2sin

2cos

2cos1

q

2sin

2cos

2sin

2cos

2sin

2cos2

q

2sin

2sin

2cos

2cos

2cos

2sin3

q

Page 65: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

65

ROTATIONSEuler Angles (continue – 13)

SOLO

213 Euler Angles rotations:

Piogram'A 'B BA

ccsccssscssc

scccs

csssccsssscc

C BA 312

0

10

0

scc

s

ccs

scc

s

ccs

zBAB

yBAB

xBAB

zBAB

yBAB

xBAB

sccss

cscc

cs

c

0

01

2sin

2cos

2sin

2cos

2sin

2cos

jikqqqq yxz

BA

2sin

2sin

2sin

2cos

2cos

2cos0

q

2cos

2sin

2sin

2sin

2cos

2cos1

q

2sin

2cos

2sin

2cos

2sin

2cos2

q

2sin

2sin

2cos

2cos

2cos

2sin3

q

Page 66: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

66

ROTATIONSEuler Angles (continue – 14)

SOLO

123 Euler Angles rotations:

Piogram

'A 'B BA

ccssccscscss

csssscccsssc

ssccc

C BA 321

ccs

scc

s

ccs

scc

s

zBAB

yBAB

xBAB

0

0

01

zBAB

yBAB

xBAB

cs

sccc

csssc

c

0

01

2sin

2cos

2sin

2cos

2sin

2cos

ijkqqqq xyz

BA

2sin

2sin

2sin

2cos

2cos

2cos0

q

2cos

2sin

2sin

2sin

2cos

2cos1

q

2cos

2sin

2cos

2sin

2cos

2sin2

q

2sin

2sin

2cos

2cos

2cos

2sin3

q

Page 67: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

67

ROTATIONSEuler Angles (continue – 15)

SOLO

121 Euler Angles rotations:

Piogram'A 'B BA

11

22

212121212

212121212

11

11212

sscccscccscs

cssccccscsss

scssc

C BA

2

1

22

22

221

221

21

0

0

10

scs

css

c

scs

css

c

zBAB

yBAB

xBAB

zBAB

yBAB

xBAB

scscs

sscs

cs

s

22

22

22

2

1

0

01

2sin

2cos

2sin

2cos

2sin

2cos 2211

21

ijiqqqq xyxBA

2cos

2cos

2sin

2cos

2sin

2cos

2cos

2cos 212121

0

q

2sin

2cos

2sin

2cos

2cos

2cos

2cos

2sin 212121

1

q

2cos

2sin

2sin

2sin

2sin

2cos

2sin

2cos 212121

2

q

2sin

2sin

2sin

2sin

2cos

2cos

2sin

2sin 212121

3

q

Page 68: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

68

ROTATIONSEuler Angles (continue – 16)

SOLO

131 Euler Angles rotations:

Piogram

'A 'B BA

22

11

212121212

212121212

11

11312

ccscscssccss

scccsssccccs

ssscc

C BA

zBAB

yBAB

xBAB

scccs

csss

sc

s

22

22

22

2

1

0

01

2sin

2cos

2sin

2cos

2sin

2cos 2211

21

ikiqqqq xzxBA

zBAB

yBAB

xBAB

scccs

csss

sc

s

22

22

22

2

1

0

01

2cos

2cos

2sin

2cos

2sin

2cos

2cos

2cos 212121

0

q

2sin

2cos

2sin

2cos

2cos

2cos

2cos

2sin 212121

1

q

2sin

2sin

2cos

2sin

2sin

2sin

2sin

2cos 122121

2

q

2cos

2sin

2sin

2sin

2sin

2cos

2sin

2cos 212121

3

q

Page 69: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

69

ROTATIONSEuler Angles (continue – 17)

SOLO

212 Euler Angles rotations:

Piogram'A 'B BA

1

12

2

212122121

11

212122121

21122

cccsscsccssc

sccss

ccccsssscscc

C BA

2

1

22

22

221

21

221

0

10

0

scs

c

css

scs

c

css

zBAB

yBAB

xBAB

zBAB

yBAB

xBAB

ccssc

sscs

cs

s

22

22

22

2

1

0

01

2sin

2cos

2sin

2cos

2sin

2cos 2211

21

jijqqqq yxyBA

2cos

2cos

2sin

2cos

2sin

2cos

2cos

2cos 212121

0

q

2cos

2sin

2sin

2sin

2sin

2cos

2sin

2cos 212121

1

q

2sin

2cos

2sin

2cos

2cos

2cos

2cos

2sin 212121

2

q

2sin

2sin

2cos

2sin

2sin

2sin

2sin

2cos 212121

3

q

Page 70: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

70

ROTATIONSEuler Angles (continue – 18)

SOLO

232 Euler Angles rotations:

Piogram'A 'B BA

2

21

1

212122121

11

212122121

21322

ccscssscsscc

sscsc

scccscsssccc

C BA

2

1

22

22

221

21

221

0

10

0

css

c

scs

css

c

scs

zBAB

yBAB

xBAB

zBAB

yBAB

xBAB

scscc

csss

sc

s

22

22

22

2

1

0

01

2sin

2cos

2sin

2cos

2sin

2cos 2211

21

jkjqqqq yzyBA

2cos

2cos

2sin

2cos

2sin

2cos

2cos

2cos 212121

0

q

2sin

2sin

2sin

2sin

2cos

2cos

2sin

2sin 212121

1

q

2sin

2cos

2sin

2cos

2cos

2cos

2cos

2sin 212121

2

q

2cos

2sin

2sin

2sin

2sin

2cos

2sin

2cos 212121

3

q

Page 71: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

71

ROTATIONSEuler Angles (continue – 19)

SOLO

313 Euler Angles rotations:

Piogram

'A 'B BA

1

1

2

2

cscss

cscccssccssc

ssscccsscscc

C BA

11

221212121

221212121

31132

2

1

22

22

21

221

221

10

0

0

c

scs

css

c

scs

css

zBAB

yBAB

xBAB

zBAB

yBAB

xBAB

sccsc

sscs

cs

s

22

22

22

2

1

0

01

2sin

2cos

2sin

2cos

2sin

2cos 2211

21

kikqqqq zxzBA

2cos

2cos

2sin

2cos

2sin

2cos

2cos

2cos 212121

0

q

2cos

2sin

2sin

2sin

2sin

2cos

2sin

2cos 212121

1

q

2sin

2sin

2sin

2sin

2cos

2cos

2sin

2sin 212121

2

q

2sin

2cos

2sin

2cos

2cos

2cos

2cos

2sin 212121

3

q

Page 72: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

72

ROTATIONSEuler Angles (continue – 20)

SOLO

323 Euler Angles rotations:

Piogram

'A 'B BA

1

1

2

2

csssc

ssccscscsscc

csscccsssccc

C BA

11

221212121

221212121

31232

2

1

22

22

21

221

221

10

0

0

c

css

scs

c

css

scs

zBAB

yBAB

xBAB

zBAB

yBAB

xBAB

ssccc

csss

sc

s

22

22

22

2

1

0

01

2sin

2cos

2sin

2cos

2sin

2cos 2211

21

kjkqqqq zyzBA

2cos

2cos

2sin

2cos

2sin

2cos

2cos

2cos 212121

0

q

2sin

2sin

2cos

2sin

2sin

2sin

2sin

2cos 212121

1

q

2cos

2sin

2sin

2sin

2sin

2cos

2sin

2cos 212121

2

q

2sin

2cos

2sin

2cos

2cos

2cos

2cos

2sin 212121

3

q

Page 73: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

73

ROTATIONS

Cayley-Klein (or Euler) Parameters and Related Quantities

SOLO

Rotation Matrix in Three Dimensional Space

We saw that the rotation of a vector is given by x

cos1ˆˆsinˆ' xnnxnxx

xnRxnnnI x

ˆ,cos1ˆˆsinˆ33

The Rotation Matrix has the properties cos1ˆˆsinˆˆ, 3333

nnnInR xx

333333 ˆ,ˆ, xT

xx InRnR Ortho-normal

Unitary conjugatecomplexInRnR x

T

xx *33

*3333 ˆ,ˆ,

A Theorem from Matrix Algebra states:

Every unitary matrix U can be expressed as an exponential matrix

where H is hermitian (iH is skew-symmetric) iHU exp

Let find the hermitian matrix that corresponds to the Unitary Rotation Matrix.

Page 74: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

74

We found that the matrix has the following properties: n

Tx nnInn ˆˆˆˆ 33

nnnn ˆˆˆˆ

Tx nnInnnn ˆˆˆˆˆˆ 33

nn T ˆˆ skew-symmetric

ROTATIONS

Cayley-Klein (or Euler) Parameters and Related Quantities (continue – 1)SOLO

Rotation Matrix in Three Dimensional Space (continue – 1)

Define:

nM ˆ

Therefore Tx nnInnM ˆˆˆˆ 33222 MnM 333 ˆ

sinˆcos1ˆˆ

ˆ!3

ˆ)!4!2

1(ˆ

!3

1)

!4!21(

11

!31)

!4!2

1(

!4

1

!3

1

!2

1ˆexpexp

33

32

422

33

32

42

22

233

22

2

33

43233

nnnI

nnnI

MMMI

MMI

MMMMInM

x

x

x

x

x

nnnnInR xx ˆexpcos1ˆˆsinˆˆ, 3333

Page 75: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

75

ROTATIONS

Cayley-Klein (or Euler) Parameters and Related Quantities (continue – 2)SOLO

Rotation Matrix in Three Dimensional Space (continue – 2) One other way to write this is by using the following matrices:

010

100

000

1E

001

000

100

2E

000

001

010

3E

EnEnEnEn

nnn

nn

nn

nn

n

zyx

zyx

xy

xz

yz

ˆ

000

001

010

001

000

100

010

100

000

0

0

0

ˆ

321

Therefore

EnnnnnInR xx

ˆexpˆexpcos1ˆˆsinˆˆ, 3333

Page 76: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

76

ROTATIONS

Cayley-Klein (or Euler) Parameters and Related Quantities (continue – 3)SOLO

Rotation Matrix in Three Dimensional Space (continue – 3) One other way to obtain the same result is the following: compute first

sinˆˆcosˆ

cos1ˆsinˆˆˆ

cos1ˆˆˆsinˆˆˆ

cos1ˆˆsinˆˆˆ,ˆ 3333

nnn

nnnn

nnnnnn

nnnInnRn xx

sinˆˆcosˆˆ,33 nnn

d

ndR x

Therefore nRnd

ndRx

x ˆ,ˆˆ,

3333

Since is independent of , we can integrate this equation to obtain again: n

EnnnR x

� ˆexpˆexpˆ,33

Secondly compute

Page 77: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

77

ROTATIONS

Cayley-Klein (or Euler) Parameters and Related Quantities (continue – 4)SOLO

Euler ParametersThe quaternion that describes the rotation was found to be:

32100 , qkqjqiqqq

2/cos0 q n2/sin

zyx nqnqnq 2/sin&2/sin&2/sin 111

where satisfy the relations kji

,,

1 kjikkjjii

kijji

ijkkj

jkiik

The quaternions representing the vector in frames A and B arev

BBAA vvvv

,0&,0

The relation between those quaternions is given by: BBBA vqqqvqqvqv

0

2000

* 2,0,,0,

We want to perform the same operations using 2x2 matrices with complex entries.

10

01,

0

0,

01

10321

i

iPauli Spinor Matrices

For this let introduce the following definitions:

Page 78: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

78

ROTATIONS

Cayley-Klein (or Euler) Parameters and Related Quantities (continue – 5)SOLO

Euler Parameters (continue – 1)Define the operator as the transpose complex conjugate of a matrix A; i.e.: H

T *

TTH AAA **

We can see that 222211 && HHH

Matrices having the property are called hermitian.AAH

Pauli Spinor Matrices are hermitian with zero trace.

UnitaryII xH

x

H

122112211

11

10

01

01

10

01

10

They have the following properties:

UnitaryIIi

i

i

ix

Hx

H

222222222

22

10

01

0

0

0

0

UnitaryII xH

x

H

322332233

33

10

01

10

01

10

01

10

01,

0

0,

01

10321

i

i

W. PAULI

Page 79: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

79

ROTATIONS

Cayley-Klein (or Euler) Parameters and Related Quantities (continue – 6)SOLO

Euler Parameters (continue – 2)

Pauli Spinor Matrices properties (continue – 1):

321 0

0

0

0

01

10 i

i

i

i

i

312 0

0

01

10

0

0 i

i

i

i

i

132 0

0

10

01

0

0 i

i

i

i

i

123 0

0

0

0

10

01 i

i

i

i

i

213 0

0

01

10

01

10

10

01 i

i

ii

231 0

0

01

10

10

01

01

10 i

i

ii

2233321 xiIi

From those expressions we found that the relations between Pauli Matrices and the quaternions are:

or

kijiii

321 &&

321 && ikijii

10

01,

0

0,

01

10321

i

i

Page 80: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

80

ROTATIONS

Cayley-Klein (or Euler) Parameters and Related Quantities (continue – 7)SOLO

Euler Parameters (continue – 3)

By similarity with quaternions definition:

10

01,

0

0,

01

10321

i

i

knjninqq zyx

2/sin2/cos,0

the 2x2 Rotation Matrix is given by:

**3012

1230

3210

332211220

22

3212222

10

01

0

0

01

10

10

01

ˆ2/sin2/cos

2/sin2/cosˆ,

iqqiqq

iqqiqq

qi

iqqiq

qqqiIq

niI

nnniInR

x

x

zyxxx�

where

1230 & qiqqiq

Cayley-Klein Parameters

Page 81: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

81

ROTATIONS

Cayley-Klein (or Euler) Parameters and Related Quantities (continue – 8)SOLO

Euler Parameters (continue – 4)

10

01,

0

0,

01

10321

i

i

1230 & qiqqiq

Cayley-Klein Parameters

Arthur Cayley

(1821-1895)

Felix C. Klein

(1849-1925)

Cayley-Klein Parameters are constrained by

123

22

21

20

** qqqqThe quaternions representing the vector in frames A and B are

v

BBAA vvvv

,0&,0 Equivalently we define the 2x2 Matrix:

10

01

0

0

01

1032122 zAyAxAzAyAxA

Ax v

i

ivvvvvV

We have:

zAyAxA

yAxAzAAAx vivv

ivvvvV �

22

zByBxB

yBxBzBBBx vivv

ivvvvV �

22

Page 82: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

82

ROTATIONS

Cayley-Klein (or Euler) Parameters and Related Quantities (continue – 9)SOLO

Euler Parameters (continue – 5)

10

01,

0

0,

01

10321

i

i

The relation between those matrices is

zAyAxA

yAxAzAAAx vivv

ivvvvV �

22

zByBxB

yBxBzBBBx vivv

ivvvvV �

22

**

3012

123022 ˆ,

iqqiqq

iqqiqqnR x

3012

1230

3012

1230

iqqiqq

iqqiqq

vivv

ivvv

qqiqq

iqqiqq

vivv

ivvv

zAyAxA

yAxAzA

zByBxB

yBxBzB

nRVnRV xA

xxB

x ˆ,ˆ, 2222*

2222

or

Page 83: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

83

ROTATIONS

Cayley-Klein (or Euler) Parameters and Related Quantities (continue – 10)SOLO

10

01,

0

0,

01

10321

i

i

Elementary Features of the 2x2 Rotation Matrix

222222 ˆ,ˆ, xxx InRnR (1) nRnR xx ˆ,ˆ, 221

22

(2) 222222 ˆ,ˆ, xxH

x InRnR nR x ˆ,22 Unitary

1

222222

22

2222

ˆ,ˆ,ˆ2/sin2/cos

ˆ2/sin2/cos

ˆ2/sin2/cosˆ,

nRnRniI

niI

niInR

xxx

Hx

Hx

Hx

H

��

Proof

(3) 222ˆ xIn �

Proof 22

2222

2

2222

222222

ˆ2/sin2/cos

ˆ2/sin2/cosˆ2/sin2/cos

ˆ,ˆ,

xx

xx

xxx

InI

niIniI

nRnRI

��

q.e.d.

q.e.d.

Page 84: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

84

ROTATIONS

Cayley-Klein (or Euler) Parameters and Related Quantities (continue – 11)SOLO

10

01,

0

0,

01

10321

i

i

Elementary Features of the 2x2 Rotation Matrix (continue – 1)

(4) 0ˆ �ntrace

(5) 0ˆ,ˆˆˆ,:ˆ,ˆ, 222222 nRnnnRnnR xxx

(6) nRnid

nndRx

x ˆ,ˆ2

1ˆˆ,22

22

0ˆ 321321 tracentracentracennnntracentrace zyxzyx

�Proof

q.e.d.

222222 2/sinˆ2/cosˆˆ2/sin2/cosˆˆ, xxx IinnniInnR ���

Proof

222222 2/sinˆ2/cosˆ2/sin2/cosˆˆ,ˆ xxx IinniInnRn ���

q.e.d.

Proof

���

niIniniI

niId

d

d

nndR

xx

xx

ˆ2/sin2/cosˆ2

1ˆ2/cos

2

12/sin

2

1

ˆ2/sin2/cosˆˆ,

2222

2222

q.e.d.

Page 85: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

85

ROTATIONS

Cayley-Klein (or Euler) Parameters and Related Quantities (continue – 12)SOLO

Integrate the equation:

10

01,

0

0,

01

10321

i

i

Elementary Features of the 2x2 Rotation Matrix (continue – 2)

nRnid

nndRx

x ˆ,ˆ2

1ˆˆ,22

22

dninnR

nndR

x

x �

ˆ2

1ˆˆ,

ˆˆ,

22

22

��

ni

ninR x ˆ2

expˆ2

expˆ,22

������

ninininiH

HH

ˆ2

ˆ2

ˆ2

ˆ2

skew-hermitian

This is in accordance to the Theorem from Matrix Algebra that states:

Every unitary matrix U can be expressed as an exponential matrix

where H is hermitian (iH is skew-symmetric) iHU exp

Page 86: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

86

ROTATIONS

Cayley-Klein (or Euler) Parameters and Related Quantities (continue – 13)SOLO

Let show that we get back the Rotation Matrix

10

01,

0

0,

01

10321

i

i

Elementary Features of the 2x2 Rotation Matrix (continue – 3)

��

����

niI

Ini

IniI

ninininiI

ninR

x

xxx

x

x

ˆ2

sin2

cos

2!4

2!32!2

2

ˆ2!4

2!3

2!2

2

ˆ2

expˆ,

22

22

43

22

2

22

44

33

22

22

22

Therefore

��

niIninR xx ˆ

2sin

2cosˆ

2expˆ, 2222

This is a generalization of the de Moivre expression for complex numbers:

2sin

2cos

2exp

ii

Page 87: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

87

ROTATIONS

Cayley-Klein (or Euler) Parameters and Related Quantities (continue – 14)SOLO

10

01,

0

0,

01

10321

i

i

Elementary Features of the 2x2 Rotation Matrix (continue – 4)

(7)

Proof

q.e.d.

21222121 ˆˆˆˆˆˆ nniInnnn x �

zyx

yxz

zxy

xyz

xyyxyyxxzzyzzyzxxz

yzzyzxxzxyyxyyxxzz

zyx

yxz

zyx

yxz

nnnninn

nninnnninn

nninnnninn

nninnnninn

nnnninnnnnninnnninnnn

innnninnnnnnnninnnnnn

ninn

innn

ninn

innnnn

212121

212121

21

21212121

21212121

212121212121212121

212121212121212121

222

222

111

111

21

ˆˆˆˆˆˆ

ˆˆˆˆˆˆ

10

01ˆˆ

ˆˆˆˆˆˆˆˆ

ˆˆˆˆˆˆˆˆ

ˆˆ

Page 88: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

88

ROTATIONS

Cayley-Klein (or Euler) Parameters and Related Quantities (continue – 15)SOLO

10

01,

0

0,

01

10321

i

i

Elementary Features of the 2x2 Rotation Matrix (continue – 5)

(8)

Proof

q.e.d.

2121

2221

21222122

ˆˆ2

sin2

sinˆ2

sin2

cosˆ2

cos2

sin

ˆˆ2

sin2

sin2

cos2

cos

ˆ2

expˆ2

expˆ,ˆ,

nnnni

Inn

nininRnR

x

xx

��

��

��

��

��

��

21

21222122

21

2122

222122

21222122

ˆ2

sin2

cosˆ2

cos2

sin

ˆˆˆˆ2

sin2

sin2

cos2

cos

ˆ2

sin2

cosˆ2

cos2

sin

ˆˆ2

sin2

sin2

cos2

cos

ˆ2

sin2

cosˆ2

sin2

cos

ˆ2

expˆ2

expˆ,ˆ,

nini

nniInnI

nini

nnI

niIniI

nininRnR

xx

x

xx

xx

Page 89: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

89

ROTATIONS

Cayley-Klein (or Euler) Parameters and Related Quantities (continue – 16)SOLO

10

01,

0

0,

01

10321

i

i

Elementary Features of the 2x2 Rotation Matrix (continue – 6)

(9a)

2cos

2sin

2sin

2cos

01

10

2sin

10

01

2cos

2sin

2cos

02

20

exp01

10

2exp

2expˆ,

122

122

i

i

iiI

i

iiixR

x

x

2cos

2sin

2sin

2cos

0

0

2sin

10

01

2cos

2sin

2cos

02

20

exp0

0

2exp

2expˆ,

222

222

i

iiiI

i

iiiyR

x

x

Page 90: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

90

ROTATIONS

Cayley-Klein (or Euler) Parameters and Related Quantities (continue – 17)SOLO

10

01,

0

0,

01

10321

i

i

Elementary Features of the 2x2 Rotation Matrix (continue – 7)

(9b)

2exp0

02

exp

2sin

2cos0

02

sin2

cos

10

01

2sin

10

01

2cos

2sin

2cos

20

02exp

10

01

2exp

2expˆ,

322

322

i

i

i

i

iiI

i

iiizR

x

x

Page 91: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

91

ROTATIONS

Gibbs Vector SOLO

Using the quaternion notation we can define:

z

y

x

nq

qg

nq

qg

nq

qg

2/tan

2/tan

2/tan

0

33

0

22

0

11

0321 ˆˆˆ

qzgygxgg

2tanˆˆˆ

2tan 222222

32

22

1

zyx

T nnnggggggg

Gibbs in 1901 named this vector “vector semi-tangent of version”. Cayley used the three quantities in 1843 (before the introduction of vector notation), and credits their discovery to Rodriguez. Therefore they also called Euler-Rodriguez Parameters.

321 ,, ggg

Josiah Willard Gibbs

(1839-1903)

Page 92: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

92

ROTATIONS

Gibbs Vector (continue – 1) SOLO

cos1ˆˆsinˆˆ, 3333 nnnInRC xxBA

cos1ˆˆsinˆcos33 Tx nnnI

2sinˆ

2sinˆ2

2sinˆ

2cos2cos33

nnnI x

T

x nnnI2

tanˆ2

tanˆ2

cos22

tanˆ2

cos22

tan12

cos 222233

T

x nnnI2

tanˆ2

tanˆ22

tanˆ22

tan12

cos 233

2

TTxT

gggggIgg

221

1

133

321

3

2

1

12

13

232

32

22

123

22

21

2

0

0

0

21

100

010

001

1

1ggg

g

g

g

gg

gg

gg

gggggg

Therefore

23

22

21132231

1322

32

22

1321

2313212

32

22

1

23

22

21

122

212

221

1

1

ggggggggg

ggggggggg

ggggggggg

gggC BA

Page 93: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

93

ROTATIONS

Gibbs Vector (continue – 1) SOLO

Let perform the following computations

gIgggggIgg

gIC xTT

xTxBA

333333 221

1

1

gggggggggggggIgg

TTTTxT

221221

1

133

gIgggggIgg x

TTxT

3333 11

1

1

02 33 ggfIggedcba Tx

T

cbea

We obtained

1333333 221

1

1

gIgIgggggIgg

C xxTT

xT

BA

We can see that

2

32

22

1

23

22

21

1

33,32,21,1

ggg

gggCCCCtrace BA

BA

BA

BA

23

22

211

41

gggCtrace BA

Page 94: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

94

ROTATIONS

Gibbs Vector (continue – 2) SOLO

We found

23

22

21132231

1322

32

22

1321

2313212

32

22

1

23

22

21

122

212

221

1

1

ggggggggg

ggggggggg

ggggggggg

gggC BA

23

22

211

41

gggCtrace BA

Therefore

B

A

BA

BA

Ctrace

CCg

1

2,33,21

B

A

BA

BA

Ctrace

CCg

1

3,11,32

B

A

BA

BA

Ctrace

CCg

1

1,22,13

Gibbs vector is not widely used because it becomes infinite when the rotation angle is an odd multiply of 180 degrees.

Page 95: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

95

ROTATIONS

Gibbs Vector (continue – 3) SOLO

Differential of Gibbs Vector

Let differentiate the equation:0q

g

We have:

20

0

0 q

q

qg

Using the equation of quaternion differentiation:

BA

x

T

Iq

q

330

0

2

1

we obtain:

AB

Tx

qqI

q

q

qg

2

00332

0

0

0 2

1

or

ABT

x gggIg

332

1

Page 96: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

96

ROTATIONS

Gibbs Vector (continue – 4) SOLO

Differential of Gibbs Vector (continue – 1)

ABT

x gggIg

332

1

Let multiply this equation by and use: gI x

33

33xTT Igggggg

and 0

gg

ABT

xxx gggIgIggI

333333 2

1

ABTT

x gggggggggI

0

332

1

ABT

BAxTTT

x ggIggggggI 1

2

1

2

13333

We obtain: gg

ggIT

xAB

1

2 33

Page 97: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

97

ROTATIONS

ReferencesSOLO

[G] H. Goldstein, “Classical Mechanics”, Adison Wesley, 1980, 2nd Ed.

[H] Peter C. Hughes, “Spacecraft Attitude Dynamics”, John Wiley & Sons, 1986

[JT] John L. Junkins, James D. Turner, “Optimal Spacecraft Rotational

Maneuvers”, Elsevier, 1986

[McT] http://www-history.mcs.st-andrews.ac.uk/history

[MTW] Charles W. Misner, Kip S. Thorne, John Archibald Wheeler,

“Gravitation”, Freeman, 1973

[W] James E. Wertz, “Spacecraft Attitude Determination and Control”,

Reidel Publishing Company, 1985

[J] Peter Michael Jack’ site “Hypercomplex”

http://www.hypercomplex.com

[S] Malcom D. Shuster, “A Survey of Attitude Representations”, The Journal

of Aeronautical Science, Vol. 41, Oct.-Dec. 1993, pp. 439-517

Page 98: Rotation in 3d Space: Euler Angles, Quaternions, Marix Descriptions

April 13, 2023 98

SOLO

TechnionIsraeli Institute of Technology

1964 – 1968 BSc EE1968 – 1971 MSc EE

Israeli Air Force1970 – 1974

RAFAELIsraeli Armament Development Authority

1974 – 2013

Stanford University1983 – 1986 PhD AA