next up previous contents
Next: Micromouse Up: Practical Concerns Previous: The Resolution of the   Contents

The Resolution of the Differential Term

The differential term is the change of error. While this term can have the same magnitude as the error term itself, most of the time it is very small (one tenth the magnitude of the error term itself or smaller). In a continuous system, this is not a problem because there is infinite precision. However, in a digital system, this poses the problem of digitizing the contribution from the differential term.

Instead of just relying on the number of ticks between PID invocations, we can also rely in the period between ticks. Although period is proportional to the inverse of speed, it is still more accurante compared to the number of ticks at slow speeds.

Consider a realistic case where a system expects about 1000 ticks per second. This translated to one tick of millisecond. However, as the system slows down to rely on friction to come to a complete stop, the speed can be down to a small number (such as one) of ticks per second. It becomes impossible to know the actual speed. Using a timer, however, we can track the period between ticks and use the period to deduce the actual speed.

If we consider the worst case of a 16 count timer for a 50Hz PID invocation frequency, the lowest frequency is 50Hz, while the next lowest frequency (due to digitization) is $\frac{1}{15/16*20\mathrm{ms}}$, which translates to 53.3Hz. This resolution is better than 7%, even when the tick count per time method fails. While 7% may not sound like a lot, it makes a lot of difference when there is nothing lese to rely on.


next up previous contents
Next: Micromouse Up: Practical Concerns Previous: The Resolution of the   Contents
Tak Auyeung 2003-09-29