You are on page 1of 47

Robotics

Doan The Thao

1-1
Robotics
This course will provides:
• An overview of basic components of
manıpulators systems
• Coordinate frames, Homogeneous
transformations,
• Kinematics
• Inverse kinematics
• Jacobians: velocities and static forces for
manipulators.

1-2
Linear Algebra Review
In this course, you will learn:

• How to apply concepts from linear algebra


theory and the tools to configure and control
motion of manipulators.
• Step by step how to use MATLAB to write
functions, calculate matrix transformations and
produce visualizations
• Use Solidworks, SimMechanics Link, and
Simulink to simulate the motion of manipulators
in lab exercises.

1-3
Coordinate Transforms in Robotics

1-4
Cartesian Plane
• To locate a point in a plane, two numbers are
necessary
• We know that any point in the plane can be
represented as an ordered pair (a, b) of real
numbers—where a is the x-coordinate and b
is the y-coordinate.

1-5
Cartesian Plane
• Note that we can also talk about vectors.
Corresponding to directions in the plane or to
displacements between points. These can
also be represented by tuples

1-6
3-D coordinate systems
To locate a point in space, three numbers are
required.

1-7
3-D coordinate systems
The point P(a, b, c) determines a rectangular box.

1-8
Coordinate axes
• Curl the fingers of your right hand around the z-
axis in the direction of a 90° counterclockwise
rotation from the positive x-axis to the positive
y-axis.
Then, your thumb
points in the positive
direction of the z-axis.

1-9
Vectors
• A vector is a quantity that has size and direction
• Examples of everyday activities that involve
vectors include:
• Walking (you walk at a velocity of around 6 km/h in the
direction of the bathroom)
• Going to school (the bus has a length of about 20 m and is
headed towards your school)

• And acceleration, momentum, angular momentum,


magnetic and electric fields are also all vectors.
Note: A vector is not the same as a scalar. Scalars have magnitude only. For example, a speed of 35
km/h is a scalar quantity, since no direction is given. Other examples of scalar quantities are:

Volume, density, temperature, mass, speed, time, length, distance, work and energy.

Each of these quantities has magnitude only, and do not involve direction.
1-10
Vectors
• Arrays of numbers
• They represent a point in a n dimensional
space

 a1 
 a1  ; a  ;
 2
 a1 
 a1  a 
a  ;  2
 2  
 a3   
 an 
1-11
Example of Vector Components

1-12
Magnitude and Direction from
Components

1-13
Unit Vectors
In mathematics, a unit vector in a normed vector space is a
vector of length 1. A unit vector is often denoted by a
lowercase letter with a "hat". ^ ^ ^
r  x i  y j z k

1-14
Vector Notation
• We will use a bold capital letter to name
vectors. For example, a force vector could be
written as F.
• Alternative vector notations
Some textbooks write vectors using an arrow above the vector
name, like this: vector with arrow F

You will also see vectors written using matrix-like notation. For
example, the vector acting from O (0, 0, 0) in the direction of the
point P (2, 3, 4) can be written

2
OP P OP  
P   3    2 3 4
T

 4  1-15
Free vector
• A free vector is one whose action is not confined
to or associated with a unique line in space.
For example if a body is in translational motion, velocity of any point
in the body may be taken as a vector and this vector will describe
equally well the velocity of every point in the body. Hence, we may
represent the velocity of such a body by a free vector. In statics,
couple moment is a free vector.

1-16
Sliding vector
• A sliding vector is one for which a unique line in
space must be maintained along which the
quantity acts.
When we deal with the external action of a force on a rigid body, the
force may be applied at any point along its line of action without changing
its effect on the body as a whole and hence, considered as a sliding
vector.

1-17
Fixed vector
• A fixed vector is one for which a unique point of
application is specified and therefore the vector
occupies a particular position in space.

The action of a force on a deformable body must be specified by a fixed


vector.

1-18
Vectors: Scalar Product

• Scalar-Vector Product

ka; ka

• Changes the length


of the vector, but
not its direction

1-19
Dot Product of Vectors (inner product)

The inner product is a scalar value

A  B  A  B cos( )

 A  Ax i  Ay j  Az k ;
 A  B  Ax Bx  Ay By  Az Bz
 B  Bx i  By j  Bz k ;
 AT   Ax Ay Az  ;
  
 Bx 


 Bx 
  A T
 B   Ax Ay Az    By   Ax Bx  Ay By  Az Bz  A  B;
 B   By   Bz 
  Bz 

1-20
Work as a Dot Product
• A force is said to do work if, when acting, there
is a movement of the point of application in the
direction of the force

W  F  d  F  d cos( ) [ J ]  [ N ][m]

1-21
Vector Product of Vectors cross product

A  B  A B sin(A, B )

A  B is perpendicular to both vectors A, B

A  B  ( Ay Bz  Az By )i  ( Ax Bz  Az Bx ) j  ( Ax By  Ay Bz )k
i j k
Ay Az Ax Az Ax Ay
A  B  Ax Ay Az  i j k
By Bz Bx Bz Bx By
Bx By Bz
A  B  ( Ay Bz  Az By )i  ( Ax Bz  Az Bx ) j  ( Ax By  Ay Bz )k
T
A × B   Ay Bz  Az By Az Bx  Ax Bz Ax By  Ay Bz  1-22
Right Hand Rule, Vector
Product
 Ay Bz  Az By   0  Az Ay   Bx 
    
A × B   Az Bx  Ax Bz    Az 0  Ax   By 
 Ax By  Ay Bz    Ay Ax 0   Bz 
  

1-23
Vector Product Applications
Physically, it appears in the calculation of torque and in the
calculation of the magnetic force on a moving charge.

Relationship between force F,


torque , linear momentum
p=mv, and angular
momentum L F  qv  B
L
F  q B sin( )  ILB sin 
t 1-24
Matrices
• A matrix is written as a table of values
• Can be used in many ways:

 a11 a12 a14 


a a22 a24 
A  21

 
 
 a41 a42 a44 

1-25
Matrices as Collections of
Vectors
Column vectors

A   a*1 a*2 a*n 


  
 a11 a12 a1n 
a a22 
a2 n 
A  21

 
 
 am1 am 2 amn  1-26
Matrices as Collections of
Vectors
Row vectors

 a11 a12 a1n    a1*T 


a   T 
 a22 a2 n    a2* 
A 21

   
   T 
 am1 am 2 amn    am* 

1-27
Matrices Operations

• Transposition
• Addition and Subtraction (commutative,
associative)
• Multiplication by a scalar
• Matrix Multiplication (not commutative)
• Special matrices (Diagonal, Null, Identity)
• Inversion (square, full rank)

1-28
Transposition
The transpose of A is denoted by A' or (AT)

 a11 a12   a11 a21 a31 



A   a21 a22  A'   
 a12 a22 a32 
 a31 a32 
If A = A', then A is symmetric
If AT = -A, then A is skew -symmetric
 0  Az Ay 
 
A   Az 0  Ax 
  Ay Ax 0 
 1-29
Addition and Subtraction
Two matrices may be added (or subtracted) if
they are the same order.

 a11 a12   b11 b12   c11 c12   a11  b11 a12  b12 
a a22   b21 b22   c21 c22    a21  b21 a22  b22 
 21
 a31 a32  b31 b32   c31 c32   a31  b31 a32  b32 

 AB BA
 A  (B  C)  ( A  B)  C
 A0 A
Note: The null matrix is called the additive identity for the matrices. 1-30
Multiplication by a scalar

 a11 a12   ka11 ka12 


k 
a21 a22  ka21 ka22 

 c( A  B)  cB  cA
 (c  k ) A  cA  kA
 c(kA)  (ck ) A
 1A  A
1-31
Matrix Multiplication
In order to multiply matrices, they must be
CONFORMABLE
that is, the number of columns in A must equal
the number of rows in B

A  B  C
( m  n)  ( n  p )  ( m  p )

1-32
Matrix Multiplication

1-33
Matrix Multiplication
1 4 7  1 4  30 66 
 2 5 8    2 5   36 81
     
 3 6 9   3 6   42 96 
 A  1 1
  1
  1 A  B  1 1    0
B1 1
  
 1 1
C    D    AC  AD  0
1  1
• AB ≠ BA in general.
• AB = 0 does not imply A = 0 or B = 0 or BA = 0
• AC = AD does not imply C = D

1-34
Matrix Multiplication

 (kA)B  k ( AB)  A(kB)

 A(BC)  ( AB)C

 ( A  B)C  AC  BC

 ( AB) 1  B 1A 1

1-35
Special matrices (Diagonal, Null,
Identity)
a11 0 0 0 0 0 0 0 1 0 0 0
0 a 0 0 0 0 
0 0   0 0 1 0
 22
I
0 0 a33 0  0 0 0 0 0 0 1 0
     
0 0 0 a44  0 0 0 0 0 0 0 1

For an m × n matrix A
 a11 a12 a1n  i11  i11 
a a22 a2 n   i22   i22 
A mn   21 ; Im   ; I   
    n
 
     
 am1 am 2 amn   imm   inn 

I m  A mn  A mn  I n  A mn 1-36
Rank of a matrix
• The rank of a matrix is defined as:

rank(A) = number of linearly independent vector rows


= the number of linearly independent vector
columns.

• A set of vectors is said to be linearly dependent


if scalars c1, c2, …, cn (not all zero) can be found
such that c a  c a   c a  0
1 1 2 2 n n
1   3
1 2 3  a1T     
3 6 9    T  ; a1   2  ; a 2  6  ;  3a1  a 2  0
  a 2   3  9 

The second row is just 3 times the first row. So even though there are 2 rows, the rank is only 1. 1-37
Rank of a matrix

• A matrix A of dimension n  p (p < n) is of


rank p. Then A has maximum possible rank
and is said to be of full rank.

• In general, the maximum possible rank of an


n x p matrix A is min(n, p).

1-38
Example

Linearly independent

Linearly independent

Linearly independent

Linearly dependent

Linearly independent

Linearly independent
Linearly dependent  Row-Rank = 2
1-39
Find the Rank of the Matrix by Row Reduction Method
1 1 1 3 
Find the rank of the following matrix
A   2 1 3 4 
 5 1 7 11
R2  R2  2 R1 R3  R3  5R1
2 1 3 4 1 1 1 3 
5 1 7 11
 2 2 2 6
 5 5 5 15
0 3 1 2 
 
0 6 2 4 
0 3 1 2 0 6 2 4

R2  2 R2  R3
0 6 2 4 1 1 1 3 
 0 6 2 4
0 3 1 2 
 
0 0 0 0 
0 0 0 0
The number of non zero rows are 2. Hence the rank of
the above matrix is 2. 1-40
The Determinant of a Matrix
• The determinant of a matrix A is denoted by |A|
(or det(A)).

• Determinants exist only for square matrices

C   4 C 4
1 x1

 a1 b1 
C   C   a1  b2    b1  a2 
2x2
 a2 b2 
3 2 
C   C   3 1   2  5   3  10  7
2x2
5 1 
1-41
The Determinant of a Matrix
Subtract these three products

 a11 a12 a13  a11 a12 a13 a11 a12


A   a21 a22 a23  a21 a22 a23 a21 a22
 a31 a32 a33  a31 a32 a33 a31 a32
Add these three products

 det( A) | A | a11a22a33  a12a23a31  a13a21a32  a31a22a13


 a32a 23a11  a33a21a12

1-42
The Determinant of a Matrix
 Minor of the entry aij: the determinant of the
matrix obtained by deleting the i-th row and j-th
column of A. Mij is a real number

i j
• Cofactor of aij. Cij  ( 1) M ij
Cij is also a real number
n
det( A) | A |  aij Cij  ai1Ci1  ai 2Ci 2   ainCin
j 1

(cofactor expansion along the i-th row, i=1, 2,…, n)


1-43
Properties of Determinates

• |A|=|A'|.
• If a row or column of A = 0, then |A|= 0.
• If every value in a row or column is multiplied
by k, then |A| = k|A|.
• If two rows or columns are identical, |A| = 0.
• If two rows or columns are linear
combination of each other, |A| = 0
• |AB| = |A| |B|
• Determinant of a diagonal matrix = product
of the diagonal elements

1-44
The Inverse of a Matrix (A-1)

• For an n  n matrix A, there may be a B such


that AB = I = BA.
• A matrix which has an inverse is nonsingular.
• A matrix which does not have an inverse is
singular.
• An inverse exists only if A  0

1 1 1
A  (adjoint of A)= (cofactor matrix of A)T
det( A) det( A)

1-45
The Inverse of a Matrix (A-1)
1 2 3  1 2 3
Find the inverse of A  5 4 7  det( A)  5 4 7  18
1 2 6  1 2 6

10 23 6      10 23 6   10 6 2 


6 3 0      6 3 0   23 3 8 
       
 2 8 6        2 8 6   6 0 6 

Matrix of Minors Matrix of Cofactors Adjugate


(also called Adjoint)

 10 6 2   10 6 2   0.5556 0.3333 0.1111


A 1    23 3 8     23 3 8    1.2778 -0.1667 -0.4444 
1 1
18 18
 6 
0 6   6 0 6   -0.3333 0 0.3333 

1-46
Properties of inverse matrices

 AB 
1
  B A -1 -1

A  A 
1 T
 T
 -1

A 
1
 -1
 A

1-47

You might also like