GFK-0467K Chapter 4 Series 90-30/20/Micro Instructions Set 4-171
4
PID
The Proportional plus Integral plus Derivative (PID) control function is the best known general
purpose algorithm for closed loop process control. The Series 90 PID function block compares a
Process Variable feedback with a desired process Set Point and updates a Control Variable output
based on the error.
The block uses PID loop gains and other parameters stored in an array of 40 16 bit words
(discussed on page 4-173) to solve the PID algorithm at the desired time interval. All parameters
are 16 bit integer words for compatibility with 16 bit analog process variables. This allows %AI
memory to be used for input Process Variables and %AQ to be used for output Control Variables.
The example shown below includes typical inputs.
_____
%S00007 | |
(enable) ——| |—— -| PID
_
|— (ok) Power flow out if OK
| |
| IND |
| |
(set point) %R00010 —|SP CV|— %AQ0001 Control Variable
+21000 | | +25000
| |
(process variable) %AI0001 —|PV |
+20950 | |
| |
%M0001 | |
——| |——— |MAN |
| |
| |
%M0002 | |
——| |——— |UP |
| |
| |
%M0002 |DN |
——| |——— | |
|_____|
%R00100 RefArray is 40 %R words
(reference array address)
As the input Set Point and Process Variable and output Control Variable terms are used so
frequently, they will be abbreviated as SP, PV and CV. As scaled 16 integer numbers, many
parameters must be defined in either PV counts or units or CV counts or units. For example, the SP
input must be scaled over the same range as PV as the PID block calculates the error by subtracting
these two inputs. The PV and CV Counts may be –32000 or 0 to 32000 matching analog scaling or
from 0 to 10000 to display variables as 0.00% to 100.00%. The PV and CV Counts do not have to
have the same scaling, in which case there will be scale factors included in the PID gains.
Note
The PID will not execute more often than once every 10 milliseconds. This could
change your desired results if you set it up to execute every sweep and the sweep
is under 10 milliseconds. In such a case, the PID function will not run until
enough sweeps have occurred to accumulate an elapsed time of 10 milliseconds;
e.g., if the sweep time is 9 milliseconds, the PID function will execute every other
sweep with an elapsed time of 18 milliseconds for every time it executes.