Control Theory 1 - Computer Science

Download Report

Transcript Control Theory 1 - Computer Science

Simple Control Theory
Jeremy Wyatt
School of Computer Science
University of Birmingham
Aims
•
•
•
•
Understand what control theory is
See why it’s useful
A little of the maths
How to apply it to simple mobile robots
What is Control Theory?
• In designing an intelligent robot we are designing
an interaction between agent and environment
• Both are composed of many low level, continuous
processes
• Control theory is about describing these processes
and manipulating them so they do what we want
A simple example
• A DC motor can be thought of as process
VB
s
motor
voltage
speed
• We increase the voltage and the speed increases
(crudely)
Pulse width modulation (PWM)
• The Handyboard has constant VB
• Q: So how do we vary the voltage?
• A: We switch it on and off quickly
VB
0
VB
0
VM
1
 VB
2
Controllers
• We want to know what effective VM to
apply to get the speed we want
VM
sT
controller
Target
speed
s
motor
Voltage
• This is what our controller will choose
Actual
speed
Controllers
• How should we decide on VM?
• There are three popular classes of methods
– Open loop control
– Feedforward control
– Feedback control
• We will look at each in turn
Open Loop Control
• IDEA
–
–
–
–
build a model of how VM affects s
then invert it
plug in sT (target speed)
hope it works
Suppose
so
s  kVM
VM
sT

k
s
VM
Disturbances
• Open loop is very simple but affected by
disturbances
Disturbance
sT
Controller
VT
VM
(program)
Target
speed
Target
voltage
VT
sT

k
(1)
VM
s

k
(2)
Actual
voltage
• Typical disturbance: battery isn’t fully charged
Feedforward control
• IDEA:
–
–
–
–
Watch the disturbances
Add them to a better model
Invert the model
Hope
• Good if disturbances have known effect
• But
– Model can become very complicated
– Hard to measure disturbances
Feedforward Control
VOUT
Disturbance
VIN
sT
Controller
VT
VM
(program)
Target
speed
Target
voltage
Actual
voltage
sT
VT 
k
VIN
VOUT
Feedback Control
• Observe the process output, not the disturbance
Disturbance
sT
VT
Controller
s
VM
Motor
• Modify the controller action to minimise the error
Feedback Control
• Good
– Very general, because it works whatever the
disturbances are
– Model stays (relatively) simple
• Bad
– Problems arise if the rate of process change is
much higher than the speed of sensing and
control
Proportional Error Control (PE)
• Add a proportion of the error to the control
signal
Disturbances
sT
s
VT
Controller
Robot
VT  k1 ( sT  s)