Analysis of Rotational Motion and Technology

You might also like

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

ECE5463: Introduction to Robotics

Lecture Note 3: Rotational Motion

Prof. Wei Zhang

Department of Electrical and Computer Engineering


Ohio State University
Columbus, Ohio, USA

Spring 2018

Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 1 / 30


Outline

• Mathematics of Rigid Body Transformation

• Rotation Matrix and SO(3)

• Euler Angles and Euler-Like Parameterizations

• Exponential Coordinate of SO(3)

• Quaternion Representation of Rotation

Outline Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 2 / 30


Rigid Body Transformation
• Object (Body) in R3 : a collection of points, represented by a subset O ⊂ R3

• Transformation of a body: A single mapping g : O → R3 which maps the


coordinates of points in the body from their initial to final configurations.

• Transformation on points induce an action on vectors in a natural way. Given


a transformation g : O → R3 , define

ĝ(v)  g(q) − g(p), where v = q − p

- Note: ĝ has a different domain than g

Rigid Body Transformation Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 3 / 30


Rigid Body Transformation
• Rigid Body Transformation: A mapping g : R3 → R3 is called a rigid body
transformation if it satisfies the following two properties
1. Length preserved: g(q) − g(p) = q − p, for all p, q ∈ R3

2. Cross product is preserved: ĝ(v × w) = ĝ(v) × ĝ(w), for all v, w ∈ R3 .

• Implications:
- Inner product is preserved:

ĝ(v)T ĝ(w) = v T w, for all v, w ∈ R3

- Angles between vectors are preserved

- Orthogonal vectors are transformed to orthogonal vectors

- Right-handed coordinate frames are transformed to right-handed coordinate


frames

Rigid Body Transformation Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 4 / 30


Outline

• Mathematics of Rigid Body Transformation

• Rotation Matrix and SO(3)

• Euler Angles and Euler-Like Parameterizations

• Exponential Coordinate of SO(3)

• Quaternion Representation of Rotation

Rotation Matrix and SO(3) Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 5 / 30


Representation of Orientation

x̂b ẑb

ẑs ŷb
p

ŷs

x̂s

• Basic Reference Frames:


- Fixed (or Space) Frame: {s} = {x̂s , ŷs , ẑs }
- Body Frame:{b} ={x̂b , ŷb , ẑb }

• Let xsb , ysb and zsb be the coordinate of x̂b , ŷb , ẑb in frame {s}

Rotation Matrix and SO(3) Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 6 / 30


Rotation Matrix
 
• Let Rsb = xsb ysb zsb

• Rsb constructed above is called a rotation matrix. We know:


T
- Rsb Rsb = I

- det(Rsb ) = 1

Rotation Matrix and SO(3) Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 7 / 30


Special Orthogonal Group
• Special Orthogonal Group: Space of Rotation Matrices in Rn is defined as

SO(n)) = {R ∈ Rn×n : RRT = I, det(R) = 1}

• SO(n) is a group. We are primarily interested in SO(3) and SO(2), rotation


groups of R3 and R2 , respectively.

• Group is a set G, together with an operation •, satisfying the following


group axioms:
- Closure: a ∈ G, b ∈ G ⇒ a • b ∈ G

- Associativity: (a • b) • c = a • (b • c), ∀a, b, c ∈ G

- Identity element: ∃e ∈ G such that e • a = a, for all a ∈ G.

- Inverse element: For each a ∈ G, there is a b ∈ G such that a • b = b • a = e,


where e is the identity element.

Rotation Matrix and SO(3) Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 8 / 30


Use of Rotation Matrix
 
• Representing an orientation: Rab = xab yab zab

• Changing
g the reference frame:
- pa = Rab pb

- Rac = Rab Rbc

• Rotating a vector or a frame:


- Theorem (Euler):Any orientation R ∈ SO(3) is equivalent to a rotation about a
fixed axis ω̂ ∈ R3 through an angle θ ∈ [0, 2π)

R = Rot(ω̂, θ)

Rotation Matrix and SO(3) Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 9 / 30


Pre-multiplication vs. Post-multiplication
• Given R ∈ SO(3), we can always find ω̂ and θ such that R = Rot(ω̂, θ).
• Premultiplying by R yields a rotation about an axis ω̂ considered in the fixed
frame;
• Postmultiplying by R yields a rotation about ω̂ considered in the body frame

ẑ ẑ
90◦ ŷ



x̂ R = Rot(ẑ, 90◦ )
ẑs
x̂b
90◦
ẑs x̂b Rsb = RRsb
ŷb fixed frame ŷb {b }
rotation ẑb
{b}
{s}
x̂s ŷs ẑb 90◦ x̂b
ẑb
Rsb = Rsb R {b }
body frame
rotation ẑb ŷb

Rotation Matrix and SO(3) Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 10 / 30


Coordinate System for SO(3)
• How to parameterize the elements in SO(3)?

• The definition of SO(3) corresponds to implicit representation:

R ∈ R3×3 , RRT = I, det(R) = 1

.
- 6 independent equations with 9 unknowns

- Dimension of SO(3) is 3.

Rotation Matrix and SO(3) Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 11 / 30


Outline

• Mathematics of Rigid Body Transformation

• Rotation Matrix and SO(3)

• Euler Angles and Euler-Like Parameterizations

• Exponential Coordinate of SO(3)

• Quaternion Representation of Rotation

Euler Angles Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 12 / 30


Euler Angle Representation of Rotation
z0 , za za
zb zb , z1
φ ψ
y1
ya ya , yb yb
y0 θ
x0 xa xa
xb xb x1

• Euler angle representation:


- Start with {b} coincident with {s}

- Rotate {b} about ẑb by an angle α, then rotate about the (new) ŷb axis by β,
and then rotate about the (new) ẑb axis by γ. This yields a net orientation
Rsb (α, β, γ) parameterized by the ZYZ angles (α, β, γ)

- Rsb (α, β, γ) = Rz (α)Ry (β)Rz (γ)

Euler Angles Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 13 / 30


Other Euler-Like Parameterizations
• Other types of Euler angle parameterization can be devised using different
ordered sets of rotation axes

• Common choices include:


- ZYX Euler angles: also called Fick angles or yaw, pitch and roll angles

- YZX Euler angles (Helmholtz angles)

z0

Roll

Yaw y0
Pitch

x0

Euler Angles Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 14 / 30


Examples of Euler-Like Representations

Euler Angles Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 15 / 30


Outline

• Mathematics of Rigid Body Transformation

• Rotation Matrix and SO(3)

• Euler Angles and Euler-Like Parameterizations

• Exponential Coordinate of SO(3)

• Quaternion Representation of Rotation

Exponential Coordinate Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 16 / 30


Towards Exponential Coordinate of SO(3)
• Recall the polar coordinate system of the complex plane:
- Every complex number z = x + jy = ρejφ

- Cartesian coordinate (x, y) ↔ polar coorindate (ρ, φ)

- For some applications, the polar coordinate is preferred due to its geometric
meaning.

• For any rotation matrix R ∈ SO(3), it turned out R = e[ω̂]θ


- ω̂: unit vector representing the axis of rotation

- θ: the degree of rotation

- ω̂θ is called the exponential coordinate for SO(3).

Exponential Coordinate Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 17 / 30


Skew Symmetric Matrices
• Recall that cross product is a special linear transformation.

• For any ω ∈ Rn , there is a matrix [ω] ∈ Rn×n such that ω × p = [ω]p


⎡ ⎤ ⎡ ⎤
ω1 0 −ω3 ω2
ω = ⎣ ω2 ⎦ ↔ [ω] = ⎣ ω3 0 −ω1 ⎦
ω3 −ω2 ω1 0

• Note that [ω] = −[ω]T ← skew symmetric

• [ω] is called a skew-symmetric matrix representation of the vector ω

• The set of skew-symmetric matrices in: so(n)  {S ∈ Rn×n : S T = −S}

• We are interested in case n = 2, 3

Exponential Coordinate Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 18 / 30


Find Rotation Rot(ω, θ) via Differential Equation
• Consider a point p with coordinate p0 at time t = 0

• Rotate the point with constant unit velocity around fixed axis ω. The motion
is described by

ṗ(t) = ω × p(t) = [ω]p(t), with p(0) = p0

• This is a linear ODE with solution: p(t) = e[ω̂]t p0

• Note p(θ) = Rot(ω, θ)p0 , therefore

Rot(ω, θ) = e[ω]θ

Exponential Coordinate Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 19 / 30


Find Rotation Rot(ω, θ) via Differential Equation
• Exponential Map: By definition

[ω]θ θ2 2 θ3 3
e = I + θ[ω] + [ω] + [ω] + · · ·
2! 3!
• Rodrigues’ Formula: Given any [ω] ∈ so(3), we have

e[ω]θ = I + [ω] sin(θ) + [ω]2 (1 − cos(θ))

Exponential Coordinate Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 20 / 30


Find Rotation Rot(ω, θ) via Differential Equation

• Proposition: For any unit vector [ω̂] ∈ so(3) and any θ ∈ R,

e[ω̂]θ ∈ SO(3)

Exponential Coordinate Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 21 / 30


Examples of Forward Exponential Map
• Rotation matrix Rx (θ) (corresponding to x̂θ))

( 0, 1)T
• Rotation matrix corresponding to (1,

Exponential Coordinate Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 22 / 30


Logarithm of Rotations
• Proposition: For any R ∈ SO(3), there exists ω̂ ∈ R3 with ω̂ = 1 and
θ ∈ R such that R = e[ω̂]θ

- If R = I, then θ = 0 and ω̂ is undefined.

- If tr(R) = −1, then θ = π and set ω̂ equal to one of the following


⎡ ⎤ ⎡ ⎤ ⎡ ⎤
r13 r12 1 + r11
1 ⎣ ⎦,  1 ⎣ 1 + r22 ⎦ ,  1 ⎣ ⎦
 r23 r21
2(1 + r33 ) 1 + r33 2(1 + r22 ) r32 2(1 + r11 ) r31

1 
- Otherwise, θ = cos−1 2
(tr(R) − 1) ∈ [0, π) and [ω̂] = 1
2 sin(θ)
(R − RT )

Exponential Coordinate Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 23 / 30


Exponential Coordinate of SO(3)

exp: [ω̂]θ ∈ so(3) → R ∈ SO(3)


log: R ∈ SO(3) → [ω̂]θ ∈ so(3)

• The vector ω̂θ is called the exponential coordinate for R

• The exponential coordinates are also called the canonical coordinates


c of the
rotation group SO(3)

Exponential Coordinate Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 24 / 30


Outline

• Mathematics of Rigid Body Transformation

• Rotation Matrix and SO(3)

• Euler Angles and Euler-Like Parameterizations

• Exponential Coordinate of SO(3)

• Quaternion Representation of Rotation

Quaternions Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 25 / 30


Quaternions
• Quaternions generalize complex numbers and can be used to effectively
represent rotations in R3 .
• A quaternion is a vector quantity of the following form:

q = q0 + q1 i + q 2 j + q3 k

where q0 is the scalar (“real”) component and q = (q1 , q2 , q3 ) is the vector


(“imaginary”) component.
• Addition and multiplication operations:
- p + q = (p0 + q0 ) + (p1 + q1 )i + (p2 + q2 )j + (p3 + q3 )k
- i2 = j 2 = k2 = ijk = −1
- ij = k = −ji, jk = i = −kj, ki = j = −ik

• In scalar-vector form, product of p = (p0 , p


) and q = (q0 , q) is given by

pq = p0 q0 − pT q, p0 q + q0 p + p × q

Quaternions Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 26 / 30


Conjugate, Norm, and Inverse
• Given a quaternion q = (q0 , 
q ):
- Conjugate: q ∗ = (q0 , −q)

- Norm: q2 = qq ∗ = q ∗ q = q02 + q12 + q22 + q32

q∗
- Inverse: q −1  q2

Quaternions Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 27 / 30


Quaternion Representation of Rotation
v ∈ R3 , we can associate it with a 0 scalar component to construct a
• For 
purely imaginary quaternion:
v̊ = (0, v )
q ) defines an operation on a vector v ∈ R3 :
• Each quaternion q = (q0 , 


Lq (v ) = Im(qv̊q
m ) = (q02 − q2 )v + 2(qT v )q + 2q0 (q × v )

Quaternions Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 28 / 30


Quaternion Representation of Rotation
• Unit quaternion: If q = 1, we can always find θ ∈ [0, 2π) and unit vector
ω̂ ∈ R3 such that:
θ θ
q = cos 2 , ω̂ sin 2

In this case, Lq (v ) is the vector obtained by rotating v ∈ R3 about the axis ω̂
for θ degree.

• Given a unit quaternion q = (q0 , 


q ), we can extract the rotation axis/angle by:
q

−1 sin(θ/2) if θ = 0
θ = 2 cos (q0 ), ω̂ =
0 otherwise

v ) rotates v about ω̂ for −θ degree.


• Lq∗ (

• Quaternion provides global parameterization of SO(3), which does not suffer


from singularities

Quaternions Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 29 / 30


Examples of Quaternions

Quaternions Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 30 / 30

You might also like