Pid Algorithm - Siemens SIMATIC S7-200 System Manual

Hide thumbs Also See for SIMATIC S7-200:
Table of Contents

Advertisement

PID Algorithm

In steady state operation, a PID controller regulates the value of the output so as
to drive the error (e) to zero. A measure of the error is given by the difference
between the setpoint (SP) (the desired operating point) and the process variable
(PV) (the actual operating point). The principle of PID control is based upon the
following equation that expresses the output, M(t), as a function of a proportional
term, an integral term, and a differential term:
M(t)
output
where:
M(t)
K
C
e
M
initial
In order to implement this control function in a digital computer, the continuous
function must be quantized into periodic samples of the error value with
subsequent calculation of the output. The corresponding equation that is the basis
for the digital computer solution is:
M
n
output
where:
M
n
K
C
e
n
e
n - 1
K
I
M
initial
K
D
From this equation, the integral term is shown to be a function of all the error terms
from the first sample to the current sample. The differential term is a function of the
current sample and the previous sample, while the proportional term is only a
function of the current sample. In a digital computer it is not practical to store all
samples of the error term, nor is it necessary.
S7-200 Programmable Controller System Manual
A5E00066097-02
=
K
* e
C
=
proportional term
is the loop output as a function of time
is the loop gain
is the loop error (the difference between setpoint and process
variable)
is the initial value of the loop output
=
K
e
+
n
C
=
proportional term
+
is the calculated value of the loop output at sample time n
is the loop gain
is the value of the loop error at sample time n
is the previous value of the loop error (at sample time n - 1)
is the proportional constant of the integral term
is the initial value of the loop output
is the proportional constant of the differential term
t
+
K
e dt
M
C
initial
0
+
integral term
n
K
M
initial
I
1
integral term
SIMATIC Instructions
+
K
* de/dt
C
+
differential term
K
(e
–e
)
+
D
n
n–1
+
differential term
9-89

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents