102BTechnology instructions
9.2 PID control
S7-1200 Programmable controller
System Manual, 11/2011, A5E02486680-05
331
9.2.3
PID_3STEP instruction
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)
Table 9- 15 PID_3Step instruction
LAD / FBD
SCL
Description
"PID_3Step_1"(
SetpoInt:=_real_in_,
Input:=_real_in_,
ManualValue:=_real_in_,
Feedback:=_real_in_,
InputPer:=_word_in_,
FeedbackPer:=_word_in_,
ManualEnable:=_bool_in_,
ManualUP:=_bool_in_,
ManualDN:=_bool_in_,
ActuatorH:=_bool_in_,
ActuatorL:=_bool_in_,
Reset:=_bool_in_,
ScaledInput=>_real_out_,
ScaledFeedback=>_real_out_,
ErrorBits=>_dword_out_,
OutputPer=>_word_out_,
State=>_int_out_,
OutputUP=>_bool_out_,
OutputDN=>_bool_out_,
SetpoIntLimitH=>_bool_out_,
SetpoIntLimitL=>_bool_out_,
InputWarningH=>_bool_out_,
InputWarningL=>_bool_out_,
Error=>_bool_out_);
PID_3Step configures a PID controller with
self-tuning capabilities that has been
optimized for motor-controlled valves and
actuators. It provides two Boolean outputs.
PID_3Step is a PIDT1controller with anti-
windup and weighting of the P- and D-
components.
1
STEP 7 automatically creates the technological object and instance DB when you insert the instruction. The instance
DB contains the parameters of the technological object.
2
In the SCL example, "PID_3Step_1" is the name of the instance DB.