PD Control on the Nomad 200
CS154 / Spring 2003
Using the provided source file pd.cc, I attempted to determine the stability
point via a binary search through all possible gains Kp. 1.0 was clearly
too great; 0.5 seemed stable; 0.75 was not, nor was 0.6; 0.55 was inconsistently
stable -- some runs overshot and hit 1001 or 1002, but not all. 0.54,
0.53, and 0.52 were all progressively more stable. By about 0.52 or
0.51, overshooting was rare or nonexistent, which lead me to believe that
0.5 is a safe gain for a proportional control using these parameters. For
these experiments, I used the default delay time of 1.5 seconds and maximum
speed of 1000, in units of tenths of an inch per second.
Figure 1: Distance (0.1 in) vs. time (s) for proportional control using
a gain of 0.5.
Figure 2: Distance (0.1 in) vs. time (s) for proportional control using
a gain of 0.75
Figure 3: Distance (0.1 in) vs. time (s) for proportional control using
a gain of 1.0
I automated this somewhat by modifying pd.cc to display the rise time if
it settled within 0.1 inches of the goal without overshooting. If it
overshot by more than 0.1 inches, then it would instead print, "OVERSHOOT."
I tried varying the proportional and derivative gains extensively,
but was unable to tune them very well. The problem was that I would
get different results from different runs with the same parameters! The
gains that got a rise time of 6 seconds in one trial would take 8 seconds
in another. Some parameters overshot inconsistently. I found
that with a proportional gain of 0.45 and a derivative gain of 0.05 I sometimes
got decent results, but that's only a rough estimate since I could get no
reliable data. The rise times I observed generally were between 6 and
8 seconds, though some parameter cominations took 11 or 13 seconds.
I'm not sure what values to use for this -- as mentioned before, I cannot
get consistent results. I think the main thing that I've learned from
all this is that there is a tradeoff between a fast rise time and consistently
Source code: pd.cc