within a certain percentage of the setpoint. This avoids building up a large
integral term while the output is ramping toward the setpoint.
The derivative term in a PID design is the amount of change in the error over a
specific unit of time. Because a microprocessor control system uses a regular
sampling rate, the unit of time is usually the sample interval (or some multiple
of the sample interval). The derivative is then calculated by subtracting two
samples. Subtracting the error at time n from the error at time n þ 1 gives the
amount of change in one time interval. To prevent noise problems, the software
may average two or more successive samples.
The integral is the sum of error over a period of time. In a practical micro-
processor system, the ...