Here's a screen shot of the PID utility w/ the brushed motor. I set distance (in encoder counts, 1000 line = 4000 counts = 1 turn), velocity, and accel/decel.
Note the initial position error as the servo begins to move the table. It spikes to 25 counts as the table mass "lags" the commanded position. The system corrects and drives the error towards zero. As the table decelerates, the error occurs in the other direction, as the servo brakes the mass to a halt.
The brushless curve is similar except it doesn't drive towards 0 as aggressively as this one does. Note the constant velocity error, which is +/- 5 counts, or +/- 0.0002".
The KP, KD, KI, and IL are the primary parameters I have to mess with. It's fascinating stuff, I'm enjoying it thoroughly! |