EasyManua.ls Logo

Siemens Simatic S7 Series

Siemens Simatic S7 Series
726 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...
Program instructions
7.9 PID
S7-200 SMART
274 System Manual, 09/2015, A5E03822230-AC
7.9.2
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:
Output = Proportional term + Integral term + Differential term
M(t)
=
K
C
*
e + K
C
0
t
e dt + M
initial
+
K
C
*
de/dt
where:
M(t)
Loop output as a function of time
K
C
Loop gain
e
Loop error (the difference between setpoint and process variable)
M
initial
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:
Output = Proportional term + Integral term + Differential term
M
n
=
K
c
*
e
n
+
K
I
*
1
n
e
x
+
M
initial
+
K
D
* (
e
n
-
e
n-1
)
where:
M
n
Calculated value of the loop output at sample time n
K
c
Loop gain
e
n
Value of the loop error at sample time n
e
n-1
Previous value of the loop error (at sample time n - 1)
K
I
Proportional constant of the integral term
M
initial
Initial value of the loop output
K
D
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 Series

Related product manuals