4-180 Series 90-30/20/Micro Programmable Controllers Reference Manual September 1998 GFK-0467K
4
If an Integral Ki gain is used, the CV Bias would normally be 0 as the integrator acts as an
automatic bias. Just start up in Manual mode and use the Manual Command word (%Ref+13) to set
the integrator to the desired CV, then switch to Automatic mode. This also works if Ki is 0, except
the integrator will not be adjusted based on the Error after going into Automatic mode.
The following diagram shows how the PID algorithms work:
TIME
INTEGRAL - Ki
PROPORTIONAL
TERM - Kp
DERIVATIVE
TERM - Kd
DEAD
BAND
BIAS
SLEW
LIMIT CLAMP
UPPER/LOWER POLARITY CV
SP
PV
a43646
Error Sign
Deriv Action VALUE
TIME
Independent Term Algorithm (PIDIND)
The ISA Algorithm (PIDISA) is similar except the Kp gain is factored out of Ki and Kd so that the
integral gain is Kp * Ki and derivative gain is Kp * Kd. The Error sign, DerivAction and Polarity
are set by bits in the Config Word user parameter.
CV Amplitude and Rate Limits
The block does not send the calculated PID Output directly to CV. Both PID algorithms can
impose amplitude and rate of change limits on the output Control Variable. The maximum rate of
change is determined by dividing the maximum 100% CV value (32000) by the Minimum Slew
Time, if specified as greater than 0. For example, if the Minimum Slew Time is 100 seconds, the
rate limit will be 320 CV counts per second. If the dt solution time was 50 milliseconds, the new
CV output can not change more than 320*50/1000 or 16 CV counts from the previous CV output.
The CV output is then compared to the CV Upper and CV Lower Clamp values. If either limit is
exceeded, the CV output is set to the clamped value. If either rate or amplitude limits are exceeded
modifying CV, the internal integrator value is adjusted to match the limited value to avoid reset
windup.
Finally, the block checks the Output Polarity (2nd bit of the Config Word %Ref+12) and changes
the sign of the output if the bit is 1.
CV = Clamped PID Output or – Clamped PID Output if Output Polarity bit set
If the block is in Automatic mode, the final CV is placed in the Manual Command %Ref+13. If the
block is in Manual mode, the PID equation is skipped as CV is set by the Manual Command, but all
the rate and amplitude limits are still checked. That means that the Manual Command can not
change the output above the CV Upper Clamp or below the CV Lower Clamps and the output can
not change faster than the Minimum Slew Time allowed.