PID Loop Operation
Maintenance
8–31
PID Loop Operation
PID Algorithms
The Proportional–Integral–Derivative (PID) algorithm is widely used in process
control. The PID method of control adapts well to electronic solutions, whether
implemented in analog or digital (CPU) components. The DL05 CPU implements the
PID equations digitally by solving the basic equations in software. I/O modules serve
only to convert electronic signals into digital form (or vise-versa).
The DL05 features two types of PID controls: “position” and “velocity”. These terms
usually refer to motion control situations, but here we use them in a different sense:
S PID Position Algorithm – The control output is calculated so it responds
to the displacement (position) of the PV from the SP (error term).
S PID Velocity Algorithm – The control output is calculated to represent
the rate of change (velocity) for the PV to become equal to the SP.
The majority of applications will use the position form of the PID equation. If you are
not sure of which algorithm to use, try the Position Algorithm first. Use
DirectSOFT32’s PID View Setup dialog box to select the desired algorithm. Or, use
bit 5 of PID Mode 1 Setting V+00 word as shown below to select the algorithm.
Process Variable
S
+
–
Setpoint
PID Mode 1 Setting V+00
013456789101112131415 2Bit
Position / Velocity select
Loop Calculation
0
1
Position Algorithm
Control Output
Velocity Algorithm
Error
NOTE: The selection of a PID algorithm is very fundamental to control loop
operation, and is normally never changed after the initial configuration of a loop.
The Position Algorithm causes the PID equation to calculate the Control Output Mn:
S
M
n
= K
c
* e
n
+ Ki * e
i
+ Kr * (en – en–1) + Mo
i=1
n
In the formula above, the sum of the integral terms and the initial output are
combined into the “Bias” term, Mx. Using the bias term, we define formulas for the
Bias and Control Output as a function of sampling time:
Mn = Kc * en + Kr * (en – en–1) + Mxn.....Output for sampling time “n”
Mxo =Mo
Mxn =Ki * en + Mxn–1
Mn = Ki *
S
ei + Mo
i=1
n
Position Algorithm