Download as pdf or txt
Download as pdf or txt
You are on page 1of 99

Chapter 2 Spatial descriptions and transformations

2.1 Introduction
2.2 Descriptions: position, orientations, and frames
2.3 Mappings
2.4 Operators
2.5 Summary of interpretations
2.6 Transformation arithmetic
2.7 Transformation equations
2.8 More on representation of orientation

1
Introduction
• Robotic manipulation implies that parts and
tools will be moved around in space by some
sort of mechanism.

• This naturally leads to a need for representation


position and orientation of parts.

• A coordinate system must be defined for such


representation.

2
Objectives of the Lecture
• Learn to represent position and orientation

• Be able to transform between coordinate systems

• Use frames and homogeneous coordinates

• Be able to solve transformation equations

• Understand more about representation of orientation

3
Basic concepts:
Coordinate system, vector, orientation, frame, graphical
representation, mapping, operator, homogeneous transformation,
compound and inverse transformation, transformation equations,
three angle representations (fixed angle and Euler angler),
equivalent angle-axis representation
• Basic formulas: Xˆ  Yˆ  Zˆ Ŷ  Ẑ  X̂ Ẑ  X̂  Ŷ R(2.3), T(2.9)

X̂B  X̂ A ŶB  X̂ A ẐB  X̂ A  A


BR
A
PBORG
  BT  
A
A A A A   
B R  X̂B ŶB ẐB   X̂B ŶA ŶB ŶA ẐB ŶA 
 X̂B  ẐA ŶB  ẐA ẐB  ẐA  0 0 0 1 
 ABR |BART APBORG
 A B
B RC R | BA R BPCORG  APBORG   
A A B   BAT 1BAT       |    
CT  T
B CT        |  
 0 0 0 | 
0 0 0| 1 
 1   
• Should be able to establish and solve transformation equation. 4
Coordinate System

Xˆ  Yˆ  Zˆ
Ŷ  Ẑ  X̂
Ẑ  X̂  Ŷ
5
Description of a Position
The location of any point in can be described as a 3×1 position
vector in a reference coordinate system {A}.

. {A}
ZA

AP

YA

XA
6
Description of a Position
point = position vector
{A}
ZA
 px  A number of independent movements an
object can make with respect to a coordinate
A
P   py  frame is called its number of degrees of
AP   freedom.

 pz  We need three-degrees of freedom


to descript position.

YA

XA
How to obtain {px, py, pz}?

Projection
7
A review of vectors
Vectors
• Column vector and row vector

 v1 
v 
v   2 vT  v1 v2  vn 

 
 vn 
• Norm of a vector

v  v12  v22  ...  vn2

8
Dot product of two vectors
Vector v and w

v  w | v || w | cos 
If |v|=|w|=1,
v
v  w  cos  
w

9
Inner product (dot product)
{A} p x  X̂ A  AP p y  Ŷ A  AP p z  Ẑ A  AP
ZA
 px   A
  
AP  X̂ A  P   X̂ A  A
A
P   py    Ŷ  A P    Ŷ A  P
 
 p z   A   
 Ẑ A  A P   Ẑ A 
YA
Projection

XA

10
Description of a Position
{A}
ZA position vector =point

AP
 Direction cosines :

cos 2   cos 2   cos 2   1
 YA
Projection

XA
For any given vector, we need three independent parameters
to determine its coordinates, i.e.: magnitude (1pareamter)
and direction parameters (2 parameters ).
11
{A}
ZA

Description of a Position
AP

YA

XA

• If { p x , p y , pz } are given, we can uniquely determine the


vector A P . ( Forward)
• If the vector A P is given, in order to obtain the coordinates,
we must project the vector A P on to the corresponding
axis. (Inverse)
px • Individual elements of a vector indicate distance along the
A
Ppy axes of {A}. Each of these distances along an axis can be
  thought of as the result of projecting the vector onto the
pz  corresponding axis.
• To achieve the projection, we must know the magnitude of
the vector and its direction related to each axis of the
coordinate system.
12
Orientation Description
Only the position information
is not sufficient to determine A
Ẑ A P
a rigid body in space.

Orientation of the body is needed


How to define and obtain orientation?
What is orientation?
The orientation of an object is described by a YˆA
set of angles.
How to describe an angle?
How to describe three angles with X̂ A
respect a coordinate system? 13
Orientation Description
In order to describe the orientation of a
Ẑ A
body we will attach a coordinate system Ẑ B
to the body.

The coordinate system {B} has been


X̂ B A
P YˆB
attached to the body in a known way.
YˆA
X̂ A

Thus, if we can describe the relationship between {B} and {A}, we


can determine the orientation of the body with respect to the {A}.
14
Orientation Description
• Coordinate System A
• Attach Frame Coordinate System B Ẑ B
Ẑ A
A coordinate system is made up by X̂ B
three-unit vectors. A
P YˆB
 r11   Xˆ A   Xˆ B  Xˆ A  r31  X̂ B  Ẑ A
A ˆ       r21  X̂ B ŶA
ˆ ˆ ˆ ˆ
X B  r21   YA   X B  X B  YA  YˆA
ˆ   ˆ ˆ 
r31   Z A   X B  Z A  r11  X̂ B  X̂ A

X̂ A
Projection
15
Orientation Description
• A frame is made up by three-unit vectors.
• The projection of a frame to its reference frame is equal to project
three vectors as a group to its reference frame.
• Stack three-unit vectors to form Rotation Matrix
A
B R   A Xˆ B A
YˆB A
Zˆ B  Ẑ B
Ẑ A
 r11 r12 r13  X̂ B
 r21 r22 r23  A
P YˆB
?  r31 r32 r33  r31  X̂ B  Ẑ A
r21  X̂ B  Ŷ A
Xˆ B  Xˆ A YˆB  Xˆ A ZˆB  Xˆ A 
  YˆA
  Xˆ B YˆA YˆB YˆA ZˆB YˆA  r11  X̂ B  X̂ A
ˆ ˆ 
 XB  ZA YˆB  ZˆA ZˆB  ZˆA  X̂ A 16 16

cosine matrix
Rotation Matrix
• Stack three-unit vectors to form Rotation Matrix
 Xˆ A   Xˆ B  Xˆ A YˆB  Xˆ A ZˆB  Xˆ A 
   
A
R   A ˆ
X A ˆ
Y A ˆ
Z    Yˆ   [ ˆ
X Yˆ ˆ
Z ]   ˆ Yˆ Yˆ Yˆ
X ˆ ˆ
ZB YA 
B  B B B
ˆ 
A B B B B A
ˆ ˆ ˆ ˆ
B A

ˆ ˆ
 XB  ZA YB  ZA ZB  ZA 
Z
 A 
A
• B R describes {B} with respect to {A} or the projection of
{B} on-to {A}, i.e., cosine matrix
• Each vector in BAR can be written as dot product of pair of
unit vectors.
• Rows of BAR : unit vectors of {A} with respect to {B}
A
• Column of B R: unit vectors of {B} with respect to {A}
• What is BAR1? What is det(BAR)?

17
Rotation Matrix
R   AXˆ B
A A
YˆB A
ZˆB  Directional
B
Cosines
T
Xˆ B  Xˆ A YˆB  Xˆ A ZˆB  Xˆ A 
B
X̂ A
 
  Xˆ B YˆA YˆB YˆA ZˆB YˆA  YˆA T
B

Directional ˆ ˆ ˆ ˆ ˆ ˆ  B ˆ T
Cosines  XB  ZA YB  ZA ZB  ZA  Z A

 B Xˆ AT 
BˆT B ˆ
  YA   X A  B
YˆA B ˆ T B T
Z A  AR
 B Zˆ AT 
 
B
A
R  B
A R T
18
Rotation Matrix
B
A
R  B
A R T

A
B R AB R  I  A
B R  AB R  1
1 T 1
B
A R T
 B
A R A
( R
B  A
B R )
For matrix M,
• If M-1 = MT , M is orthogonal matrix
• BA R is orthogonal!!

19
Orthogonal Matrix
A A ˆ
B R   XB

YB ZB 


 Xˆ B  Xˆ A YˆB  Xˆ A Zˆ B  Xˆ A 
 
  Xˆ B  YˆA YˆB  YˆA Zˆ B  YˆA 
 Xˆ B  Zˆ A YˆB  Zˆ A Zˆ B  Zˆ A 
 
 cos X B X A cos YB X A cos Z B X A 
  cos X BYA cos YBYA cos Z BYA 
 
 cos X B Z A cos YB Z A cos Z B Z A 
 r11 r12 r13 
  r21 r22 r23  (2.3)
 
 r31 r32 r33 

9 Parameters to describe orientation! 20


Rotation Matrix
Xˆ B  Xˆ A YˆB  Xˆ A ZˆB  Xˆ A Xˆ B  Xˆ A
T
YˆB  Xˆ A ZˆB  Xˆ A 
A A T   
BR BR  I  Xˆ B YˆA ˆ ˆ ˆ ˆ
YB YA ZB YA  Xˆ B YˆA ˆ ˆ ˆ ˆ
YB YA ZB YA   I
ˆ ˆ  
 XB  ZA YˆB  ZˆA ZˆB  ZˆA  Xˆ B  ZˆA YˆB  ZˆA ZˆB  ZˆA 

T
r11 r12 r13r11 r12 r13
  
 21 22 23 21 22 23  I
r r r r r r
r31 r32 r33
r31 r32 r33
How many independent parameters are needed in order to
determine the BA R ?
Three
21
Summary
• Position  represented a point at space  described
by a vector (needs three independent parameters: 2
for direction, 1 for magnitude) (3 DOF for position)
• Orientation  represented by an attached coordinate
system  described by three mutually orthogonal unit
vectors  matrix (needs three independent parameters:
3 for orientation) (3DOF for orientation)

Why ? (3DOF for orientation)


X̂ A  Ŷ A  0 X̂ A  Ẑ A  0 Ŷ A  Ẑ A  0
X̂ A  Ŷ A  Ẑ A  1
22
Description of a Frame
The information needed to completely specify where is the
manipulator hand is.
Ẑ A
• Frame: set of four vectors Ẑ B
giving position + orientation X̂B
A
• Description of a frame: P YˆB
position + rotation matrix

{B}  B R, PBORG 
Ex.: A A YˆA

• Position: frame with identity as rotation


• Orientation: frame with zero position X̂ A
23
Description of a Frame
A graphical representation of frames is convenient in
visualizing frames.
This vector represents the Ẑ A
position of the origin at the Ẑ B
head of the arrow in terms
of the frame at the tail of the X̂ B
arrow. A
PBORG YˆB
The direction of this locating
arrow tell us, that {B} is known
YˆA
relative to {A} and not vice versa.
{B} {BA R, APBORG }
X̂ A
24
Graphical Representation
{A} {Au R,uPAORG} {B} {Bu R,uPBORG} {BAR, APBORG}
{B} {Bu R,u PBORG}
{B} {BA R , A PBORG } Ẑ A Ẑ B
{B}
Point
Ẑ u u X̂ B
PBORG A
PBORG YˆB
{U} Yˆu
u
YˆA
PAORG {A}
X̂ u 25
X̂ A
What is the relationship between descriptions of the same point in two different frames?
Mapping: changing the description from one
frame to another
In a great many of the problem in robotics, we are concerned
with expressing the same quantity in terms of various reference
coordinate systems. Hence Mapping is considered here.

• Mapping a vector from one frame to another, or changing


the description form one frame to another, is an extremely
important concept.

• The key point of mapping is that the quantity itself in space


is not changed; only its description is changed.

26
Mapping –involving translation frames
Ẑ A Ẑ B
B
P
A
PBORG A
P
X̂ B YˆB

YˆA

If {A} has same orientation as {B}, then {B} differs from {A} in a
X̂ A
translation: A P
BORG
A
P  APBORG  BP
Mapping: change of description from one frame to another. The vector A PBORG
defines the mapping. 27
Mapping –involving translation frames
Ẑ A Ẑ B
A
P  APBORG  BP
B
P Homogeneous mapping
A
PBORG A
P  AP A  B P
X̂ B YˆB    BT  
1 1
YˆA A “1” added here
 
 I A
PBORG 
X̂ A BT 
A  
 
 
 0 0 0 1 
Mapping: change of description from one frame to another. The vector A PBORG
defines the mapping.
28
Mapping-involving rotated frames
Ẑ A
 Px   Xˆ A  PO   Xˆ A 
A

Ẑ B    
P A
P   Py    YˆA  PO    YˆA   PO
 Pz   Zˆ A  PO   Zˆ A 
   
 Px   Xˆ B  PO   Xˆ B 
B

   ˆ   ˆ 
B
P   Py    YB  PO    YB   PO
O
YˆA  Pz   Zˆ B  PO   Zˆ B 
   
PO  B Px Xˆ B  B PyYˆB  B Pz Zˆ B
X̂ A
X̂ B
PO  APx Xˆ A  APyYˆA  APz Zˆ A
29
Mapping involving rotated frames
A
 Px   X̂ A  PO   X̂ A 
Ẑ B Ẑ A    
A
P   Py    Ŷ A  PO    Ŷ A   PO
P  
 Pz   Ẑ A  PO   Ẑ A 

PO  B Px Xˆ B  B Py YˆB  B Pz Zˆ B
B
YˆA  Px 
O  [ X̂ B ŶB Ẑ B ]  Py 
 
A B  Pz 
X̂ A  Px   X̂ A   Px 
 P    Ŷ   [ X̂ Ẑ B ]  Py 
X̂ B  y  A  B ŶB  
 Pz   Ẑ A   Pz 

A
P  BAR BP 30
Orthogonal Matrix
 
X̂A
 
A
BR   A Xˆ B Aˆ
YB Z B   Ŷ   X̂B ŶB ẐB
Aˆ 
  A
 
 ẐA 
 Xˆ B  Xˆ A YˆB  Xˆ A Zˆ B  Xˆ A 
 
  Xˆ B  YˆA YˆB  YˆA Zˆ B  YˆA 
 Xˆ B  Zˆ A YˆB  Zˆ A Zˆ B  Zˆ A 
 
 cos X B X A cos YB X A cos Z B X A 
  cos X BYA cos YBYA cos Z BYA 
 
 cos X B Z A cos YB Z A cos Z B Z A 
 r11 r12 r13 
  r21 r22 r23  (2.3)
 
 r31 r32 r33  31
Mapping involving rotated frames
B
Ẑ B Ẑ A Px   X̂ B  PO  X̂ B 
   
P B
P Py    ŶB  PO   ŶB   PO
 
 Pz   ẐB  PO  ẐB 
PO  A
P Xˆ  AP Yˆ  AP Zˆ
YˆA x A y A Az A
 Px 
O
 [ Xˆ A YˆA Zˆ A ]  Py 
B A
Px   X̂ B  Px   Pz 
X̂ B P    Ŷ  [ X̂ Ŷ Ẑ ] P 
 y  B  A A A  y
 Pz   ẐB   Pz 
B
P  ABR AP 32
Mapping – rotation frames A
P  BAR BP
Ẑ A Homogeneous mapping
Ẑ B  AP A  B P
B
P    BT  
YˆB 1 1

 
YˆA  A
R 0 
BT 
A  B 
 
X̂ A  
X̂ B
0 0 0 1
33
Mapping involving general frame
Ẑ A
Ẑ B RAB
P
ˆ
YB B
A
PBORG A
P
X̂ B

YˆA

A
P 
X̂ A
34
General Frame Mapping
A
PBAR BP APBORG
BP
AP
XB
ZA ZB Replace by the more appealing
{B}
AP
equation using homogeneous
BORG
mapping:
YB
{A} YA
 AP   AR A
PBORG   B P
  B  
XA  1  0 0 0 1   1 

A “1” added here A row added here


35
Homogeneous Coordinates
• Homogeneous coordinates: embed 3D vectors into
4D by adding a “1”

• More generally, the transformation matrix T has the


form:

 Rot. Matrix Trans. Vector 


T  
 Perspect. Trans. Scaling Factor 

36
Homogeneous Transformation: Robotics
A
P  BA R B P  A PBORG
 A Px   A
PBORG _ x   B Px 
A   A A  B 
 Py    B R PBORG _ y   Py 
 A Pz   A
PBORG _ z   B Pz 
    
 1  0 0 0 1  1 
A
T
B
A
P[ 41]  T
A
B 4 4
B
P
[ 41]

37
Example A
P  BA R B P  APBORG
B
P

A
P
B
P A
P
=?
A A B A  BAR A
PBORG 
A
PBORG 
P  BT P BT   
 0 1 
( Using projection )
1 0 0 0 0  A
  A Xˆ B Aˆ A
Zˆ B 
0 BR 
YB

Homogeneous
 P0 1 3  1 
P  0 0
A

Transform BT 
A B
1 
BORG

0 1 0 1 1  0 0  1


       
0 0 0 1 1  0  
 2   0  1   0 
A
P  ABT B P  B
P 
2
  38
1 
Operators

• Operators can translate points and rotate vectors or


do both within the given frame.

•The same mathematical forms used to map points


between frames can also be interpreted as operators.

39
Translational Operator
• Translational operator
A
Ẑ A A P2
P1

A
A
P2  AP1  AQ
Q
A
P2  DQ ( q ) AP1
YˆA
1 0 0 qx 
X̂ A 0 1 0 qy 
2 2
q  qx  q y  qz
2
DQ ( q )   
0 0 1 qz 
 
0 0 0 1
40
Translational Operator
• Translational operator

A
Ẑ A P1
A
P2

A
A
P2  AP1  AQ
Q
A
P2  DQ (  q ) AP1
YˆA
1 0 0  qx 
0 1 0  q y  2 2 2
X̂ A DQ ( q)   q  qx  q y  qz
0 0 1  qz 
 
0 0 0 1  41
Rotational Operator
Rotational Operator - Operator on a vector AP1
and changes that vector to a new vector AP2 ,by
means of a rotation R.
A
P2  R AP1
Note: The rotation matrix which rotates vectors through
the same rotation R, is the same as the rotation which
describes a frame rotated by R relative to the reference
frame.
A
P  BAR BP (mapping)
A
P2  R AP1 (operator) 42
Rotational Operator
A
B R   A Xˆ B YˆB
A A
Zˆ B 

YˆA
B
P1  AP2  Xˆ B  Xˆ A YˆB  Xˆ A Zˆ B  Xˆ A 
YˆB A

ˆ ˆ ˆ ˆ ˆ ˆ

P1   X B  YA YB  YA Z B  YA 
 ˆ ˆ ˆ  Zˆ ˆ  Zˆ 
X
 B A  Z Y B A Z B A

A
 P2  cos θ cos (90  θ ) cos 90 
 X̂ B  
  cos (90  θ ) cos θ cos 90 

 cos 90 cos 90 
cos 0  
X̂ A  
 cos θ  sin θ 0 
  sin θ cos θ 0 
Ẑ A  0 0 1 
43
Transformation operators
As with vectors and rotation matrices, a frame has
another interpretation as a transformation operator.
The operator T rotates and translates a vector to
computer a new vector, within the same frame.
Thus
R QA
A
P2 T P1 
A
 P1
0 1
The transform which rotates by R and translation
by Q is the same as the transform which describes a
frame rotated by R and translated by Q relative to
the reference frame.

44
Homogeneous Transform-Summary of Interpretation
• As a general tool to represent a frame we have introduced
the homogeneous transformation, a 4×4 matrix containing
orientation and position information.
 A
R A
PBORG
BT  
A B

0 0 0 1 
• Three interpretations of the homogeneous transformation :
1. It is a description of a frame.
2. It is a transform mapping.
3. It is a transform operator.
R Q A
A
P2 T P1 
A
 P1
0 1 45
Homogeneous Transform Interpretations
Description of a frame
A
BT : {B}  BA R PBORG 
 BAR A
PBORG
A
BT  
0 0 0 1 
Transform mapping
A
BT : BP  AP A
P  BA T BP

Transform Operator
T : P1  P2 P2  TP1
 R Q
T  
0 0 0 1  46
Transformation Arithmetic –Compound Transformations
Given: Vector c P Frame {C} is known relative to frame {B}  CB T
Frame {B} is known relative to frame {A}  AB T
Calculate: Vector A P
A
P  ABT BP B
P
B
P  CB T CP ?
A
P ABT BP ABT CBT CP
A A B
C T  BT CT

 CAR | APCORG  BA RCBR | BA R BPCORG  APBORG 


A    
CT       |    
        |    
0 0 0| 1   0 0 0 | 1 
  
47
Transformation Arithmetic –Inverse Transformations
Given: Description of frame {B} relative to frame {A}  ABT  ( BAR, APBORG )
Calculate: Description of frame {A} relative to frame {B}  BT  ( BR , B P
A A AORG )
Homogeneous Transform ?

 ABR | BPAORG {B}


B
AT  
     |   

 
0 0 0| 1 
  {B} B
B
PAORG
PAORG
B
PAORG  ?
B
PAORG APBORG ??

B
PAORG  BAR T A PBORG   AB R A PBORG
48
Inverse Transform

49
Example 0.866

 0.500 0.000 4.0 
 BA R A
PBORG  0.500 0.866 0.000 3.0 
Given: A
BT   
 0 1  0.000 0.000 1 0 .0 
 
 0 0 0 1 
Find:  0.866 0.500 0
B
T  ? A T
R   0.500 0.866 0
A B  
 0 0 1
 0.866 0.500 04.0 4.964
BART APBORG   0.500 0.866 03.0  0.598
    
 0 0 10.0  0 
 0.866 0.500 0.000  4.964
 BA RT |  BART A PBORG   
B
     0.500 0.866 0.000  0.598
AT       |     0.000 0.000 1.000 .
0.0 
 0 0 0 | 1   
  50
 0 0 0 1 
Transform Equation

51
Transform Equation
U U A
DT  AT DT

U U B C
DT  BT CT DT

U A U B C
AT DT  BT CT DT

52
Transform Equation

U U D 1 D
C T  AT AT CT

U U B
C T  BT CT

U
B T CBT  UAT DAT 1 DCT
U
AT  ?
U B D 1 D
U
A T  BT CT CT AT  UBT CBT CDT DAT
53
Example
Given BTT , BST and GS T
T
GT ?

𝑇= 𝑇 𝑇

B B T
GT  T T GT

B T B S
T T GT  S T GT

T B 1 B S
GT  T T ST GT

54
Transform Equation (second approach)

T=?

55
Transform Equation (second approach)

56
Assignment 0 0 T
 I
1R 1R

T
 Xˆ1  Xˆ 0
Yˆ1  Xˆ0 Zˆ1  Xˆ 0 Xˆ1  Xˆ 0 Yˆ1  Xˆ 0 Zˆ1  Xˆ 0 
  
 Xˆ1 Yˆ0
ˆ ˆ ˆ ˆ ˆ ˆ ˆ ˆ
Y1 Y0 Z1 Y0  X1 Y0 Y1 Y0 Z1 Y0   I ˆ ˆ
ˆ ˆ  ˆ ˆ ˆ ˆ ˆ ˆ 
Yˆ1  Zˆ0 Zˆ1  Zˆ0 
 X1  Z0  X1  Z0 Y1  Z0 Z1  Z0 
120 0
T
r11 r12 r13r11 r12 r13 r11 r12 r13r11 r21 r31
300
     
r r r r r r  r r r r
 21 22 23 21 22 23  21 22 23 12 22 32 r r
60 0 r31 r32 r33
r31 r32 r33 r31 r32 r33
r13 r23 r33
1 0 0 
𝑟 + 𝑟r11 +r𝑟21 =r31𝑟  +𝑟
2 2 2
r21  +𝑟
2
r22  r=23 𝑟 r+
2 2

𝑟 r32+𝑟 r33 =11
2 2 2  I   0 1 0 
31

r11r21  r12 r22  r13r23  0  0 0 1 


r11r31  r12 r32  r13r33  0
Multiple solutions
r21r31  r22 r32  r23r33  0
57
Check your answer by drawing the frames accordingly
ˆ ˆ Yˆ1  Xˆ 0 Zˆ1  Xˆ 0 
r11 r12 r13   X1  X0
    0
ˆ ˆ Y1 Y0 Z1 Y0    Xˆ1
ˆ ˆ ˆ ˆ Yˆ1 Zˆ1 
1 R  r21 r22 r23    X1 Y0
0 0 0

r31 r32 r33   Xˆ  Zˆ Yˆ1  Zˆ0 Zˆ1  Zˆ0 



 1 0

Inverse the projection

Xˆ 0  Xˆ1 Yˆ0  Xˆ1 Zˆ0  Xˆ1 


 
   Xˆ 0 Yˆ1 Yˆ0 Yˆ1 Zˆ0 Yˆ1   1Xˆ 0 1Yˆ0 Zˆ0 
1 1 T 1
0 R 0 R
ˆ ˆ 
 X0  Z1 Yˆ0  Zˆ1 Zˆ0  Zˆ1 

There should be only one that is correct among all the possible solutions.
Eigenvalues and Eigenvectors
• Definition Let A be an n-by-n matrix over a filed F. if X is an n by
1 nonzero matrix with entries from F, and if  is an element of F
such that
AX=X,
• Then X is said to be an eigenvector (characteristic vector) of the
matrix A corresponding to the eigenvalue  of the matrix A.
If A is an n-by-n matrix over F, the matrix equation AX=X
can be restated as
( A  I n ) X  0,
which is the matrix representation of a system of homogeneous linear
equations over F having a nonzero solution in F if and only if  in F the
rank of ( A  I n ) is less than n; that is, if and only if in F, det( A  I n )=0.
59
Eigenvalues and Eigenvectors
• The polynomial equation of nth degree, det ( A  I n ) =0,
Is known as the characteristic equation, and its roots in F are
the desired characteristic values, or the eigenvalues.

• Once the eigenvalues have been found, we can then solve


the homogeneous system ( A  I n ) X  0,
for nonzero X, the eigenvector.

HW No.1 : AX=X,
When =1 AX=X
What is the physical meaning of X?
60
Assignment

{3}

 BAR PBORG
A
T 
A
B 
0 0 0 1 
{2}
{1}

61
Assignment
3. Referring to Fig. 3, a) draw the graphical representations and
obtain the expressions of CAT , CAT and ABT , accordingly; b) calculate
the values of CAT , CAT and ABT , respectively.

Fig. 3 Frames at the corners of a wedge.


More on Rotations
•We saw that a rotation can be represented by a rotation matrix
A
BR   A Xˆ B Aˆ
YB A
Zˆ B 
 
 Xˆ B  Xˆ A YˆB  Xˆ A Zˆ B  Xˆ A 
 
  Xˆ B  YˆA YˆB  YˆA Zˆ B  YˆA 
 Xˆ B  Zˆ A YˆB  Zˆ A Zˆ B  Zˆ A 
 
cos X B X A cos YB X A cos Z B X A 
  cos X BYA cos YBYA cos Z BYA 
 
 cos X B Z A cos YB Z A cos Z B Z A 
 r11 r12 r13  Constraints:
  r21 r22 r23   r1 r2 r3  (2.3) r1  r2  r3  1
 
 r31 r32 r33 
r1  r2  r1  r3  r2  r3  0
9 Parameters to describe orientation!
•The Rotational Matrix has only three independent parameters
(9 variables and 6+ constraints) 63
More on Rotations
Rotation matrices may be called proper orthonormal matrices,
where “proper” refers to the fact that the determinant is +1
(non-proper orthonormal matrices have the determinant -1).

R  (I3  S)1(I3  S),

 0  sx sy 
 
S   sx 0  s z  (skew-symmetric matrix)
 s y sz 0 

S  ST  0 S  ST
64
More on Rotations
• Rotation matrix can be obtained by directly projection of frame {B}
on to {A}as we shown in previous lecture.

• Rotation matrix can also be parameterized in different manners:


-Roll, pitch and yaw angles
-Euler Angles
-Others

• Rotations are far from intuitive: they do not commute!

65
Rotations do not commute!
• We may have a hard time describing and specifying
orientations in three-dimensional space. One difficulty is that
rotations don’t generally commute.
A B B A
R
B C RC RBR
• The fact that the order of rotation is important should not be
surprising: it is since we use the matrix to represent rotations
(or orientations). Multiplication of matrices is not
commutative in general.

• Using rotation matrix to represent orientation, a representation


that requires only three parameters would be simpler.
66
{A}
Rotation matrix about principal axes
ZA AP  px 
Projection of the vector A
P   py 
 
Position  pz 
XA
 Xˆ B  Xˆ A YˆB  Xˆ A Zˆ B  Xˆ A 
Projection of frame: BA R   Xˆ B  YˆA YˆB  YˆA Zˆ B  YˆA 

 Xˆ B  Zˆ A YˆB  Zˆ A Zˆ B  Zˆ A 

1 0 0   cos  0 sin    cos  sin  0
Orientation
Rx ( )  0 cos  sin   R y ( )   0 1 0  Rz ( )   sin  cos 0
     
0 sin  cos     sin  0 cos    0 0 1 

Three independent rotation around the principal-axes matrices will represent an orientation matrix.
R x R y Rz  R x Rz R y  R x R z R x  R x R y R x
Total 12 possible sets :
R y R x Rz  R y Rz R x  R y R z R y  R y R x R y
Rz R x R y  Rz R y R x  R z R x R z  R z R y R z 67
Three Angle Representations

Euler Angles
Fixed Angles (12 sets)
(12 sets)

Total 24 possible sets


68
X-Y-Z fixed angle
Start with frame {B} coincident with a know reference frame {A}.
 Rotate frame {B} about X̂ A by an angle  

 Rotate frame {B} about Ŷ A by an angle   Fixed Angles
 Rotate frame {B} about Ẑ A by an angle  

Note- Each of the three rotations takes place about an axis in the
fixed reference frame {A}. 69
X-Y-Z fixed angle
𝑉 –The rotations performed about an
v axis of a fixed reference frame
𝑉

𝑉
•Operator

70
X-Y-Z fixed angle
A A
B R  B RXYZ ( ,  , )  RZ ( )RY ( )RX ( )

c  s 0  c 0 s  1 0 0 
 s c 0  0 1 0  0 c  s 
   
 0 0 1  s 0 c  0 s c 

cc css  sc csc  ss 


A
R ( ,  , )  sc sss  cc ssc  cs 
B XYZ  
  s cs cc 

71
Inverse Problem
Given : A
(  ,  , ) Solving for  ,  , and 
B R XYZ

(Known in value) (Known in structure )


For − 90 ≤ 𝛽 ≤ 90
𝛽 = Atan2(−𝑟 , 𝑟 + 𝑟 )
𝛼 = Atan2(𝑟 /𝑐𝛽, 𝑟 /𝑐𝛽)
𝛾 = Atan2(𝑟 /𝑐𝛽, 𝑟 /𝑐𝛽)
If   900 (in case cβ  0),
  900
  0 .0
   Atna2( r12 ,r22 ) 72
Two-argument arc tangent function: Atan2
y
Atan2 (y,x) computes tan 1 ( ) but uses the signs of both x and
x
y to identify the quadrant in which the resulting angles lies.

However, for single-argument function, we have , a


distinction which would be lost with a single-argument
act tangent function

73
Two-argument arc tangent function: Atan2
In terms of the standard arctan (y/x) function:, whose range is
(−π/2, π/2), it can be expressed as follows:
 y
 arctan( ) x  0 (I,V)
x

arctan( y )  π y  0, x  0 (II) Ŷ
 x

arctan( y )  π y  0, x  0 (III)
atan2( y, x)   x X̂
 π
?
  y  0, x  0
 2
 π
  y , x  0
 2
 undefined y  0, x  0
74
Singularities

Example
 0  s (   ) c(   )
c  0, s  1 A  c(   ) s(   ) 
BR  0
 
  1 0 0 

0  s(   )  c(   )
c  0, s  1 A  c(   )  s (   ) 
B R  0 
1 0 0 

75
Z-Y-X Euler Angles
Start with frame {B} coincident with a know reference frame {A}.
Rotate frame {B} about Zˆ A by an angle α 

Rotate frame {B} about YˆB by an angle β  Euler Angles

Rotate frame {B} about Xˆ B by an angle γ 

Note- Each rotation is performed about an axis of the moving


frame {B}, rather than in the fixed reference frame {A}. 76
Z-Y-X Euler Angles –The rotations performed about an
axis of a moving reference frame
–The rotations performed

A A B B 
B R  B R B  R B R
A
BR  RZ ( ) RY (  ) R X ( )
77
Z-Y-X Euler Angles
A A B B
B RZ Y X  ( ,  ,  )B RB R B R  RZ ( )RY ( )RX ( )
c  s 0 c 0 s1 0 0 
 s c 0 0 1 0 0 c  s 
   
 0 0 1 s 0 c0 s c 

c c𝑐𝛼𝑠𝛽𝑠𝛾
r11 r21 r31 c𝑐𝛼𝑐𝛽 ss − 𝑠𝛼𝑐𝛾
sc c𝑐𝛼𝑠𝛽𝑐𝛾
sc + 𝑠𝛼𝑠𝛾
ss 
𝑅 〖(_𝐵^𝐴)𝑅〗
A
R ( , , )  r r r   s𝑠𝛼𝑐𝛽  c −𝑠𝛼𝑠𝛽𝑠𝛾 + 𝑐𝛼𝑐𝛾 −𝑠𝛼𝑠𝛽𝑐𝛾 − 𝑐𝛼𝑠𝛾
css𝑐𝛽𝑠𝛾
  cc ssc𝑐𝛽𝑐𝛾
  cs
_(𝑍^′ 𝑌^′B𝑋^′XYZ
) (𝛼, 𝛽, 𝛾)  𝛾21 22 23  −𝑠𝛽 
r31 r32 r33   s cs cc 
78
Fixed vs. Euler Angles
X-Y-Z Fixed Angles (operator)
R XYZ ( ,  ,  )  RZ ( ) RY (  ) R X ( )

Z-Y-X Euler Angles (Mapping)


RZ 'Y ' X ' (α, β , γ)  RZ ' (α ) RY ' ( β ) RX ' (γ)

RXYZ (γ, β , α )  RZ 'Y ' X ' (α, β , γ)


Three rotations taken about fixed axes (Fixed Angles) yield the same
final orientation as the same three rotations taken in an opposite order
About the axes of the moving frame (Euler Angles).
Operator: pre-multiple; Mapping: post-multiple. 79
Other angle-set conventions
• In the preceding subsections we have seen two conventions
for specifying orientation: X-Y-Z fixed angles, Z-Y-X Euler
angles.

• Each of these conventions requires performing three


rotations about principal axes in a certain order.

•These conventions are examples of a set of 24 conventions


that we will call angle-set conventions (See Appendix B).
?

80
Equivalent angle-axis representation
k x2  k y2  k z2  1

 k x k x vθ  cθ k x k y vθ  k z sθ k x k z vθ  k y sθ 
 
Rk (θ )   k x k y vθ  k z sθ k y k y vθ  cθ k y k z vθ  k x sθ  (2.80)
 k x k z vθ  k y sθ k y k z vθ  k x sθ k z k z vθ  cθ 

( sθ  sin θ cθ  cos θ )

81
Equivalent angle-axis representation
 k x k x vθ  cθ k x k y vθ  k z sθ k x k z vθ  k y sθ 
 
Rk (θ )   k x k y vθ  k z sθ k y k y vθ  cθ k y k z vθ  k x sθ  (2.80)
 k x k z vθ  k y sθ k y k z vθ  k x sθ k z k z vθ  cθ 

How to obtain (2.80)?
There are several ways in which the matrix R A Kˆ ( ) can be
derived. Perhaps the simplest way is to rotate the vector A Kˆ
into one of the coordinate axes, say Ẑ A, then treated this axis
as the vector A Kˆ rotating about it by θ, and finally rotate
back to its original position.

82
Equivalent angle-axis representation
Ẑ A Fixed frame or
θ
moving frame?
β Fixed Frame
k’

operator
Ŷ A

X̂ A

83
Equivalent angle-axis representation
Ẑ A
θ Fixed frame or
moving frame?
β
Fixed Frame

operator
Ŷ A

X̂ A R A Kˆ (θ )  RZˆ (α ) RYˆ ( β ) RZˆ (θ ) RYˆ ( β ) RZˆ (α )


A A A A A

 T (α, β ) RZˆ (θ )T 1 (α, β )


A

 k x k x vθ  cθ k x k y vθ  k z sθ k x k z vθ  k y sθ 
 
Rk (θ )   k x k y vθ  k z sθ k y k y vθ  cθ k y k z vθ  k x sθ  (2.80)
 k x k z vθ  k y sθ k y k z vθ  k x sθ k z k z vθ  cθ 
 84
Similarity Transformation
• Definition Let A and B be n by n matrices
over F. Matrix A is said to be similar to
matrix B if there exists an invertible matrix
P over F such that
B  P1AP.
• Theorem 1. If A is similar to B, then A and
B have the same characteristic value
(eigenvalue);
n
• Det A =Det B. tr A  tr B; (trA aii )
i1

What is the geometric meaning of similarity?


85
Example
•A frame {B} is described as initially coincident with {A}.
We then rotate {B} about the vector A Kˆ  [0.707 0.707 0.707]T ,
which passes through the point, A P  [1.0 2.0 3.0]T
by an amount   30 0. Give the frame description of {B}.

• Since the vector does not pass


through the origin of {A}, the
equation we have cannot be used
directly to solve this example.

• We need to build up the connections


so that the equation can be used. 86
Example
• Using similarity transformation

Fixed frame or
moving frame?

mapping
Example
 
•The transform equation is ABT  AAT ABT BBT
1 0 0 1 1 0 0  1
0 1 0 2 0 1 0  2
A
AT 
  B A 1
BT  AT  
0 0 1 3 0 0 1  3
   
0 0 0 1 0 0 0 1

 0.933 0.068 0.345 0


 0.067 0.933  0.354 0
A
B T 
 
 0.354 0.354 0.866 0
 
 0 0 0 1
•The final result  0.933 0.068 0.345  1.13
 
A A A B    0.067 0.933  0.354 1.13 
BT  AT B T BT   0.354 0.354 0.866 0.05 
 
 0 0 0 1  88
Example
• A rotation about an axis that does not pass through the
origin causes a change in position, plus the same final
orientation as if the axis has passed through the origin.

• Note that we could have any definition of {A’} and {B’} such that
their origins were on the axis of rotation.

•There exits an infinity of possible choices lying along the


axis of rotation, we only show one of the possible positions.

89
Equivalent angle-axis representation
k x2  k y2  k z2  1

 k x k x vθ  cθ k x k y vθ  k z sθ k x k z vθ  k y sθ 
 
Rk (θ )   k x k y vθ  k z sθ k y k y vθ  cθ k y k z vθ  k x sθ  (2.80)
 k x k z vθ  k y sθ k y k z vθ  k x sθ k z k z vθ  cθ 

( sθ  sin θ cθ  cos θ )
Inverse Problem:
 k x k x vθ  cθ k x k y vθ  k z sθ k x k z vθ  k y sθ 
 
Rk (θ )   k x k y vθ  k z sθ k y k y vθ  cθ k y k z vθ  k x sθ  (2.80)
 k x k z vθ  k y sθ k y k z vθ  k x sθ k z k z vθ  cθ 

For a give Rk (θ ), what


are A K and θ ? 90
Assignment
4. Describe an algorithm that extracts the equivalent angle and axis of a given rotation
matrix with know numerical value. Equation (2.82) is a good start, but make sure
that your algorithm handles the special case 𝜃 = 0 and θ  1800.

 k x k x vθ  cθ k x k y vθ  k z sθ k x k z vθ  k y sθ 
 
Rk (θ )   k x k y vθ  k z sθ k y k y vθ  cθ k y k z vθ  k x sθ  (2.80)
 k x k z vθ  k y sθ k y k z vθ  k x sθ k z k z vθ  cθ 

(2.82)
91
Equivalent angle-axis representation
For a give Rk (θ ), what
are A K and θ ?
 k x k x vθ  cθ k x k y vθ  k z sθ k x k z vθ  k y sθ 
 
Rk (θ )   k x k y vθ  k z sθ k y k y vθ  cθ k y k z vθ  k x sθ  (2.80)
 k x k z vθ  k y sθ k y k z vθ  k x sθ k z k z vθ  cθ 

(2.82)
Okay for all

Hints: a) If θ =00 , let θ =00 , calcualte (2.80) and solving for A K  [ K x K y K z ]


b) If θ =1800 , let θ =1800 , calcualte (2.80) and solving for A K  [ K x K y K z ]
c) Otherwise, using (2.82) 92
Euler Parameters

 1  k x sin
2

 2  k y sin
2 K̂

 3  k z sin
2

 4  cos K̂  k x ky k z T
2
Normality Condition:
K̂  1 ,  12   22   32   42  1

ε A point on a unit hyper-sphere in four-dimensional space.

93
Inverse Problem of Euler Parameters
Given BAR find 

Inverse:


When θ=π, 4  cos 94
2
Inverse Problem of Euler Parameters
Lemma For all rotation, one of the Euler Parameters
4
is greater than or equal to ½ (   i2  1)
1

Algorithm Solve with respect to max{ i }


i

95
Inverse Problem of Euler Parameters

96
Euler Parameters/Euler Angles
•The relationship between the Euler parameters and Euler
Angles can be shown as follows:

97
QUIZ
A Frame {B} is located as follows: initially
coincident with a frame {A}, we rotate {B} about Ẑ B
by  and then we rotate the resulting frame about ŶB
by . (notice that YˆB  YˆA ) Moving frame  (Mapping)
• Give the rotation matrix, BA R which will change
the description of vectors from BP to AP .
• What is the result if  = 30° and  = 45°?
• What is A YˆB ?
• If we translate the origin of {B} by vector
[1 2 3]T, what is ABT ?

98
Quiz Solution
• In this case the second rotation is done on the transformed frame
and not the original. The compound rotation can be thought of a as
a Z-Y Euler angle specification. Thus, when we combine the
rotation matrices, we post-multiply. The resulting rotation matrix
will be
A
R (θ , φ)  RZ 'Y ' (θ , φ)  RZ (θ ) RY (φ)  6/4  2/2 2 / 4
B
 
cθ  sθ 0   cφ 0 sφ 
A
B R(θ , φ) θ  450  6/4 2/2 2 / 4
 
  sθ cθ 0   0 1 0 
φ 300
 1/ 2 0 2 / 2 
 0 0 1    sφ 0 cφ
cθcφ  sθ cθsφ  1
0  2
  sθcφ cθ sθsφ 
A
 BR 
YB  BAR 1 BT 
A
A ˆ
  sφ 0 cφ   3
0  
0 0 0 1
99

You might also like