102BTechnology instructions
9.2 PID control
S7-1200 Programmable controller
System Manual, 11/2011, A5E02486680-05
325
The PID controller uses the following formula to calculate the output value for the
PID_Compact instruction.
y = K
p
(w - x) +
(c · w - x)
[
(b · w - x) +
1
T
I
·
s
T
D
· s
a · T
D
· s + 1
]
y
Output value
x
Process value
w
Setpoint value
s
Laplace operator
K
p
Proportional gain
(P component)
a
Derivative delay coefficient
(D component)
T
1
Integral action time
(I component)
b
Proportional action weighting
(P component)
T
D
Derivative action time
(D component)
c
Derivative action weighting
(D component)
The PID controller uses the following formula to calculate the output value for the PID_3Step
instruction.
Δ
y = K
p
· s
·
(w - x) +
(c · w - x)
[
(b · w - x) +
1
T
I
·
s
T
D
· s
a · T
D
· s + 1
]
y
Output value
x
Process value
w
Setpoint value
s
Laplace operator
K
p
Proportional gain
(P component)
a
Derivative delay coefficient
(D component)
T
1
Integral action time
(I component)
b
Proportional action weighting
(P component)
T
D
Derivative action time
(D component)
c
Derivative action weighting
(D component)
9.2.1
Inserting the PID instruction and technological object
STEP 7 provides two instructions for PID control:
●
The PID_Compact instruction and its associated technological object provide a universal
PID controller with tuning. The technological object contains all of the settings for the
control loop.
●
The PID_3Step instruction and its associated technological object provide a PID
controller with specific settings for motor-activated valves. The technological object
contains all of the settings for the control loop. The PID_3Step controller provides two
additional Boolean outputs.
After creating the technological object, you must configure the parameters (Page 337). You
also adjust the autotuning parameters ("pretuning" during startup or manual "fine tuning") to