Week1a Control
Week1a Control
Control
393R: Autonomous Robots
Peter Stone
Slides Courtesy of
Benjamin Kuipers
Good Afternoon Colleagues
– set ub so that
• For a linear system, we get exponential
convergence.
• Therefore
t
u(t) = - kP e(t) - k I òe dt + u b
• The Proportional-Integral (PI)
0 Controller.
Nonlinear P-control
• Generalize proportional control to
• Simple P-controller:
• Time
plot
(t,x)
• Phase
portrait
(x,v)
Phase Portrait: (x,v) space
• Shows the trajectory (x(t),v(t)) of the system
– Stable attractor here
In One Dimension
• Simple linear system
• Fixed point
• Solution
– Stable if k < 0
– Unstable if k > 0
In Two Dimensions
• Often, we have position and velocity:
(stable
attractor)
Center
Behavior
(undamped
oscillator)
The Wall Follower
(x,
y)
The Wall Follower
• Our robot model:
d T K
Tuning the PID Controller
• We have described it as:
now
• At time t,
– Sensor data tells us about the world at t1 < t.
– Motor commands take effect at time t2 > t.
– The lag is dt = t2 t1.
• To compensate for lag time,
– Predict future sensor value at t2.
– Specify motor command for time t2.
Predicting Future Sensor Values
• Later, observers will help us make better
predictions.
• Now, use a simple prediction method:
– If sensor s is changing at rate ds/dt,
– At time t, we get s(t1), where t1 < t,
– Estimate s(t2) = s(t1) + ds/dt * (t2 - t1).
• Use s(t2) to determine motor signal u(t) that
will take effect at t2.
Static Friction (“Stiction”)
• Friction forces oppose the direction of motion.
• We’ve seen damping friction: Fd = f(v)
• Coulomb (“sliding”) friction is a constant Fc
depending on force against the surface.
– When there is motion, Fc =
– When there is no motion, Fc = +
• Extra force is needed to unstick an object and
get motion started.
Why is Stiction Bad?
• Non-zero steady-state error.
• Stalled motors draw high current.
– Running motor converts current to motion.
– Stalled motor converts more current to heat.
• Whining from pulse-width modulation.
– Mechanical parts bending at pulse frequency.
Pulse-Width Modulation
• A digital system works at 0 and 5 volts.
– Analog systems want to output control signals
over a continuous range.
– How can we do it?
• Switch very fast between 0 and 5 volts.
– Control the average voltage over time.
• Pulse-width ratio = ton/tperiod. (30-50 sec)
ton
tperiod
Pulse-Code Modulated Signal
• Some devices are controlled by the length
of a pulse-code signal.
– Position servo-motors, for example.
0.7ms
20ms
1.7ms
20ms
Integrator Wind-Up
• Suppose we have a PI controller
t
u(t) = - kP e(t) - k I òe dt + u
b
0
• Motion might be blocked, but the integral is
winding up more and more control action.
u(t) = - kP e(t) + ub
uúb (t) = - kI e(t)