You are on page 1of 19

Position vectors

Lecture #04
Summary:
Rotation matrices

Create rotation matrices by projecting the unit vectors of one frame {b} on to the
other one {a}
𝒙𝒙𝑏𝑏 · 𝒙𝒙𝑎𝑎 𝒚𝒚𝑏𝑏 · 𝒙𝒙𝑎𝑎 𝒛𝒛𝑏𝑏 · 𝒙𝒙𝑎𝑎
𝑎𝑎 𝒙𝒙 · 𝒚𝒚 𝒚𝒚 · 𝒚𝒚 𝒛𝒛 · 𝒚𝒚 𝑎𝑎 𝑎𝑎 𝑎𝑎 𝑎𝑎
𝑏𝑏 𝐑𝐑 = 𝑏𝑏 𝑎𝑎 𝑏𝑏 𝑎𝑎 𝑏𝑏 𝑎𝑎 or 𝑏𝑏 𝐑𝐑 = 𝒙𝒙 𝑏𝑏 𝒚𝒚 𝑏𝑏 𝒛𝒛𝑏𝑏
𝒙𝒙𝑏𝑏 · 𝒛𝒛𝑎𝑎 𝒚𝒚𝑏𝑏 · 𝒛𝒛𝑎𝑎 𝒛𝒛𝑏𝑏 · 𝒛𝒛𝑎𝑎
Positive rotation about the 𝒙𝒙𝑎𝑎 axis of frame {𝑎𝑎}:
1 0 0
𝑎𝑎
𝑏𝑏𝐑𝐑 = 0 cos 𝜃𝜃 − sin 𝜃𝜃
0 sin 𝜃𝜃 cos 𝜃𝜃
 Orthonormality: transpose = inverse: 𝑎𝑎𝑏𝑏𝐑𝐑 = 𝑎𝑎𝑏𝑏𝐑𝐑−1 = 𝑎𝑎𝑏𝑏𝐑𝐑𝑇𝑇
 Orthonormality implies: 𝑎𝑎𝑏𝑏𝐑𝐑 ⋅ 𝑎𝑎𝑏𝑏𝐑𝐑𝑇𝑇 = 𝑎𝑎𝑏𝑏𝐑𝐑 ⋅ 𝑎𝑎𝑏𝑏𝐑𝐑 = 𝐈𝐈
 Cascading rotations is easy: 𝑑𝑑𝑎𝑎𝐑𝐑 = 𝑎𝑎𝑏𝑏𝐑𝐑 𝑏𝑏𝑐𝑐𝐑𝐑 𝑑𝑑𝑐𝑐𝐑𝐑
 The order of the rotation is very important.
Subject overview

Kinematics Kinetics of Newton- Collision


of rigid rigid Euler of rigid
bodies bodies equations bodies
Kinematics of rigid bodies
Mathematically defining vector geometry to describe physics.
 Right-hand rule.
 Coordinate systems (frames) in various orientations.
 Rotation matrices.
Kinematics  Positions vectors.
of rigid • Angular velocity.
bodies • Derivative of a vector in rotating coordinate systems.
• Linear velocity, linear acceleration, angular acceleration.
• Joints, constraints and degrees of freedom.
• Centre of mass
Outline
• Why position vectors?
• Strategy to find position vectors
• Examples
Why position vectors?
• Working with rigid bodies in 3D will require position vectors in different
coordinate systems (frames).
• Small mistakes in position vectors definition will result in wrong modelling
of the system.
𝒚𝒚1
• Around which axis was frame {1} 𝒚𝒚0

rotated? 𝒙𝒙1
𝒚𝒚2 𝒙𝒙0

𝒚𝒚1 𝒛𝒛0 𝒛𝒛1


𝒙𝒙2
𝛼𝛼 𝒙𝒙1
Why position vectors?
Newton-Euler
Equations of
motion
Newton’s second law: Kinetics/ 𝐹𝐹 = 𝑚𝑚𝑚𝑚 Kinematics
dynamics

 For a particle: ∑ 𝑭𝑭 = 𝑚𝑚𝒂𝒂


 For a rigid body:
𝑑𝑑𝒑𝒑 𝑑𝑑 𝑑𝑑
� 𝑭𝑭 = 𝒑𝒑̇ = = 𝑚𝑚𝒗𝒗𝐺𝐺 = 𝑚𝑚𝒓𝒓̇ 𝐺𝐺
𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑
𝑑𝑑𝒉𝒉𝐺𝐺 𝑑𝑑 𝐺𝐺
� 𝑴𝑴 = 𝒉𝒉̇ =
𝐺𝐺 𝐺𝐺 = 𝐈𝐈 𝝎𝝎
𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑
Strategy to find position vectors
• Allocate coordinate systems / frames

P
• Determine rotation matrices

• Sum vectors to get the desired vector


• 𝒓𝒓𝑂𝑂𝑂𝑂 = 𝒓𝒓𝑂𝑂𝑂𝑂 + 𝒓𝒓𝑀𝑀𝑀𝑀 M
O
Example 1 – 2D warm up
Find the position of point 𝐶𝐶 relative to 𝒙𝒙2
𝛽𝛽
point 𝐴𝐴 in frame {0} (attached to the
𝐵𝐵
ground).
𝒚𝒚2 𝛽𝛽
𝐿𝐿
𝐿𝐿
• Allocate coordinate systems 𝒙𝒙1 𝒚𝒚0
𝒚𝒚1
• Try to keep some axes parallel to 𝐶𝐶
𝐴𝐴 𝛼𝛼
links in order to use common 𝒙𝒙0

rotation matrices.
Example 1 – 2D warm up
• Determine rotation matrices 𝒙𝒙2
𝛽𝛽
• Positive rotation about 𝒛𝒛0 : 𝐵𝐵
cos 𝛼𝛼 − sin 𝛼𝛼 0
0
1𝐑𝐑 = sin 𝛼𝛼
𝛽𝛽
cos 𝛼𝛼 0 𝒚𝒚2
𝐿𝐿
𝐿𝐿
0 0 1
• Positive rotation about 𝒛𝒛1 : 𝒚𝒚1
𝒙𝒙1 𝒚𝒚0
𝐶𝐶
cos 𝛽𝛽 − sin 𝛽𝛽 0 𝛼𝛼
1 𝐴𝐴 𝒙𝒙0
2𝐑𝐑 = sin 𝛽𝛽 cos 𝛽𝛽 0
0 0 1
Example 1 – 2D warm up
cos 𝛼𝛼 − sin 𝛼𝛼 0 cos 𝛽𝛽 − sin 𝛽𝛽 0
0 1 𝒙𝒙2
1𝐑𝐑 = sin 𝛼𝛼 cos 𝛼𝛼 0 2𝐑𝐑 = sin 𝛽𝛽 cos 𝛽𝛽 0 𝛽𝛽
0 0 1 0 0 1
𝐵𝐵
0
• Sum vectors to get 𝒓𝒓𝐴𝐴𝐴𝐴
0 𝒚𝒚2 𝛽𝛽
𝒓𝒓𝐴𝐴𝐴𝐴 = 0𝒓𝒓𝐴𝐴𝐴𝐴 + 0𝒓𝒓𝐵𝐵𝐵𝐵 𝐿𝐿
𝐿𝐿 𝐿𝐿
0
𝒓𝒓𝐴𝐴𝐴𝐴 = 01𝐑𝐑 1𝒓𝒓𝐴𝐴𝐴𝐴 = 01𝐑𝐑 0 𝒙𝒙1 𝒚𝒚0
𝒚𝒚1
0 𝐶𝐶
−𝐿𝐿 𝐴𝐴 𝛼𝛼 𝒙𝒙0
0 0 1 2
𝒓𝒓𝐵𝐵𝐵𝐵 = 1𝐑𝐑 2𝐑𝐑 𝒓𝒓𝐵𝐵𝐵𝐵 = 01𝐑𝐑 12𝐑𝐑 0
0

0
𝒓𝒓𝐴𝐴𝐴𝐴 = 01𝐑𝐑 1𝒓𝒓𝐴𝐴𝐴𝐴 + 01𝐑𝐑 12𝐑𝐑 2𝒓𝒓𝐵𝐵𝐵𝐵
Example 1 – 2D warm up
𝐿𝐿 −𝐿𝐿
0 0 0 1 𝒙𝒙2
𝒓𝒓𝐴𝐴𝐴𝐴 =
1𝐑𝐑 0 + 1𝐑𝐑 2𝐑𝐑 0 𝛽𝛽
0 0
cos 𝛼𝛼 − sin 𝛼𝛼 0 𝐿𝐿 𝐵𝐵
0
𝒓𝒓𝐴𝐴𝐴𝐴 = sin 𝛼𝛼 cos 𝛼𝛼 0 0
𝒚𝒚2 𝛽𝛽
0 0 1 0
𝐿𝐿
cos 𝛼𝛼 − sin 𝛼𝛼 0 cos 𝛽𝛽 − sin 𝛽𝛽 0 −𝐿𝐿 𝐿𝐿
+ sin 𝛼𝛼 cos 𝛼𝛼 0 sin 𝛽𝛽 cos 𝛽𝛽 0 0 𝒙𝒙1 𝒚𝒚0
0 0 1 0 0 1 0 𝒚𝒚1
𝐶𝐶
𝐴𝐴 𝛼𝛼 𝒙𝒙0
cos 𝛼𝛼 − sin 𝛼𝛼 0 𝐿𝐿
0
𝒓𝒓𝐴𝐴𝐴𝐴 = sin 𝛼𝛼 cos 𝛼𝛼 0 0
0 0 1 0
cos 𝛼𝛼 + 𝛽𝛽 − sin 𝛼𝛼 + 𝛽𝛽 0 −𝐿𝐿 0
cos 𝛼𝛼 − sin 𝛼𝛼 0
1
cos 𝛽𝛽 − sin 𝛽𝛽 0
+ sin 𝛼𝛼 + 𝛽𝛽 1𝐑𝐑 = sin 𝛼𝛼 cos 𝛼𝛼 0 2𝐑𝐑 = sin 𝛽𝛽 cos 𝛽𝛽 0
cos 𝛼𝛼 + 𝛽𝛽 0 0 0 0 1 0 0 1
0 0 1 0
Example 1 – 2D warm up
cos 𝛼𝛼 − sin 𝛼𝛼 0 𝐿𝐿
0 𝒙𝒙2
𝒓𝒓𝐴𝐴𝐴𝐴 = sin 𝛼𝛼 cos 𝛼𝛼 0 0 𝛽𝛽
0 0 1 0
𝐵𝐵
cos 𝛼𝛼 + 𝛽𝛽 − sin 𝛼𝛼 + 𝛽𝛽 0 −𝐿𝐿
+ sin 𝛼𝛼 + 𝛽𝛽 cos 𝛼𝛼 + 𝛽𝛽 0 0 𝒚𝒚2 𝛽𝛽
0 0 1 0 𝐿𝐿
𝐿𝐿

𝒙𝒙1 𝒚𝒚0
𝐿𝐿 cos 𝛼𝛼 −𝐿𝐿 cos 𝛼𝛼 + 𝛽𝛽 𝒚𝒚1
0 𝐶𝐶
𝒓𝒓𝐴𝐴𝐴𝐴 = 𝐿𝐿 sin 𝛼𝛼 + −𝐿𝐿sin 𝛼𝛼 + 𝛽𝛽
0 0 𝐴𝐴 𝛼𝛼 𝒙𝒙0
𝐿𝐿 cos 𝛼𝛼 − cos 𝛼𝛼 + 𝛽𝛽
0
𝒓𝒓𝐴𝐴𝐴𝐴 = 𝐿𝐿 sin 𝛼𝛼 − sin 𝛼𝛼 + 𝛽𝛽
0
cos 𝛼𝛼 − sin 𝛼𝛼 0 cos 𝛽𝛽 − sin 𝛽𝛽 0
0 1
1𝐑𝐑 = sin 𝛼𝛼 cos 𝛼𝛼 0 2𝐑𝐑 = sin 𝛽𝛽 cos 𝛽𝛽 0
0 0 1 0 0 1
Example 2 – 3D warm up 𝒛𝒛2
𝛽𝛽
𝑂𝑂
Find the position of point 𝐶𝐶 relative to 𝐿𝐿
𝛽𝛽
point 𝑂𝑂 in frame {0} (attached to the ground). 𝒚𝒚2
• Allocate coordinate systems 𝐶𝐶

• Try to keep some axes parallel to links


in order to use common rotation 𝒛𝒛1
𝒚𝒚0
matrices. 𝒚𝒚1
𝒚𝒚1
𝒙𝒙1

𝛼𝛼
𝑂𝑂 𝒙𝒙0

Side View

Top View
𝐶𝐶
Example 2 – 3D warm up 𝒛𝒛2
𝛽𝛽
𝑂𝑂
• Determining Rotation Matrices: 𝐿𝐿
𝛽𝛽
• Positive rotation about 𝒛𝒛0 : 𝒚𝒚2
cos 𝛼𝛼 − sin 𝛼𝛼 0 𝐶𝐶
0
1𝐑𝐑 = sin 𝛼𝛼 cos 𝛼𝛼 0
0 0 1 𝒛𝒛1
• Negative rotation about 𝒙𝒙1 : 𝒚𝒚1
𝒚𝒚0

1 0 0 𝒙𝒙1 𝒚𝒚1
1
2𝐑𝐑 = 0 cos 𝛽𝛽 sin 𝛽𝛽
𝑂𝑂
𝛼𝛼 𝒙𝒙0
0 −sin 𝛽𝛽 cos 𝛽𝛽 Side View

Top View
𝐶𝐶
Example 2 – 3D warm up 𝒛𝒛2
𝛽𝛽
𝑂𝑂
0 0 1 2 𝐿𝐿
• Getting: 𝒓𝒓𝑂𝑂𝑂𝑂 = 1𝐑𝐑 2𝐑𝐑 𝒓𝒓𝑂𝑂𝑂𝑂 𝛽𝛽
0 𝒚𝒚2
2
𝒓𝒓𝑂𝑂𝑂𝑂 = 0 cos 𝛼𝛼 − sin 𝛼𝛼 0 𝐶𝐶
0
−𝐿𝐿 1𝐑𝐑 = sin 𝛼𝛼 cos 𝛼𝛼 0
0 0 1
1 0 0
0 0 1 2 1
2𝐑𝐑 = 0 cos 𝛽𝛽 sin 𝛽𝛽 𝒛𝒛1
𝒓𝒓𝑂𝑂𝑂𝑂 = 1𝐑𝐑 2𝐑𝐑 𝒓𝒓𝑂𝑂𝑂𝑂 0 −sin 𝛽𝛽 cos 𝛽𝛽
cos 𝛼𝛼 − sin 𝛼𝛼 0 1 0 0 0 𝒚𝒚1
0
𝒓𝒓𝑂𝑂𝑂𝑂 = sin 𝛼𝛼 cos 𝛼𝛼 0 0 cos 𝛽𝛽 sin 𝛽𝛽 0
0 0 1 0 −sin 𝛽𝛽 cos 𝛽𝛽 −𝐿𝐿 𝒚𝒚1 𝒚𝒚0
𝒙𝒙1
Side View
𝛼𝛼 𝒙𝒙0
𝑂𝑂

Top View 𝐶𝐶
Example 2 – 3D warm up 𝒛𝒛2
𝛽𝛽
𝑂𝑂
cos 𝛼𝛼 − sin 𝛼𝛼 0 1 0 0 0 𝐿𝐿
0 𝛽𝛽
𝒓𝒓𝑂𝑂𝑂𝑂 = sin 𝛼𝛼 cos 𝛼𝛼 0 0 cos 𝛽𝛽 sin 𝛽𝛽 0
𝒚𝒚2
0 0 1 0 −sin 𝛽𝛽 cos 𝛽𝛽 −𝐿𝐿
cos 𝛼𝛼 − sin 𝛼𝛼 0 𝐶𝐶
0
1𝐑𝐑 = sin 𝛼𝛼 cos 𝛼𝛼 0
0 0 1
cos 𝛼𝛼 − sin 𝛼𝛼 0 0 1 0 0
0 1
2𝐑𝐑 = 0 cos 𝛽𝛽 sin 𝛽𝛽 𝒛𝒛1
𝒓𝒓𝑂𝑂𝑂𝑂 = sin 𝛼𝛼 cos 𝛼𝛼 0 −𝐿𝐿 sin 𝛽𝛽 0 −sin 𝛽𝛽 cos 𝛽𝛽
0 0 1 −𝐿𝐿 cos 𝛽𝛽 𝒚𝒚1

𝐿𝐿 sin 𝛼𝛼 sin 𝛽𝛽 𝒚𝒚1 𝒚𝒚0


𝒙𝒙1
0 Side View
𝒓𝒓𝑂𝑂𝑂𝑂 = −𝐿𝐿 cos 𝛼𝛼 sin 𝛽𝛽 𝛼𝛼 𝒙𝒙0
𝑂𝑂
−𝐿𝐿 cos 𝛽𝛽

Top View 𝐶𝐶
Summary:
Position vectors

• Allocate coordinate systems


• Try to keep some axes parallel to links in order to use
common rotation matrices.
• Determine rotation matrices
• Identify fixed points
• Identify the frame you want/need your vectors in
• Sum vectors to get the desired vector
Example 3 𝒚𝒚2 𝒙𝒙2

2𝑅𝑅
Find the position of point 𝐷𝐷 relative to 𝐴𝐴 𝒚𝒚1
𝛽𝛽 𝐵𝐵
point 𝐴𝐴 in frame {1} (attached to the 𝛾𝛾
𝜔𝜔
T-bar). 𝐶𝐶
𝒙𝒙1

• Allocate coordinate systems


• Try to keep some axes parallel
to links in order to use common
rotation matrices.

𝐶𝐶
𝑅𝑅
𝛾𝛾 𝐷𝐷

You might also like