Title: Module 1 State Space
1Robotics and Machine Vision
Module 1 - State Space
Dr Cheng Chang Dong
Email eleccd_at_singnet.com.sg
http//vlab.ee.nus.edu.sg/ccd/teaching.html
Mobile97469867
2Robotics and Machine Vision
Preface
- What to be taught and what you can learn?
- How does robot manipulate its complex arm
- How does robot determine its gripper
- How does robot determine its gripper
- How does robot detect goal
- Which areas are covered in the ENG4406 module?
- Matrix and vector fundamentals
- Control theory and linear system
- Discrete time system, computer control and
simulation
- Computer vision and image processing
3Robotics and Machine Vision
Outline of Module 1
- What is linear dynamic system
- What is non-linear dynamic system
- What is state space method
4Robotics and Machine Vision
Dynamic System
Dynamic model of mechanical system is based on
Newtons law
Beginning with a simple example
Notes
- Force F a vector, which is the sum of all forces
applied to each body of a system
- Acceleration a is also a vector, having a
direction parallel to F
- m is the mass of the body
5Robotics and Machine Vision
Dynamic System (cont.)
Solution of the equation
Where k1 and k2 are parameters to be determined
by initial conditions
Suppose that the initial position and velocity of
the body are zero
F is input, and z is output
6Robotics and Machine Vision
Dynamic System (cont.)
F is input, and z is output
Suppose F is a constant, we can obtain the
following figure
7Robotics and Machine Vision
Dynamic system (cont.)
Lets turn to dynamic system.
What is dynamic system? How to represent a
dynamic system in mathematics?
- Ordinary differential equation (ODE) - whatever
it is mechanic or electrical system
Note another concept is linear algebraic
equation, which cannot be used to represent
dynamic system
Mechanical system
8Robotics and Machine Vision
Dynamic system (cont.)
state variable is the voltage on the capacitor,
v. The current which will flow through the
resistor is v/R. The equation linking voltage and
inflowing current i for a capacitor is
Electrical system
9Robotics and Machine Vision
Dynamic system (cont.)
- Difference equation - to facilitate numerical
computation, we usually use this form of
representation
Note difference equation will be covered in the
compute control module
10Robotics and Machine Vision
Linear Dynamic System
What is linear linear system?
Firstly, we make a transformation for the above
equation of dynamic system.
where Z(s) and F(s) are the Laplace transforms of
the position z and the force F, respectively
11Robotics and Machine Vision
Linear Dynamic System (cont.)
Compare the two following equations
Transfer function of dynamic system is
characterized by G(s), which is the ratio between
the Laplace transforms of the output and the
input
Through Laplace transform, it is quite clear that
there exists linear relationship between input
and output
The linear differential equation now can be
analysed by algebraic methods
There is analytical solution to most of linear
systems according to the above equation.
A special advantage of the frequency response
approach is the fact that often this data can be
obtained experimentally and leads directly to a
useful model
12Robotics and Machine Vision
Linear Dynamic System (cont.)
Why we prefer studying linear system?
A linear system has many attractive properties
and obeys the superposition principle.
This means that if the output signal is y for a
specific input amplitude, then the output will be
2y if the input is doubled.
where s is the Laplace variable and Y(s) and U(s)
the Laplace transforms of y(t) and u(t)
13Robotics and Machine Vision
Linear Dynamic System (cont.)
However, in the real world, most processes are
basically non-linear
- Under certain conditions, a nonlinear system can
behave like a linear one
14Robotics and Machine Vision
Linear Dynamic System (cont.)
- A linear description is then valid for small
deviations around an equilibrium point
15Robotics and Machine Vision
Linear Dynamic System (cont.)
For a linear system, we can use either transfer
function or state space (will be covered in this
module) to represent it
What is difference between transfer function
representation and state space representation?
16Robotics and Machine Vision
Linear Dynamic System (cont.)
Transfer function
State space
Internal description
External description
Input/Output descriptions
State descriptions
Frequency response method
Time response method
Laplace transform
Matrix
some of the internal couplings are hidden
State variables are shown
the system representation becomes more compact
with fewer parameters
More parameters representation
Single-input and single output
Multi-input and multi-output
block diagrams and their manipulations, poles and
zeros
17Robotics and Machine Vision
Non-linear Dynamic System
Now lets discuss non-linear systems briefly
Usually there is no analytical solution to
non-linear systems
However, the solutions can be obtained
numerically
18Robotics and Machine Vision
Non-linear Dynamic System (cont.)
In order to solve the non-linear differential
equations we refer mostly to numerical methods.
An elementary solution to the differential
equation is obtained by approximating the time
derivative with a simple difference equation (the
forward Euler approximation),
Knowing the initial conditions x(0) one can
compute the states x(h), x(2h), x(3h), ..., that
are close to the true solution at times h, 2h,
3h, etc. It is crucial to choose a step size h
that is sufficiently small. Too short a step size
will give unreasonably long solution times, while
h that is too large will cause numerical
problems. These problems may be significant,
particularly if the plant dynamics contain both
fast and slow dynamics together
Numerical instability is an important things in
numerical computation
19Robotics and Machine Vision
Non-linear Dynamic System (cont.)
An computer computation example
Suppose that x(0) 1.0, and h0.02
20Robotics and Machine Vision
Non-linear Dynamic System (cont.)
A popular class of integration methods are the
Runge-Kutta methods to be used in our future
assignments
Another use of discrete time system is computer
control and simulation A computer works in
discrete time and therefore cannot process data
that varies continuously in time. When a
computer is used to collect data and to generate
control signals, this will necessarily take place
at defined time instances
This interval is known as sampling time
For more details on numerical analysis and
solution, we will discuss them on the module of
computer control
21Robotics and Machine Vision
State Space
- State Variables and State Space
Inner description
We consider the two variables, position z and
velocity v as state variables
22Robotics and Machine Vision
State Space (cont.)
We obtain the standard form of linear
differential equations
At the same time, output form is written as
The homogeneous format
23Robotics and Machine Vision
State Space (cont.)
Where X is state vector U is input vector Y is
output vector
A is state matrix B is input matrix C is output
matrix
The state space approach leads to differential
equations only of first order
Three important concepts in state space method
Controllability
Observeability
System stability
24Robotics and Machine Vision
State Space (cont.)
Linear system equation
- Single-input and single-output system (SISO)
Only one valid input and one valid output
involved in the system
- Multi-input and multi-output system (MIMO)
Multiple valid inputs and valid outputs involved
in the system
Inputs
Outputs
Fore-wing
x, y and z
Back-wing
yaw, roll and picth
Engine 1
Engine 2
25Robotics and Machine Vision
State Space (cont.)
Time-constant system
Time-varying system
26Robotics and Machine Vision
State Space (cont.)
1-dimensional space
2-dimensional space
27Robotics and Machine Vision
State Space (cont.)
3-dimensional space right hand
n-dimensional space we cannot illustrate it
intuitively
28Robotics and Machine Vision
Matrix Fundamentals
Why we have to know matrix in the Robotics and
Machine Vision?
1. Robotics manipulation, including rotation,
translation
2. Pixel processing in machine vision
29Robotics and Machine Vision
Matrix Fundamentals (cont.)
column
Matrix form
row
4X5 matrix
Unit matrix diagonal elements are 1 and the
rest are zero
30Robotics and Machine Vision
Matrix Fundamentals (cont.)
Square matrix number of row is equal to number
of column
Note unit matrix is square matrix
Sparse matrix
31Robotics and Machine Vision
Matrix Fundamentals (cont.)
Symmetric matrix
32Robotics and Machine Vision
Matrix Fundamentals (cont.)
Diagonal matrix
33Robotics and Machine Vision
Matrix Fundamentals (cont.)
Matrix Properties
Commutative
Associative
Distributive
34Robotics and Machine Vision
Matrix Fundamentals (cont.)
Matrix Manipulation
Addition
Example
Note only two matrices with equal number of row
and equal number of
column
35Robotics and Machine Vision
Matrix Fundamentals (cont.)
Multiplication
Example
Note number of column of A must be equal to
number of row of B
Only when it is a square matrix
36Robotics and Machine Vision
Matrix Fundamentals (cont.)
Equality
Example
Note number of row of A must be equal to number
of row of B
number of column of A must be equal to number of
column of B
37Robotics and Machine Vision
Matrix Fundamentals (cont.)
Transpose
Example
Scale multiplication
38Robotics and Machine Vision
Matrix Fundamentals (cont.)
Inverse
Note not any matrix has its inverse, only
non-singular matrix has inverse
Non-singular matrix only when its determinant is
not zero
For example
does not have its inverse
39Robotics and Machine Vision
Matrix Fundamentals (cont.)
Example
We can obtain
For more higher dimensional inverse matrix,
please refer to related books or
http//mathworld.wolfram.com/MatrixInverse.html
40Robotics and Machine Vision
Matrix Fundamentals (cont.)
Trace of a square matrix sum of diagonal
elements
41Robotics and Machine Vision
Matrix Fundamentals (cont.)
Row vector
Column vector
Vector space including state space
42Robotics and Machine Vision
Matrix Fundamentals (cont.)
Linear Mapping
X and Y are vectors, and A is mapping matrix
Through the form, Y space is mapped to X space
Solution of equation
Only when A is a not singular matrix
When A is a singular matrix, A has
pseudo-inverse, which is beyond the scope of this
module.
43Robotics and Machine Vision
Matrix Fundamentals (cont.)
Meaning of singular matrix
No solution or multiple solutions for robotic
control
Physical meaning of pseudo-inverse
Obviously, x3 cannot be solved
Gripper
Goal
Base
44Robotics and Machine Vision
Simple Robotic System
Robot definition from Robot Institute of America
A robot is a reprogrammable multifunctional
manipulator designed to move material, parts,
tools or specialized devices through variable
programmed motions for the performance of a
variety of tasks
In this module, we focus on how to control a
robot in stead of how to design a robot in
mechanical and electrical way
We need to understand
A few basic concepts
Base
Links
Joints
Gripper (end-effector)
45Robotics and Machine Vision
Simple Robotic System (cont.)
We first discuss the single form of robot robot
arm with a few links and joints
46Robotics and Machine Vision
Simple Robotic System (cont.)
- Two Kinds of Coordinate System
Global coordinate system - Fixed coordinate
system - World coordinate system - Reference
coordinate system - Base coordinate system
Local coordinate system
47Robotics and Machine Vision
Simple Robotic System (cont.)
Revolute joint rotational joint (1-DOF)
Degree of Freedom (DOF)
48Robotics and Machine Vision
Simple Robotic System (cont.)
Prismatic joint translation joint (1-DOF)
Spherical joint (3-DOF)
49Robotics and Machine Vision
Robotic Kinematics
The essential task of a robot is to move objects
or tools from one position in space to another
Coordinates movement in space will have to be
transformed into a movement in joint coordinates
For example, rotate joint 1 by 30 degrees
clockwise, extend link 2 by 1 mm, and rotate
joint 3 by 30 degrees anticlockwise
50Robotics and Machine Vision
Robotic Kinematics (cont.)
This relationship is mathematically represented
by a 4 ? 4 Homogeneous transformation matrix
?x ?y 3 ? 1 Translation ?z
1 Global Scale
Rotational matrixtranslationscaleperspective
51Robotics and Machine Vision
Robotic Kinematics (cont.)
Example translate 3cm along x axis
Translation matrix is
Original system matrix is
Matrix after translation is
52Robotics and Machine Vision
Robotic Kinematics (cont.)
Rotation around the Z-Axis
53Robotics and Machine Vision
Robotic Kinematics (cont.)
Rotation around the Y-Axis
Rotation around the X-Axis
54Robotics and Machine Vision
Robotic Kinematics (cont.)
Kinematics studies the transformation of links
and joints without taking force and toques into
account
However, dynamics studies the performance
measures how the links and joints moves as a
function of time
In 3-dimensional space, there exists 6 parameters.
For example, in Cartesian coordinate system,
three position parameters and rotational
parameters are used to reflect 6 degrees of
freedom
Normally, these parameters can be denoted by x,
y, z, yaw, pitch and roll
55Robotics and Machine Vision
Robotic Kinematics (cont.)
In the actual robotic control, each DOF
corresponds to one joint actuator movement
A robot therefore needs six degrees of freedom if
it is to move the end effector to an arbitrary
position and orientation.
However, for a joint, it is not possible to be
designed in 6-DOF form
56Robotics and Machine Vision
Robotic Kinematics (cont.)
Forward kinematics Given angles of each joint,
and length of each link, calculate position and
orientation of end effector
Inverse kinematics Given desired position and
orientation of end effector, and length of each
link, calculate angles of each joint needed to
obtain that position
Problem of inverse kinematics Need to solve a
set of non-linear simultaneous equations
- Existence of multiple solutions
- Possible non-existence of a solution
57Robotics and Machine Vision
Software
Have to pay
Free
58Robotics and Machine Vision
Thank you