get anim. gifs of motors & the other aminated gif i have downloaded
TRANSCRIPT
Get anim. gifs of motors
http://e-www.motorola.com/collateral/MOTORDCTUT.html
& the other aminated gif I have downloaded
Controlling motors and controlling robots…
PID motor control
The fine art of motor arranging…
getting things done even when you can’t control what you’re doing...
First, to refresh your memory…
Nanorover No More…
JPL’s “nanorover” was to be used by ISAS to explore 1989ML
Electroactive Polymer wiper
The solution to many problems!
the MUSES-C project• optical navigation camera• LIDAR
• laser range finder
• completely map the asteroid
g = 0.0001 m/s2
play ball!
feature extraction sample
collection
Possible designs
Extinguishers
Include pictures of things NOT working, if you have themThere is a camera in the gray cabinet in B120 andSoftware on the robot croupier’s PCI also have a video camera (as do many of you)
Write-up
“FlameBot”
QuickTime™ and a YUV420 codec decompressor are needed to see this p icture.
Possible architectures
Doing HW
Playing golf ? (Paul P.)
Mazlov’s hierarchy of human needs (Will)
Hockey goalie (Eric)
Shopping at Lowe’s or Home Depot !
Clown balancing on stilts ??
avoid whirlingwork
sleepseek human help
check noteswork
Rodney Brooks: subsumption
Possible architectures
Doing HW
Playing golf ? (Paul P.)
Mazlov’s hierarchy of human needs (Will)
Hockey goalie (Eric)
Shopping at Lowe’s or Home Depot !
Clown balancing on stilts ??
avoid whirlingwork
sleepseek human help
check noteswork
Rodney Brooks: subsumption
Ron Arkin: motor schemas
Trying to get around the Libra complex as a freshman
Driving a car: attracted to green lights & the goal; repelled by cars & red lights
Adjusting the shower water (Paul P) or seasoning spaghetti sauce (Ken)
Finding avalanche survivors (Brie) or Skiing (Eric)
Football players or a soccer player with the ball
Mingling at a party -- drifting toward food; away from certain people
(like a maze, but more embarrassing)
Possible architectures
Doing HW
Playing golf ? (Paul P.)
Mazlov’s hierarchy of human needs (Will)
Hockey goalie (Eric)
Shopping at Lowe’s or Home Depot !
Clown balancing on stilts ??
avoid whirlingwork
sleepseek human help
check noteswork
Rodney Brooks: subsumption
Ron Arkin: motor schemas
Trying to get around the Libra complex as a freshman
Driving a car: attracted to green lights & the goal; repelled by cars & red lights
Adjusting the shower water (Paul P) or seasoning spaghetti sauce (Ken)
Finding avalanche survivors (Brie) or Skiing (Eric)
Football players or a soccer player with the ball
Mingling at a party -- drifting toward food; away from certain people
(like a maze, but more embarrassing)
Erann Gat: 3-layer architectureMudder studying for a test (Paul R)
Low-level control
getting things done even when you can’t control what you’re doing...PID control
N
S
N S
stator
rotor
commutator on shaft
+
-
brushes
DC motor
• We can control: the voltage applied
• We want to control: the rotational speed V
V
Low-level control
getting things done even when you can’t control what you’re doing...PID control
N
S
N S
stator
rotor
commutator on shaft
+
-
brushes
DC motor
• We can control: the voltage applied
• We want to control: the rotational speed V
V
Case 1: We trust equations !Case 2: We trust data !
Motor specs
Electrical Specifications (@22°C)For motor type 1624 003S 006S 012S 024
-------------------------- -------- -------- -------- --------- -------nominal supply voltage (Volts) 3 6 12 24armature resistance (Ohms) 1.6 8.6 24 75maximum power output (Watts) 1.41 1.05 1.50 1.92maximum efficiency (%) 76 72 74 74no-load speed (rpm) 12,000 10,600 13,000 14,400no-load current (mA) 30 16 10 6friction torque (oz-in) .010 .011 .013 .013stall torque (oz-in) .613 .510 .600 .694velocity constant (rpm/v) 4065 1808 1105 611back EMF constant (mV/rpm) .246 .553 .905 1.635torque constant (oz-in/A) .333 .748 1.223 2.212armature inductance (mH) .085 .200 .750 3.00
k
motor constant
Open-loop control
desired d
VThe world
dcompute V from the equation
controller Maybe...
V = + k d R k
Case 1: We trust equations !
voltage
load torque
motor resistance
motor constant
rotational speed
Open-loop analysis
We don’t know everything about !
or maybe not!
= guessed torque required a = actual torque required
Guessed voltage
Actual voltage needed
V = + k d a R k
V = + k d R k
The Road Less Traveled
Bang-bang control
Dynamic performance
Desired speed: d = 1
Computed voltage:
V = + k d R k
Actual torque req.:
a = 2
Results
k2 d
2Rwith =
“motoring uphill”
Dynamic performance
Desired speed: d = 1
Computed voltage:
t
V = + k d R k
Actual torque req.:
a = 2
Results
k2 d
2Rwith =
“motoring uphill”
Dynamic performance
Desired speed: d = 1
Computed voltage:
attained speed = 0.5
t
V = + k d R k
Actual torque req.:
a = 2
Results
k2 d
2Rwith =
“motoring uphill”
Dynamic performance
Desired speed: d = 1
Computed voltage:
attained speed = 0.5
t
V = + k d R k
Actual torque req.:
a = 2
Results
k2 d
2Rwith =
“motoring uphill”
dd
Closed-loop control
desired dV
The world
feedback the actual speed
- compute V prop. to the error e
d Error signal
e
Proportional control
V = Kp (d )
V = Kp • e
Proportional control
actual
Case 2: We trust data !
(k+Kp)
Closed-loop analysis
V = + k a R k V = Kp (d )
controllerthe world
presuming I’ve done the algebra correctly…
= Kp d - a R
k(k+Kp)
(k+Kp)
Closed-loop analysis
V = + k a R k V = Kp (d )
controllerthe world
presuming I’ve done the algebra correctly…
= Kp d - a R
k(k+Kp)
The actual speed lags behind the desired speed -- with both a multiplicative term and an offset.
Closed-loop analysis
But the constant is under our control...
not very close to the desired speed of 1
Kp = 5
Evaluating the response
How can we eliminate the steady-state error?
steady-state error
settling time
rise time
overshoot
overshoot -- % of final value exceeded at first oscillation
rise time -- time to span from 10% to 90% of the final value
settling time -- time to reach within 2% of the final value
ss error -- difference from the system’s desired value
The Integrator...
desired dV
The worldactual
actual speed
- compute V using P and I feedback
d a
Error signal e
Proportional & Integral control
V = Kp (d ) + Ki ∫ (d ) dt
V = Kp • ( e + Ki ∫ e ) ( with a different Ki )
Your average integral control
enthusiast
You’ve been integrated...Kp = 100
resistance is futile (if it’s < .001
instability & oscillation
ringing
What to do?
You’ve been integrated...Kp = 100
resistance is futile (if it’s < .001
instability & oscillation
ringing
What to do?
error
PID control
desired dV
The worldactual a
actual speed a
- compute V using PID feedback
d a
Error signal e
Proportional / Integral / Derivative control
V = Kp (d ) + Ki ∫ (d ) dt + Kd
V = Kp • ( e + Ki ∫ e + Kd )d e dt
d e dt
( redefining Kd )
PID tuning: the untold story
How to get the PID constants ?
(1) Try out different values until some look good.Optimize performance while tuning only one variable, then repeat with another variable. 2-3 iterations should provide reasonable results.
(2) Find values that produce common behavior, then adjust.Using only Proportional control, turn up the gain until the system oscillates w/o dying down, i.e., is marginally stable. Assume that K and P are the resulting gain and oscillation period, respectively.
Then, use
Ziegler-Nichols Tuning
for P control for PI control for PID control
Kp = 0.6 K
Ki = 2.0 / P
Kd = P / 8.0
Kp = 0.45 K
Ki = 1.2 / P
Kp = 0.5 K
Implementing PID
Use discrete approximations to the I and D terms:
• Proportional term: ei = desired - actual
• Integral term: eiti
at time i
i=0
i=now
• Derivative term: ei - ei-1
How could the time-discretization affect performance?
ti = elapsed time
ti
PID wrap-up
• photomultiplier temperature regulation
• automobile cruise control
• pipeline gas flow
• robotics (joint position and velocity)
Widespread control strategy
Summary of the terms’ effects
reaching a desired setpoint
wall-following
Performance depends on tuning and delays in the feedback loop
Kp
Ki
Kd
rise time overshoot settling time steady state error
decreases
decreases
minor effect minor effect
increases
increases
decreases
minor effect
increases
decreases
decreases
eliminates
2d Motor Schema control
A 2d vector field for controlling robot motion… (a motor schema with an attractor and an obstacle)
How do we use those “forces” to direct the
robot’s motors?
2d Motor Schemas: a thought experiment
The Nomad (and most robots) are limited in their maneuverability -- they can only move forward and backward in the direction their wheels are facing.
Thus, you can control 2 things:the translational velocity of the robotthe rotational velocity of its wheels
Task: Design several strategies for setting the translational and rotational velocities so that the Nomad can efficiently change course to a goal point in 2d.
For example, suppose the Nomad is moving along the negative x-axis to the right (toward the origin) at a velocity vo . Just when the robot reaches the origin, it realizes it wants to be at the point (1000,1000).
What are possible control strategies that will get it there. Consider as many as you can (but at least two). What are their (dis)advantages?
goal
current state
Wall/Corridor following
Achieving a desired offset, given control over turning angle:
L
R = Kp(R-L)
• Absolute limits should be used on !• How would you detect L and R ?
Fire finding
Achieving a desired offset, given control over turning angle:
light-balancing
just one sensor?
QuickTime™ and a YUV420 codec decompressor are needed to see this picture.
L
R
Wrapping Up
Examining robots’ inputs: building & using models of the world
Inverse kinematics: what we would really like to know ...
Forward kinematics: some alternatives to the differential-drive robot
• Short Assignment #3 due Monday
• Lab Project #1 write-up due Sunday night, 2/16 (midnight)
PID control: strategy for effectively controlling one system characteristic with a related (but not identical) one
Perspective
If your robot doesn’t do what you want ...
… you can always change what you’re looking for.
to intelligent robots
the MUSES-C project• optical navigation camera• LIDAR
• laser range finder
• Fan beam sensors
g = 0.0001 m/s2
squishy sphere
feature extraction sample
collection
Possible designs
Extinguishers
See example write-up at the CS154 website.
Use pictures to help explain approach and results.Write-up
Dynamic performance
V = + k a R k the
world :
kV = a + k2 RR
torque = inertia acceleration
kV = J+ L + k2 RR
•
external load torque
internal to the motor
There must be a transient and a steady-state response to the
input, V
Motors and Encoders
desired dV
The world
a
actual speed a
- compute V using the error e
d a
Error signal e
Basic input / output relationship:We want to control .
V = + k R k
We can control V.
PID control
Closed-loop control
desired dV
The world
a
actual speed a
- compute V using the error e
d a
Error signal e
Basic input / output relationship:We want to control .
V = + k R k
We can control V.
PID control
Wrapping Up
Examining robots’ inputs: building & using models of the world
Inverse kinematics: what we would really like to know ...
Forward kinematics: some alternatives to the differential-drive robot
• Short Assignment #3 due Monday
• Lab Project #1 write-up due Sunday night, 2/16 (midnight)
PID control: strategy for effectively controlling one system characteristic with a related (but not identical) one