Chapter 2 Math Fundamentals

Similar documents
Attitude Estimation Version 1.0

arxiv: v1 [math.ds] 18 Nov 2008

Curves in the configuration space Q or in the velocity phase space Ω satisfying the Euler-Lagrange (EL) equations,

Rotation outline of talk

Chapter 3 Numerical Methods

Quaternions. Basilio Bona. Semester 1, DAUIN Politecnico di Torino. B. Bona (DAUIN) Quaternions Semester 1, / 40

Linear Algebra Practice Problems

Introduction to quaternions

(3.1) a 2nd-order vector differential equation, as the two 1st-order vector differential equations (3.3)

Complex Numbers and Quaternions for Calc III

(W: 12:05-1:50, 50-N202)

CS205B / CME306 Homework 3. R n+1 = R n + tω R n. (b) Show that the updated rotation matrix computed from this update is not orthogonal.

DYNAMICS OF SERIAL ROBOTIC MANIPULATORS

1 Tensors and relativity

Quaternions and their applications

Chapter 1. Rigid Body Kinematics. 1.1 Introduction

Representing Attitude: Euler Angles, Unit Quaternions, and Rotation Vectors

Designing Information Devices and Systems I Spring 2016 Official Lecture Notes Note 21

Lecture 7. Quaternions

Formalizing Basic Quaternionic Analysis

Physics 106a, Caltech 4 December, Lecture 18: Examples on Rigid Body Dynamics. Rotating rectangle. Heavy symmetric top

Lecture Note 1: Background

PSE Game Physics. Session (3) Springs, Ropes, Linear Momentum and Rotations. Atanas Atanasov, Philipp Neumann, Martin Schreiber

Lecture Notes - Modeling of Mechanical Systems

Leandra Vicci. Microelectronic Systems Laboratory. Department of Computer Science. University of North Carolina at Chapel Hill. 27 April 2001.

Lecture Schedule Week Date Lecture (M: 2:05p-3:50, 50-N202)

Video 1.1 Vijay Kumar and Ani Hsieh

Sketchy Notes on Lagrangian and Hamiltonian Mechanics

A Brief Outline of Math 355

Definition 1. A set V is a vector space over the scalar field F {R, C} iff. there are two operations defined on V, called vector addition

Dynamics 12e. Copyright 2010 Pearson Education South Asia Pte Ltd. Chapter 20 3D Kinematics of a Rigid Body

Robotics. Dynamics. Marc Toussaint U Stuttgart

Part IV. Rings and Fields

Eigenvalues and Eigenvectors

FFTs in Graphics and Vision. The Laplace Operator

Review for Final. elementary mechanics. Lagrangian and Hamiltonian Dynamics. oscillations

Robot Dynamics II: Trajectories & Motion

DYNAMICS OF PARALLEL MANIPULATOR

SYMMETRIES OF ROCKET DYNAMICS. Part 1. Executive Summary 1 1. Equations of Motion 1 2. The Problem to Solve 2. Part 2. Introduction 2 3.

Course Notes Math 275 Boise State University. Shari Ultman

Mysteries of Parameterizing Camera Motion - Part 2

Quaternion Dynamics, Part 1 Functions, Derivatives, and Integrals. Gary D. Simpson. rev 00 Dec 27, 2014.

Lecture 9: Eigenvalues and Eigenvectors in Classical Mechanics (See Section 3.12 in Boas)

Chap 3. Linear Algebra

21 Linear State-Space Representations

1 Fields and vector spaces

MATHEMATICAL PHYSICS

Rotational Kinematics. Description of attitude kinematics using reference frames, rotation matrices, Euler parameters, Euler angles, and quaternions

MULTIVARIABLE CALCULUS, LINEAR ALGEBRA, AND DIFFERENTIAL EQUATIONS

Leonhard Euler ( September 1783)

Multibody simulation

1 Mathematical preliminaries

Dynamics and Stability application to submerged bodies, vortex streets and vortex-body systems

1.1.1 Algebraic Operations

In this section of notes, we look at the calculation of forces and torques for a manipulator in two settings:

A Primer on Three Vectors

Classical Mechanics in Hamiltonian Form

QUATERNIONS AND ROTATIONS

Definition: A vector is a directed line segment which represents a displacement from one point P to another point Q.

Legendre Transforms, Calculus of Varations, and Mechanics Principles

Nonlinear Optimization

Physics 110. Electricity and Magnetism. Professor Dine. Spring, Handout: Vectors and Tensors: Everything You Need to Know

11.1 Vectors in the plane

18.06 Problem Set 8 - Solutions Due Wednesday, 14 November 2007 at 4 pm in

We use the overhead arrow to denote a column vector, i.e., a number with a direction. For example, in three-space, we write

Appendix Composite Point Rotation Sequences

Multibody simulation

Lecture 38: Equations of Rigid-Body Motion

Model Uncertainty and Robust Stability for Multivariable Systems

Chapter 2 Coordinate Systems and Transformations

Dot Products. K. Behrend. April 3, Abstract A short review of some basic facts on the dot product. Projections. The spectral theorem.

The Cross Product. MATH 311, Calculus III. J. Robert Buchanan. Fall Department of Mathematics. J. Robert Buchanan The Cross Product

Geometric Fundamentals in Robotics Quaternions

MATHEMATICS 217 NOTES

On complexified quantum mechanics and space-time

7.4 Rigid body simulation*

Rings. EE 387, Notes 7, Handout #10

Canonical transformations (Lecture 4)

The kinetic equation (Lecture 11)

In these chapter 2A notes write vectors in boldface to reduce the ambiguity of the notation.

Projective Bivector Parametrization of Isometries Part I: Rodrigues' Vector

GENERALIZED QUATERNIONS AND ROTATION IN 3-SPACE E 3 αβ

Kinematics. Chapter Multi-Body Systems

Lecture 41: Highlights

Chapter 4 The Equations of Motion

The VQM-Group and its Applications

Matrix Mathematics. Theory, Facts, and Formulas with Application to Linear Systems Theory. Dennis S. Bernstein

arxiv: v1 [cs.sy] 29 Aug 2017

Math 302 Outcome Statements Winter 2013

Attempts at relativistic QM

Introduction to gradient descent

Introduction to Integrability

Dynamics. Basilio Bona. Semester 1, DAUIN Politecnico di Torino. B. Bona (DAUIN) Dynamics Semester 1, / 18

3.024 Electrical, Optical, and Magnetic Properties of Materials Spring 2012 Recitation 1. Office Hours: MWF 9am-10am or by appointment

Inverse Kinematics. Mike Bailey. Oregon State University. Inverse Kinematics

Basic Math Review for CS4830

Represent this system in terms of a block diagram consisting only of. g From Newton s law: 2 : θ sin θ 9 θ ` T

Examples and MatLab. Vector and Matrix Material. Matrix Addition R = A + B. Matrix Equality A = B. Matrix Multiplication R = A * B.

we must pay attention to the role of the coordinate system w.r.t. which we perform a tform

3 What You Should Know About Complex Numbers

Transcription:

Chapter 2 Math Fundamentals Part 5 2.8 Quaternions 1

Outline 2.8.1 Representations and Notation 2.7.2 Quaternion Multiplication 2.7.3 Other Quaternion Operations 2.7.4 Representing 3D Rotations 2.7.5 Attitude and Angular Velocity Summary 2

Outline 2.8.1 Representations and Notation 2.7.2 Quaternion Multiplication 2.7.3 Other Quaternion Operations 2.7.4 Representing 3D Rotations 2.7.5 Attitude and Angular Velocity Summary 3

Quaternions Smart Irishman: Hamilton Probably the most powerful number system in common use. Hamiltonian mechanics Generalization of Lagrange Mechanics Which was a generalization of Newton-Euler Mechanics. Which was a generalization of Newtonian Mechanics. 4 4

Was It All the Guinness? 5 5

Core Problem and Properties How can we divide a vector by a vector? Answer. Need to have principle imaginaries : Quaternions: i 2 = j 2 = k 2 = ijk = 1 are generalizations of complex numbers which do not commute (complex #s do). can represent every transformation that an HT can represent. 6 6

Why Use Em? Only way to solve some problems like the problem of generating regularly spaced 3D angles. Best way to solve some problems. No gimbal lock at Euler angle singularity. Still not a unique representation though. Simplest way to solve some problems. Some problems in registration can be solved in closed form. Fastest way to solve some problems. Quaternion loop in an inertial navigation system updates vehicle attitude 1000 times a second. 7 7

Intuition from Complex Numbers Use a second imaginary dimension. Permits manipulation of rotations like a vector. Remember phasors in EE. i θ 8 8

Notations 4-tuples Hypercomplex numbers Sum of real and imaginary parts Ordered doublet Exponential ( q 0, q 1, q 2, q 3 ) q = q 0 + q 1 i+ q 2 j+ q 3 k q = q+ q ( qq, ) q = e 1 2 -- θw I will use these two Manipulate like Polynomials 9 9

My Preference Mostly use the scalar-vector sum form: q = q+ q ~ means quaternion means 3D normal vector means scalar Occasionally write it out to get hypercomplex form: q = q 0 + q 1 i+ q 2 j+ q 3 k 10 10

Outline 2.8.1 Representations and Notation 2.7.2 Quaternion Multiplication 2.7.3 Other Quaternion Operations 2.7.4 Representing 3D Rotations 2.7.5 Attitude and Angular Velocity Summary 11

Multiplication Quaternions are elements of a vector space endowed with multiplication. Just Like Complex Numbers The expression: p q = ( p 0 + p 1 i + p 2 j + p 3 k) ( q 0 + q 1 i + q 2 j + q 3 k) Gives the sum of all these elements: So, we need to define what i*i etc mean 12 12

Two goals: Multiplication Rule 1) Manipulate like polynomials 2) Product of two quaternions is a quaternion. To get things to work as Hamilton intended we need to have: Diagonals work like complex numbers. Off diagonals work like vector cross product. Or, more compactly: i 2 = j 2 = k 2 = ijk = 1 13 13

Product In hypercomplex (polynomial) form: p q = ( p 0 + p 1 i + p 2 j + p 3 k) ( q 0 + q 1 i+ p 2 j+ p 3 k) p q = ( p 0 q 0 p 1 q 1 p 2 q 2 p 3 q 3 ) + ( )i + In vector form: p q = ( p + p) ( q + q) p q = pq+ pq + qp + pq The last term can be written in terms of familiar vector products. pq = p q p q Convenient to summarize like so: 14 p q = pq p q + pq + qp + p q Not the same thing? 2 common vector products 14

Non-Commutativity The vector cross product does not commute. Therefore: p q q p What is the source of this property? 15 15

Outline 2.8.1 Representations and Notation 2.7.2 Quaternion Multiplication 2.7.3 Other Quaternion Operations 2.7.4 Representing 3D Rotations 2.7.5 Attitude and Angular Velocity Summary 16

Addition Works just like vectors, polynomials, and complex numbers. p + q = ( p 0 + q 0 ) + ( p 1 + q 1 )i + ( p 2 + q 2 )j+ ( p 3 + q 3 )k 17 17

Distributivity Works just like vectors, polynomials, and complex numbers. ( p + q )r = p r + q r p ( q + r ) = p q + p r 18 18

Dot Product and Norm Works just like vectors, polynomials, and complex numbers. p q = pq + p q Not the same thing Can now define a length (norm): q = q q Unit quaternions have a norm of unity. 19 19

Conjugate Works just like complex numbers. q * = q q Product with conjugate equals dot product: q q * = ( qq + q q) = q q Another way to get the norm is then: q = q q * 20 20

Quaternion Inverse The Big Kahuna. Since we have: q q * q 2 = 1 By definition of inverse: q * q 1 = q 2 So. p -- = p q 1 = p ------- q * q q 2 That s how you divide a vector by a vector! 21 21

Outline 2.8.1 Representations and Notation 2.7.2 Quaternion Multiplication 2.7.3 Other Quaternion Operations 2.7.4 Representing 3D Rotations 2.7.5 Attitude and Angular Velocity Summary 22

Quaternionize : Vectors as Quaternions x = 0+ x 23 23

The unit quaternion: Rotations as Quaternions Represents the operator which rotates by the angle θ around the axis whose unit vector is ww. q = θ cos -- + ŵsin θ 2 2 -- The inverse is clearly: ŵ = q q θ = 2atan 2( q, q) Real vectors are just quaternions 0+xi+yj+zk 24 24

Rotating a Vector (Point) Use the quaternion sandwich: w x' = q x q * x x θ 25 25

Composite Rotations Use the composite quaternion sandwich. Recall: Thus: x' x '' = q x q * = p x' p * = ( p q )x ( q *p * ) Conjugate of a product works like matrices! Composition of operations equals multiplication. 26 26

Quaternion to Rot() Matrix For the quaternion: q = q 0 + q 1 i+ q 2 j+ q 3 k The equivalent Rot() matrix is: R = 2 [ + q 1 ] 1 2q [ 1 q 2 q 0 q 3 ] 2q [ 1 q 3 + q 0 q 2 ] 2q 0 2 2 2 2q [ 1 q 2 + q 0 q 3 ] 2q [ 0 + q 2 ] 1 2q [ 2 q 3 q 0 q 1 ] 2 2 2q [ 1 q 3 q 0 q 2 ] 2q [ 0 q 1 + q 2 q 3 ] 2q [ 0 + q 3 ] 1 27 27

For the Rot() matrix: Rot() Matrix to Quaternion The equivalent quaternion is determined from: R 2 r 11 + r 22 + r 33 = 4q 0 1 2 r 11 r 22 r 33 = 4q 1 1 r 11 r 22 r 33 = + = 2 4q 2 1 + = 2 4q 3 1 r 11 r 22 r 33 r 11 r 12 r 13 r 21 r 22 r 23 r 31 r 32 r 33 Are quaternions unique for a given rotation? 28 28

Calculus (wrt scalars) Derivatives work like you would expect: dq dt = dq dt + dq dt Integrals work like you would expect: t 0 q dt = t 0 qdt + t 0 q dt 29 29

Outline 2.8.1 Representations and Notation 2.7.2 Quaternion Multiplication 2.7.3 Other Quaternion Operations 2.7.4 Representing 3D Rotations 2.7.5 Attitude and Angular Velocity Summary 30

Angular Velocity Define the angular velocity: ω n () t = ( ω 0 + ω 1 i + ω 2 j + ω 3 k) For a unit quaternion representation of orientation: q () t Its time derivative is: Recall the skew matrix derivative of a rotation matrix. = cos θ --------- () t + ŵsin--------- θ() t 2 2 dq () t 1 = -- ω dt 2 n ()q t () t dubyaq 31 31

Angular Velocity That was for angular velocity represented in navigation coordinates: ω n () t = ( ω 0 + ω 1 i + ω 2 j + ω 3 k) If you have it in body coordinates, just use the instantaneous value of q () t itself to convert: Substituting: ω n () t = q ( t)ω b ()q t () t * dq () t 1 = -- q ( t)ω dt 2 b () t Qdubya 32 32

Quaternion Loop Runs at 10 khz inside an INS: q () t = t 1 -- q ( t)ω 2 b t 0 () dt 16 * 2 = 32 flops 33 33

Quaternion Loop For highest accuracy, we can use Jordan s trick: Define the skew matrix of a quaternion: 34 34

Quaternion Loop But such matrices have closed form exponentials: Where: After more manipulation 35 35

Outline 2.8.1 Representations and Notation 2.7.2 Quaternion Multiplication 2.7.3 Other Quaternion Operations 2.7.4 Representing 3D Rotations 2.7.5 Attitude and Angular Velocity Summary 38

Summary Quaternions are hypercomplex numbers with an i,j,and k that act like the i in complex numbers. Notation is half the battle. Provide elegant and efficient ways to model 3D transformations of points (and hence 3D coordinate system conversions). 39 39