Control
OVERVIEW
Forward and inverse models
Physics and dynamical systems
A simple control algorithm
The control problem
How to make a physical system (such as a
robot) function in a specified manner?
Particularly when:
• The function would not happen naturally
• The system is subject to arbitrary changes
e.g. get the mobile robot to a goal, get the
end-effector to a position, move a
camera…
“Bang-bang” control
• Simple control method
is to have physical
end-stop…
• Stepper motor is
similar in principal:
The control problem
Goal Motor Action Robot in Outcome
command environment
• For given motor commands, what is the
outcome? = Forward model
• For a desired outcome, what are the motor
commands? = Inverse model
• From observing the outcome, how should we
adjust the motor commands to achieve a goal?
= Feedback control
A less-than-perfect
robotic arm
Want to move robot hand through set of positions in
task space: X(t)
X(t) depends on the joint angles in the arm A(t)
A(t) depends on the coupling forces C(t)
delivered by transmission from motor torques T(t)
T(t) produced by the input voltages V(t)
Beyond Inverse Models
Feed-back control
Dynamical systems
Adaptive control
Learning control
1788 by James Watt following a
suggestion from Matthew Boulton
Problem: Non-linearity
• In general, we have good formal methods for linear
systems
Reminder:
Linear system:
f (x a
) bx
( ) ( ) f 2
1 ()
fx x fx x
1 2
• In general, most robot systems are non-linear
Kinematic (motion) models
• Differentiating the geometric model provides a motion
model (hence sometimes these terms are used
interchangeably)
• This may sometimes be a method for obtaining
linearity (i.e. by looking at position change in the limit
of very small changes)
Electric motor
• Ohm’slaw&Kirchhoff'slaw
V IR e
B
• Motor generates voltage:
e k1s
proportional to speed
• Vehicle acceleration: ds torque
where M is motor constant
dt M
• Torque, proportional to current:
k
torque2I
• Putting together:
MR ds
V
B 1
ks
k dt
2
General form
MR ds ds
V1
B ks
V As B
B
k dt
2 dt
• VB – Control variable – input
• s – State variable – output
• A+Bd/dt – Process dynamics
• Dynamics determines the process, given an initial
state.
• State variable separates past and future
• Continuous process models are often differential
equations
Dynamical systems
• Differ from standard computational view of systems:
– Perception-Action loop rather than
input - processing - output
– Analog vs. digital, thus set of states describe a
state-space, and behaviour is a trajectory
• On-going debate whether human cognition is better
described as computation or as a dynamical system
(e.g. van Gelder, 1998)
Process Characteristics
Given the process, how to describe the behaviour?
MR ds
V1
B ks Concise,complete,implicit,obscure…
k dt
2
Characteristics:
Steady-state: what happens if we wait for the
system to settle, given a fixed input?
Transient behaviour: what happens if we suddenly
change the input?
Frequency response: what if we smoothly/regularly
change the inputs?
Control theory
Control theory provides tools: MR ds
V1
B ks
k dt
2
• Steady-state: ds/dt =0, V k so
s sV B
B 1 k
• Transient behaviour (e.g. change in voltage
1
from 0 to 7V)
exponential decay towards steady state
• Half-life of decay:
MR
1 07.
2 kk
1 2
k1 k 2
VB t
s (1 e MR
)
k1
VB
Steady - state : as t , so s
k1
1 VB
Halflife : solve for t when s
2 k1
k1 k 2
1 t
(1 e MR
)
2
k1k 2 1
t ln( )
MR 2
MR
t 0 .7
k1k 2
Motor with gears
Battery
voltage
Gear ratio g where
VB ? smotor
more gear-teeth near
output means g > 1
sout
smotor= g sout : for g > 1, output velocity is slower
torquemotor= g -1 torqueout : for g > 1, output torque is higher
gs
MR ds
Thus: V k
B
gk dt
2
1
Same form, different steady-state, time-constant etc.
Motor with gears
• Steady-state: s VB
gk1
• Half-life: . 2
07
MR
1
2 g kk
12
i.e. forγ ,1>reach lower speed in faster time,
robot is more responsive, though slower.
N.B. have modified the dynamics by altering the
robot morphology.
Electric Motor Over Time
Simple dynamic example –
We have a process model:
Battery Vehicle
MR ds
V1
B k s voltage
?
speed
k dt
2
VB v
Solve to get forward model:
V 2
kk
1
s exp(
B 1
t
) IR
k
1 MR
• Derivation using e.g. VB
Laplace transformation e
A simple controller
System: dx/dt = f(x)
System + Controller
K = Σci xi
xpred = xold
What if system description is not analytically given?
Stabilizing controller for box pushing or wall-following
more complex behaviors for more complex predictors
A simple controller
How to find better parameters ci in K = Σci xi ?
cexpl= c + a sin(w t)
Δc =
short-term average
Perform“testactions”atbothsidesofthetrajectory
works best in 1D (e.g. for steering)
Summary
forward and inverse models
calculating control is hard
controlling by probing
feed back control (next time)