Pid Algorithm - Siemens Simatic S7 Series System Manual

Hide thumbs Also See for Simatic S7 Series:
Table of Contents

Advertisement

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

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-200 smart series

Table of Contents