Lecture 2 - Description (00-12-01)
Lecture 2 - Description (00-12-01)
Lecture 2 - Description (00-12-01)
Description:
Positions
Orientations
An entity that contains both of these descriptions: the frame
𝐴𝑃 have numerical values that indicate distances along the axes of {A}
(Projection).
𝐴
𝑝𝑥
𝐴𝑃 = 𝐴𝑝
𝑦
𝐴𝑝
𝑧
𝐴𝑝
𝑥 = 𝐴𝑃 . 𝑋𝐴
𝐴𝑝 = 𝐴𝑃 . 𝑌𝐴
𝑦
𝐴𝑝 = 𝐴𝑃 . 𝑍𝐴
𝑧
4
𝐴𝑃 = 𝐴𝑃 . 𝐴𝑃 1/2 = 𝐵𝑃 . 𝐵𝑃 1/2 = 𝐵𝑃
Q: Condition ?
Attach a coordinate system to the body and then give a description of this
coordinate system relative to the reference system.
𝐴
𝑋𝐵 . 𝐴𝑌𝐵 = 𝐴
𝑌𝐵 . 𝐴𝑍𝐵 = 𝐴
𝑋𝐵 . 𝐴𝑍𝐵 = 0
2) The rows of the matrix are the unit vectors of {A} expressed in {B}.
𝐵𝑋 𝑇
𝑋𝐵 . 𝑋𝐴 𝑌𝐵 . 𝑋𝐴 𝑍𝐵 . 𝑋𝐴 𝐴
𝐴 𝐵 𝑇
𝑅𝐵 = 𝐴𝑋𝐵 𝐴𝑌𝐵 𝐴𝑍𝐵 = 𝑋𝐵 . 𝑌𝐴 𝑌𝐵 . 𝑌𝐴 𝑍𝐵 . 𝑌𝐴 = 𝑌𝐴
𝑋𝐵 . 𝑍𝐴 𝑌𝐵 . 𝑍𝐴 𝑍𝐵 . 𝑍𝐴 𝐵𝑍 𝑇
𝐴
= 𝐵𝑋𝐴 𝐵𝑌𝐴 𝐵𝑍𝐴 𝑇 = 𝐵𝑅𝐴𝑇
4)
𝑑𝑒𝑡 𝐴𝑅𝐵 = 1
Q: Why?
𝐴
𝑃𝐵𝑂𝑅𝐺 is the vector that locates the origin of the frame {B}.
10
Translation
A position defined by the vector 𝐵𝑃 .
{A} has the same orientation as {B}
{A} differs only by a translation, i.e. 𝐴𝑃𝐵𝑂𝑅𝐺 .
Express this point in space in terms of frame {A}, i.e. 𝐴𝑃 .
𝐴𝑃 = 𝐵𝑃 + 𝐴𝑃𝐵𝑂𝑅𝐺
12
Q: Why?
13
Note that the rows of rotation matrix 𝐴𝑅𝐵 are 𝐵𝑋𝐴𝑇 , 𝐵𝑌𝐴𝑇 and 𝐵𝑍𝐴𝑇 .
𝐴𝑃 = 𝐴𝑅𝐵 𝐵𝑃
14
𝐵𝑃 is given.
Find 𝐴𝑃?
15
𝐴𝑃 = 𝐴𝑅𝐵 𝐵𝑃 + 𝐴𝑃𝐵𝑂𝑅𝐺
16
where 𝐵𝑃 = 3 7 0 𝑇 .
Find 𝐴𝑃 ?
18
19
Translation
Moving a point 𝐴𝑃 in space a finite distance along a given vector
1
direction 𝐴𝑄 .
𝐴𝑃 = 𝐴𝑃1 + 𝐴𝑄
2
Frame is invariant.
Translational Operator:
𝐴𝑃 𝐴𝑃
2 = 𝑇𝑇𝑟𝑎𝑛𝑠 𝑄 1
Q: 𝑇𝑇𝑟𝑎𝑛𝑠 𝑄 = ?
20
1 0 0 𝑞𝑥
𝑇𝑇𝑟𝑎𝑛𝑠 𝑄 = 0 1 0 𝑞𝑦
0 0 1 𝑞𝑧
0 0 0 1
Q: Sign of 𝑞𝑖 ?
21
The rotation matrix that rotates vectors through some rotation, 𝑅 = the
rotation matrix that describes a frame rotated by 𝑅 relative to the
reference frame.
𝐴𝑃 𝐴𝑃
2 = 𝑅𝐾 𝜃 1
Q: Assume 𝐾 = 𝑍, what is 𝑅𝐾 𝜃 ?
22
0
𝑅𝐾 𝜃 0
𝑇𝑅𝑜𝑡 𝑅 =
0
0 0 0 1
𝑐𝑜𝑠 𝜃 −𝑠𝑖𝑛 𝜃 0 0
𝑇𝑅𝑜𝑡 𝑅 = 𝑠𝑖𝑛 𝜃 𝑐𝑜𝑠 𝜃 0 0
0 0 1 0
0 0 0 1
23
24
𝐴
𝑇𝐶 = 𝐴𝑇𝐵 𝐵𝑇𝐶
𝐴𝑅 𝐴𝑃
𝐶 𝐶𝑂𝑅𝐺
𝐴𝑇
𝐶 =
0 0 0 1
? ?
𝐴𝑇
𝐶 =
0 0 0 1
25
Computation:
𝐴𝑃 = 𝐴𝑇𝐵 𝐵𝑇𝐶 𝐶𝑃 32 𝑀𝑢𝑙𝑡𝑖𝑝𝑙𝑖𝑐𝑎𝑡𝑖𝑜𝑛 + 24 𝐴𝑑𝑑𝑖𝑡𝑖𝑜𝑛
𝐴𝑃 = 𝐴𝑇 𝐵 𝑇 𝐶 𝑃
𝐵 𝐶 80 𝑀𝑢𝑙𝑡𝑖𝑝𝑙𝑖𝑐𝑎𝑡𝑖𝑜𝑛 + 60 𝐴𝑑𝑑𝑖𝑡𝑖𝑜𝑛
26
27
𝐴
𝑃 = 𝐴𝑅𝐵 𝐵𝑃 + 𝐴𝑃𝐵𝑂𝑅𝐺
𝐴𝑃 − 𝐴𝑃 𝐴 𝐵
𝐵𝑂𝑅𝐺 = 𝑅𝐵 𝑃
𝐴𝑅 −1 𝐴𝑃 − 𝐴𝑃 𝐵
𝐵 𝐵𝑂𝑅𝐺 = 𝑃
𝐴 𝑇 𝑇
𝑅𝐵 𝐴𝑃 − 𝐴𝑅𝐵 𝐴𝑃𝐵𝑂𝑅𝐺 = 𝐵𝑃
𝐴𝑅 𝑇 𝑇𝐴
𝐵 − 𝐴𝑅𝐵 𝑃𝐵𝑂𝑅𝐺
𝐵𝑇 =
𝐴
0 0 0 1
Q: Geometrical Description = ?
Note that 28
𝐵𝑇 −1
𝐴 = 𝐴𝑇𝐵
These three vectors are the unit axes of some frame written in terms of
the reference frame.
Each is a unit vector, and all three must be mutually perpendicular (six
constraints).
𝐴𝑋 𝐴𝑌 𝐴𝑍
𝐵 = 𝐵 = 𝐵 =1
𝐴 𝑋 . 𝐴𝑌 = 𝐴𝑌 . 𝐴𝑍 = 𝐴𝑋 . 𝐴𝑍
𝐵 𝐵 𝐵 𝐵 𝐵 𝐵 =0
29
The representation is conveniently specified with three parameter.
31
𝐴𝑅 =? 32
Q: 𝐵
𝑐𝛼 −𝑠𝛼 0 𝑐𝛽 0 𝑠𝛽 1 0 0
𝐴𝑅 0 1 0 0 𝑐𝛾 −𝑠𝛾
𝐵𝑍𝑌𝑋 = 𝑅𝑍 𝛼 𝑅𝑌 𝛽 𝑅𝑋 𝛾 = 𝑠𝛼 𝑐𝛼 0
0 0 1 −𝑠𝛽 0 𝑐𝛽 0 𝑠𝛾 𝑐𝛾
where 𝑐𝛼 = 𝑐𝑜𝑠 𝛼, 𝑠𝛼 = 𝑠𝑖𝑛 𝛼
𝑐𝛼 𝑐𝛽 𝑐𝛼 𝑠𝛽 𝑠𝛾 − 𝑠𝛼 𝑐𝛾 𝑐𝛼 𝑠𝛽 𝑐𝛾 + 𝑠𝛼 𝑠𝛾
𝐴𝑅
𝐵_𝑍𝑌𝑋 𝛼, 𝛽, 𝛾 = 𝑠𝛼 𝑐𝛽 𝑠𝛼 𝑠𝛽 𝑠𝛾 + 𝑐𝛼 𝑐𝛾 𝑠𝛼 𝑠𝛽 𝑐𝛾 − 𝑐𝛼 𝑠𝛾 33
−𝑠𝛽 𝑐𝛽 𝑠𝛾 𝑐𝛽 𝑐𝛾
2 2
𝛽 = 𝐴𝑡𝑎𝑛2 −𝑟31 , 𝑟11 + 𝑟21
As long as 𝑐𝛽 ≠ 0,
𝛼 = 𝐴𝑡𝑎𝑛2 𝑟21 /𝑐𝛽, 𝑟11 /𝑐𝛽
𝛾 = 𝐴𝑡𝑎𝑛2 𝑟32 /𝑐𝛽, 𝑟33 /𝑐𝛽
For 𝛽 = +90.0° :
𝑐𝛼 𝑐𝛽 𝑐𝛼 𝑠𝛽 𝑠𝛾 − 𝑠𝛼 𝑐𝛾 𝑐𝛼 𝑠𝛽 𝑐𝛾 + 𝑠𝛼 𝑠𝛾 𝑟11 𝑟12 𝑟13
𝑠𝛼 𝑐𝛽 𝑠𝛼 𝑠𝛽 𝑠𝛾 + 𝑐𝛼 𝑐𝛾 𝑠𝛼 𝑠𝛽 𝑐𝛾 − 𝑐𝛼 𝑠𝛾 = 𝑟21 𝑟22 𝑟23
−𝑠𝛽 𝑐𝛽 𝑠𝛾 𝑐𝛽 𝑐𝛾 𝑟31 𝑟32 𝑟33
0 𝑠𝑖𝑛 𝛾 − 𝛼 𝑐𝑜𝑠 𝛾 − 𝛼 𝑟11 𝑟12 𝑟13
0 𝑐𝑜𝑠 𝛾 − 𝛼 − 𝑠𝑖𝑛 𝛾 − 𝛼 = 𝑟21 𝑟22 𝑟23
−1 0 0 𝑟31 𝑟32 𝑟33
36
In those cases, only the 𝛼 ± 𝛾 can be computed.
Amirkabir University of Technology / H. Ghafarirad ← Outline
More on Representation of Orientation
Z-Y-X Euler Angles
The Inverse Problem
Singularity of the Inverse Problem:
For 𝛽 = +90.0° :
0 𝑠𝑖𝑛 𝛾 − 𝛼 𝑐𝑜𝑠 𝛾 − 𝛼 𝑟11 𝑟12 𝑟13
0 𝑐𝑜𝑠 𝛾 − 𝛼 − 𝑠𝑖𝑛 𝛾 − 𝛼 = 𝑟21 𝑟22 𝑟23 .
−1 0 0 𝑟31 𝑟32 𝑟33
𝛽 = +90.0° 𝛽 = −90.0°
𝛼 = 0.0 𝛼 = 0.0
37
𝛾 = 𝐴𝑡𝑎𝑛2 (𝑟12 , 𝑟22 ) 𝛾 = −𝐴𝑡𝑎𝑛2 (𝑟12 , 𝑟22 )
38
Each of the three rotations takes place about an axis in the fixed
reference frame {A}.
This convention is referred to as roll, pitch, yaw angles.
39
Q: 𝐴𝑅𝐵 =?
Amirkabir University of Technology / H. Ghafarirad ← Outline
More on Representation of Orientation
X-Y-Z Fixed Angles
The composition rule cannot be applied here, similarity transformation
can be used instead.
Similarity Transformation
A rotation matrix (as a coordinate transformation) may be viewed as
changing basis from one frame to another.
𝑁= 0𝑅 −1 𝑀 0𝑅1
1
40
𝐴𝑅 ′ = 𝑅 𝛾
𝐵 𝑋
𝐵′ 𝐴
𝑅𝐵′′ = 𝑅𝐵′ −1 𝑅𝑌 𝛽 𝐴
𝑅𝐵 ′
𝐵 ′′ 𝑅 = 𝐴𝑅 ′′ −1 𝑅 𝛼 𝐴𝑅 ′′
𝐵 𝐵 𝑍 𝐵
Therefore,
𝐴
𝑅𝐵′ = 𝑅𝑋 𝛾
𝐴𝑅 ′′ = 𝐴 𝑅𝐵 ′ 𝐵′ 𝑅 ′′ = 𝐴 𝑅𝐵 ′ 𝐴𝑅 ′ −1 𝑅𝑌 𝛽 𝐴𝑅 ′ = 𝑅𝑌 𝛽 𝑅𝑋 𝛾
𝐵 𝐵 𝐵 𝐵
𝐴𝑅 = 𝐴𝑅𝐵′′ 𝐵 ′′ 𝑅 = 𝐴𝑅𝐵′′ 𝐴𝑅 ′′ −1 𝑅𝑍 𝛼 𝐴𝑅 ′′ = 𝑅𝑍 𝛼 𝑅𝑌 𝛽 𝑅𝑋 𝛾
𝐵 𝐵 𝐵 𝐵
41
Therefore,
𝑐𝛼 𝑐𝛽 𝑐𝛼 𝑠𝛽 𝑠𝛾 − 𝑠𝛼 𝑐𝛾 𝑐𝛼 𝑠𝛽 𝑐𝛾 + 𝑠𝛼 𝑠𝛾
𝐴𝑅
𝐵_𝑋𝑌𝑍 𝛾, 𝛽, 𝛼 = 𝑠𝛼 𝑐𝛽 𝑠𝛼 𝑠𝛽 𝑠𝛾 + 𝑐𝛼 𝑐𝛾 𝑠𝛼 𝑠𝛽 𝑐𝛾 − 𝑐𝛼 𝑠𝛾
−𝑠𝛽 𝑐𝛽 𝑠𝛾 𝑐𝛽 𝑐𝛾
𝑘𝑥 𝑘𝑥 𝑣𝜃 + 𝑐𝜃 𝑘𝑥 𝑘𝑦 𝑣𝜃 − 𝑘𝑧 𝑠𝜃 𝑘𝑥 𝑘𝑧 𝑣𝜃 + 𝑘𝑦 𝑠𝜃
𝑅𝐾 𝜃 = 𝑘𝑥 𝑘𝑦 𝑣𝜃 + 𝑘𝑧 𝑠𝜃 𝑘𝑦 𝑘𝑦 𝑣𝜃 + 𝑐𝜃 𝑘𝑦 𝑘𝑧 𝑣𝜃 − 𝑘𝑥 𝑠𝜃
𝑘𝑥 𝑘𝑧 𝑣𝜃 − 𝑘𝑦 𝑠𝜃 𝑘𝑦 𝑘𝑧 𝑣𝜃 + 𝑘𝑥 𝑠𝜃 𝑘𝑧 𝑘𝑧 𝑣𝜃 + 𝑐𝜃
Example:
For 𝐾 as principal axes (e.g. 𝐾 = 𝑋 = 1 0 0 𝑇
or 𝑌 or 𝑍 )
1 0 0
𝑅𝑋 𝜃 = 0 𝑐𝜃 − 𝑠𝜃
0 𝑠𝜃 𝑐𝜃
𝑐𝜃 0 𝑠𝜃
𝑅𝑌 𝜃 = 0 1 0
− 𝑠𝜃 0 𝑐𝜃
𝑐𝜃 −𝑠𝜃 0
𝑅𝑍 𝜃 = 𝑠𝜃 𝑐𝜃 0 44
0 0 1
Amirkabir University of Technology / H. Ghafarirad ← Outline
More on Representation of Orientation
Equivalent Angle-Axis
The Inverse Problem
Computing 𝐾 and 𝜃 from a given rotation matrix.
𝑟32 − 𝑟23
𝑟11 +𝑟22 +𝑟33 −1 1
𝜃 = 𝐴𝑐𝑜𝑠 , 𝐾= 𝑟13 − 𝑟31
2 2 sin𝜃
𝑟21 − 𝑟12
𝑇
In terms of the equivalent axis 𝐾 = 𝑘𝑥 , 𝑘𝑦 , 𝑘𝑧 and the equivalent
angle 𝜃, the Euler parameters are given by
𝜖1 𝑘𝑥
𝜃 𝜃
𝜖 𝑘
𝜖 = 2 = 𝑦 𝑠𝑖𝑛 = 𝐾 𝑠𝑖𝑛
𝜖3 2 2
𝑘𝑧
𝜃
𝜖4 = 𝑐𝑜𝑠
2
1 − 2𝜖22 − 2𝜖32 2 𝜖1 𝜖2 − 𝜖3 𝜖4 2 𝜖1 𝜖3 + 𝜖2 𝜖4
𝑅𝜖 = 2 𝜖1 𝜖2 + 𝜖3 𝜖4 1 − 2𝜖12 − 2𝜖32 2 𝜖2 𝜖3 − 𝜖1 𝜖4
2 𝜖1 𝜖3 − 𝜖2 𝜖4 2 𝜖2 𝜖3 + 𝜖1 𝜖4 1 − 2𝜖12 − 2𝜖22
1
𝜖4 = 1 + 𝑟11 + 𝑟22 + 𝑟33
2
𝑟 − 𝑟23
1 32
𝜖= 𝑟13 − 𝑟31
4𝜖4 𝑟 − 𝑟 47
21 12
For a rotation of 180 degrees about some axis, 𝜖4 → 0 (ill defined).
Amirkabir University of Technology / H. Ghafarirad ← Outline
More on Representation of Orientation
Euler Parameters
The Inverse Problem:
Remember:
𝜃
𝜖 = 𝐾 𝑠𝑖𝑛
2
𝜃
𝜖4 = 𝑐𝑜𝑠
2
By definition, if 𝜖4 = 0, then 𝜃 = 180° and 𝜖 is equal to rotation axis,
i.e. 𝜖 = 𝐾
1 + 2𝑟11 − 𝑡𝑟 𝐴
𝜖12 =
4
1 + 2𝑟22 − 𝑡𝑟 𝐴
𝜖22 =
4
2
1 + 2𝑟33 − 𝑡𝑟 𝐴
𝜖3 =
4
For free vectors, only the rotation matrix relating the two systems is used
in transforming.
Position Transformation
𝐴𝑃 = 𝐴𝑇𝐵 𝐵𝑃
Velocity Transformation
𝐴𝑉 = 𝐴𝑅𝐵 𝐵𝑉
𝐴
𝑃𝐵𝑂𝑅𝐺 which would appear in
a position-vector transformation, 49
does not appear in a velocity transform.
Amirkabir University of Technology / H. Ghafarirad ← Outline
The END
• References:
[1] www.u.arizona.edu/~pen/ame553/Notes/Lesson%2009.pdf
50