
the motor shaft for a 500-count encoder. Notice that the position initially in-
creases 5 steps per sample interval, then 10, then 20, and so on. This acceleration
profile is reversed when the motor is stopping.
Software Considerations
The PID loop controls motor position. In many designs, having a critically
damped waveform is crucial. Remember that this is a mechanical system—over-
shoot may result in broken parts.
The problem of offset in a PID loop, where the final position is just slightly
different from the desired position, can cause a unique problem in a motor
control application. There is usually a plus or minus 1 count ambiguity in any
digital ...