EasyManua.ls Logo

Siemens SIMATIC S7-200 - PID Algorithm

Siemens SIMATIC S7-200
606 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
SIMATIC Instructions
9-89
S7-200 Programmable Controller System Manual
A5E00066097-02
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)
ÁÁ
ÁÁ
ÁÁ
ÁÁ
=
ÁÁÁÁÁÁ
Á
ÁÁÁÁ
Á
Á
ÁÁÁÁ
Á
ÁÁÁÁÁÁ
K
C
* e
ÁÁÁ
Á
Á
Á
Á
Á
Á
ÁÁÁ
+
ÁÁÁÁÁÁÁ
Á
ÁÁÁÁÁ
Á
Á
ÁÁÁÁÁ
Á
ÁÁÁÁÁÁÁ
K
C
t
0
edt M
initial
ÁÁ
ÁÁ
ÁÁ
ÁÁ
+
ÁÁÁÁÁÁ
Á
ÁÁÁÁ
Á
Á
ÁÁÁÁ
Á
ÁÁÁÁÁÁ
K
C
* de/dt
ÁÁÁÁ
ÁÁÁÁ
output
ÁÁ
ÁÁ
=
ÁÁÁÁÁÁ
ÁÁÁÁÁÁ
proportional term
ÁÁÁ
ÁÁÁ
+
ÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁ
integral term
ÁÁ
ÁÁ
+
ÁÁÁÁÁÁ
ÁÁÁÁÁÁ
differential term
where:
M(t) is the loop output as a function of time
K
C
is the loop gain
e is the loop error (the difference between setpoint and process
variable)
M
initial
is the initial value of the loop output
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
ÁÁ
ÁÁ
ÁÁ
=
ÁÁÁÁÁÁ
Á
ÁÁÁÁ
Á
ÁÁÁÁÁÁ
K
C
e
n
ÁÁ
ÁÁ
ÁÁ
+
ÁÁÁÁÁÁÁÁ
Á
ÁÁÁÁÁÁ
Á
ÁÁÁÁÁÁÁÁ
K
I
n
1
M
initial
ÁÁ
ÁÁ
ÁÁ
+
ÁÁÁÁÁÁ
Á
ÁÁÁÁ
Á
ÁÁÁÁÁÁ
K
D
(e
n
–e
n–1
)
ÁÁÁÁ
ÁÁÁÁ
output
ÁÁ
ÁÁ
=
ÁÁÁÁÁÁ
ÁÁÁÁÁÁ
proportional term
ÁÁ
ÁÁ
+
ÁÁÁÁÁÁÁÁ
ÁÁÁÁÁÁÁÁ
integral term
ÁÁ
ÁÁ
+
ÁÁÁÁÁÁ
ÁÁÁÁÁÁ
differential term
where:
M
n
is the calculated value of the loop output at sample time n
K
C
is the loop gain
e
n
is the value of the loop error at sample time n
e
n
-
1
is the previous value of the loop error (at sample time n - 1)
K
I
is the proportional constant of the integral term
M
initial
is the initial value of the loop output
K
D
is the proportional constant of the differential term
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.

Table of Contents

Other manuals for Siemens SIMATIC S7-200

Related product manuals