Siemens Simatic S7-200 System Manual page 244

Programmable controller
Hide thumbs Also See for Simatic S7-200:
Table of Contents

Advertisement

Instruction Set
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.
Since the digital computer must calculate the output value each time the error is sampled
beginning with the first sample, it is only necessary to store the previous value of the error
and the previous value of the integral term. As a result of the repetitive nature of the digital
computer solution, a simplification in the equation that must be solved at any sample time
can be made. The simplified equation is:
M
=
n
output
=
where:
M
n
K
C
e
n
e
n - 1
K
I
MX
K
D
The CPU uses a modified form of the above simplified equation when calculating the loop
output value. This modified equation is:
M
n
output
where:
M
n
MP
n
MI
n
MD
n
10-56
K
e
+
C
n
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
K
e
+
C
n
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 previous value of the integral term (at sample time n - 1)
is the proportional constant of the differential term
=
MP
+
n
=
proportional term
+
is the calculated value of the loop output at sample time n
is the value of the proportional term of the loop output at sample time n
is the value of the integral term of the loop output at sample time n
is the value of the differential term of the loop output at sample time n
n
K
M
+
I
initial
1
integral term
+
+
K
e
MX
I
n
integral term
+
MI
+
n
integral term
+
S7-200 Programmable Controller System Manual
C79000-G7076-C230-02
K
(e
–e
)
n
D
n–1
differential term
K
(e
–e
)
n
D
n–1
differential term
MD
n
differential term

Advertisement

Table of Contents
loading

Table of Contents