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

Reference Frames

and rotations
DESIGN OF MECHATRONICS SYSTEMS
DR. MOHAMMAD HAYAJNEH

DOMS DR. MOHAMMAD HAYAJNEH


Vector and Reference frames

Any vector in the Cartesian coordinate system can be given in


𝑣𝑥
three components 𝑣 = 𝑣𝑦
𝑣𝑧
One coordinate frame is transformed into another through two
basic operations:
◦ Rotations
◦ Translations. 𝑦0
𝑦1

𝑣𝑦
𝑣
𝑣𝑥
𝑣𝑧 𝑥1
𝑧1
𝑥0
𝑧0

DOMS DR. MOHAMMAD HAYAJNEH


Rotation Matrices
•Vector 𝑣 can be expressed in both frames ℱ 0 and ℱ 1 .
•The rotation occurs around 𝑧 axis and the angle of rotation is 𝜓.

𝑦0
𝑦1 𝑣𝑥𝑜
Vector 𝑣 In ℱ 0 𝑣0 = 𝑣
𝑦𝑜
𝑣 𝑣𝑥𝑜 cos 𝜓 + 𝑣𝑦𝑜 sin 𝜓
Vector 𝑣 In ℱ 1 𝑣 1 = 𝑥1 =
𝑣𝑦𝑜 𝑣 𝑣𝑦1 − 𝑣𝑥𝑜 sin 𝜓 + 𝑣𝑦𝑜 cos 𝜓
𝑥1
𝜓 cos 𝜓 sin 𝜓 𝑣𝑥𝑜
=
− sin 𝜓 cos 𝜓 𝑣𝑦𝑜
𝑧0 = 𝑧1 𝑣𝑥𝑜 𝑥0

DOMS DR. MOHAMMAD HAYAJNEH


Rotation Matrices
•The relationship between the vector in ℱ 0
cos 𝜓 sin 𝜓 𝑣𝑥𝑜
𝑣1 = and the vector in ℱ 1 is the rotation
− sin 𝜓 cos 𝜓 𝑣𝑦𝑜 matrix 𝑹.
•The notation 𝑅01 is used to denote a
𝑣 1 = 𝑅01 𝑣0 rotation matrix 𝑹 rotation matrix from coordinate
frame ℱ 0to coordinate frame ℱ 1 .
𝑦0 •By representing the vector in 3 axes we
𝑦1 will have a 3x3 rotation matrix as follow

cos 𝜓 sin 𝜓 0
𝑣𝑦𝑜 𝑣 𝑅01 = − sin 𝜓 cos 𝜓 0
𝑥1 0 0 1
𝜓 −1 𝑇
𝑣 0 = 𝑅10 𝑣 1 = 𝑅01 𝑣1 = 𝑅01 𝑣1
𝑧0 = 𝑧1 𝑣𝑥𝑜 𝑥0

DOMS DR. MOHAMMAD HAYAJNEH


−1
𝑣 0 = 𝑅10 𝑣 1 = 𝑅01 𝑣1

Rotation Matrices 𝑅01


cos 𝜓
= − sin 𝜓
sin 𝜓
cos 𝜓
0
0
0 0 1

1
For example if the readings of the vector 𝑣 in are = 2 and the
ℱ0 𝑣0
3
rotation angle is 𝜓 = 45𝑜 , then the vector can be represented in ℱ 1 by:
cos 45 sin 45 0 1 cos 45 + 2 sin 45 2.121
𝑣 1 = − sin 45 cos 45 0 2 = − sin 45 + 2 cos 45 = 0.7071
0 0 1 3 3 3

cos 45 −sin 45 0 2.121 2.121 cos 45 − 0.7071 sin 45 1


0
𝑣 = sin 45 cos 45 0 0.7071 = 2.121 sin 45 + 0.7071 cos 45 = 2
0 0 1 3 3 3

−1 𝑇
𝑅01 = 𝑅01 = 𝑅10

DOMS DR. MOHAMMAD HAYAJNEH


Rotation Matrices
If the rotation (right handed) If the rotation (right handed)
happens about 𝑦 axis with an angle 𝜃. happens about 𝑥 axis with and angle 𝜙.
Then the rotation matrix can be given Then the rotation matrix can be given
by: by:
cos 𝜃 0 −sin 𝜃 1 0 0
𝑅01 = 𝑅 𝜃 = 0 1 0 𝑅01 = 𝑅 𝜙 = 0 cos 𝜙 sin 𝜙
sin 𝜃 0 cos 𝜃 0 − sin 𝜙 cos 𝜙

Rotation matrices have the following properties:


−1 𝑇
𝑅𝑎𝑏 = 𝑅𝑎𝑏 = 𝑅𝑏𝑎
𝑅𝑏𝑐 𝑅𝑎𝑏 = 𝑅𝑎𝑐
𝑅𝑎𝑏 = 1

DOMS DR. MOHAMMAD HAYAJNEH


Frames in robotics application

The inertial frame ℱ 𝑖 The body frame ℱ 𝑏


The inertial coordinate system is an The body frame is fixed on a
earth fixed coordinate system with rigid body in the space and is
origin at the defined home location. obtained by three rotations from
the inertial frame

ℱ𝑏
Pitch
𝜃
𝜙 Roll

Yaw 𝜓

DOMS DR. MOHAMMAD HAYAJNEH


Frames in robotics application

The transformation from the inertial frame to the body


from is produced by a sequential rotations around 3
axes:
𝑅𝑖𝑏 = 𝑅 𝜙 𝑅 𝜃 𝑅 𝜓
1 0 0 cos 𝜃 0 −sin 𝜃 cos 𝜓 sin 𝜓 0
= 0 cos 𝜙 sin 𝜙 0 1 0 − sin 𝜓 cos 𝜓 0
0 − sin 𝜙 cos 𝜙 sin 𝜃 0 cos 𝜃 0 0 1

DOMS DR. MOHAMMAD HAYAJNEH


Frames in robotics application

Consider the gravity vector is represented in inertial frame by

0 ℱ𝑏
the vector 𝑔 = 0 𝑚/𝑠 2 . How this vector is represented in
9.82
quadcopter frame (body frame), when
A) 𝜙 = 10𝑜 , 𝜃 = 15𝑜 , 𝜓 = 0𝑜
B) 𝜙 = 10𝑜 , 𝜃 = 15𝑜 , 𝜓 = 100𝑜

DOMS DR. MOHAMMAD HAYAJNEH

You might also like