5 PID Control
5 PID Control
PID Controller
(Proportional, Integrator,
Derivative)
Hamid
1
Session Outlines & Objectives
Outlines
The PID control algorithms
The practical aspects
Objectives
Understand PID control
Understand function of every term of PID control (P&I&D)
Can choose good combination and can tune PID for many
applied process control.
Know additional feature installed in controller for
appllication in practice
2
What is PID Control?
The PID stands for Proportional - Integrator
- Derivative
Also known as three-term control
It’s implemented as a computer program
today
◦ The controller comes in many different forms
◦ PID control is often combined with logic, sequential functions,
selectors, and simple function blocks to build the complicated
automation systems
3
Why PID Control?
The PID algorithm is simple, easy to
understand, and relatively easier to tune
than the other controller
◦ It became the standard tool when process control emerged in the
1940s
◦ In process control today, more than 90% of the control loops are
of PID type
4
Key Concepts (1)
Process Action
◦ Defines the relationship between changes in the valve and change in the
measurement
DIRECT Increase in valve position causes an increase in the measurement
REVERSE Increase in valve position causes a decrease in the measurement
Controller Action
◦ Defines the relationship between changes in the measured variable and
change in the controller output
DIRECT Increase in measured variable causes an increase in the output
REVERSE Increase in measured variable causes a decrease in the output
5
Key Concepts (2)
The PID algorithm doesn’t know the correct
output to bring the process variable to the
setpoint
◦ The algorithm must have process measurement to perform
◦ It merely continues to move the output in the direction which should move
the process toward the setpoint
6
Key Concepts (3)
Manual & Auto modes
◦ Manual mode
The human operator adjusts the output to operate the
process
Manual Mode is very useful when unusual conditions
exist:
Plant start-up
Plant shut-down
Emergencies
◦ Auto mode
The control algorithm manipulates the output to hold
the process measurements at their setpoints
Should be the most common mode for normal operation
7
PID Control Algorithm
Comprises three elements:
◦ Proportional – also known as Proportional Gain or simply Gain
◦ Integral – also known as Automatic Reset or simply Reset
◦ Derivative – also known as Rate or Pre-Act
8
Proportional Mode (1)
CO = P .e + b
b
SP e + CO
+ P +
P = proportional gain (dimensionless)
CO = controller output (%) PVm
b = bias (%) (also known as manual reset)
e = ( SP – PVm ) (%) “reverse action”, or
e = – ( SP – PVm ) (%) “direct action”
100
PB = P CO = P . b=
e+ 10
e+b
0
PB 9
Proportional Mode (2)
Proportional-only control can produces an
offset
◦ The offset can be reduced by increasing the controller gain (or
decreasing the proportional band). But one cannot make the
controller gain arbitrarily large since too high a gain induces
oscillation PV
and/or
m
instability SP
Large P
Small P
time
10
Proportional Mode (2)
◦ To remove offset, the human operator has to “reset” the controller
manually by adjusting the value of the manual reset (the “b” term)
PVm
SP
Manual reset
P constant
Manual reset
time
11
Integral (Automatic Reset) Mode (1)
1 e
CO = T
m ò e dt SP
+ 1
Tm ò
dt
CO
1
Im=repeat minute per repeat (Tm) CO = Trò e dt
per minute (Tr) =
12
Integral (Automatic Reset) Mode (2)
As long as error exists, the controller will
change its output; hence it is capable of
driving the error to zero
Speed of response is reduced (compared to
P-only mode) PV
m
SP
P-only
I-only
Small P
time
13
Proportional-Integral Mode (1)
SP e CO
+ 1
Tm ò
dt
PVm
1
CO = P e( + T
m ò e dt )
14
Proportional-Integral Mode (2)
Response of PI controller toP step
Slope =
change in
Output response
T for various
error values of T
m
m
Controller Output (CO)
Response equal
in magnitude to
Proportional
response
Response due to
Proportional P
control action
Tm time
Error
0
time
15
Proportional-Integral Mode (3)
It combines the best features of the
proportional and integral modes
◦ The proportional offset is eliminated with little loss of response
speed
PVm PI
SP
P-only
I-only
Small P
time
16
Derivative Mode (1)
de SP e CO
CO = D dt + d
D dt
PVm
D = derivative time (minute or second)
CO = controller output (%)
e = ( SP – PVm ) (%) “reverse action” or
e = – ( SP – PVm ) (%) “direct action”
frequency disturbances
17
Derivative Mode (2)
A steady-state error signal, however, is not
recognized by D controllers, because
regardless of how big the error, its rate of
change is zero. Therefore, derivative-only
controllers are not used in practice
They are usually found in combination with
other control elements, mostly in
combination with proportional control
18
Proportional-Derivative Mode (1)
d b
D dt
SP e +
+
P CO
+
+
+
PVm
de
)
CO = P (e + D dt + b
19
Proportional-Derivative Mode (2)
Response of PD controller to Response
ramp due change
to in
Proportional and
error Response due to
Proportional and
Controller Output (CO) Derivative modes
Derivative modes
Theoretical
Actual
Response due to
Proportional mode
only
D
time
Ramp
Error
Generator OFF
Ramp
Generator ON time
20
Proportional-Derivative Mode (3)
PD control can produces an offset
To avoid proportional offset, the bias “b”
PD
P-only
Small P
time
21
Proportional-Integral-Derivative Mode
(1)
Combine the best feature of P, I, and D terms
I
ò dt
SP e + CO
+ +
P
+
d
D dt
PVm
de
CO =( P e + I ò
e dt + D dt )
22
Proportional-Integral-Derivative Mode
(2)
time
23
Additional PID Concepts
Interactive vs. Non-interactive PID
Algorithm
Refer to interaction between the reset and
derivative terms
Also known as ‘series’ or ‘parallel’
Almost all analog controllers are interactive
Many digital controller are non-interactive,
some are interactive
The only difference is in the tuning of
controller with derivative
24
Reset Windup (1)
All actuators have limitations:
◦ Ex.: A motor has limited speed, a valve cannot be more than fully opened or
fully closed
Windup phenomena is caused by the interaction of
integral action and saturations
When this happens the feedback loop is broken and
the system runs as an open loop because the
actuator will remain at its limit independently of the
process output
◦ If a controller with integrating action is used, the error will continue to be
integrated. This means that the integral term may become very large or,
colloquially, it “winds up”
◦ It is then required that the error has opposite sign for a long period before
things return to normal
◦ The consequence is that any controller with integral action may give large
transients when the actuator saturates
25
Reset Windup (2)
yPV
m
ysp
SP
A
c
CO
Time
26
Anti-Reset Windup
ySPsp y
PVm
c
CO
Time
When the manipulated variable saturates, the integral is not
allowed to accumulate
When control returns, the controller takes immediate action
and the process returns smoothly to the setpoint
27
Methods for Anti-Reset Windup
Turn off the integral when a valve saturates
or a control loop is not in use.
Clamp the controller output to be greater
28
Bumpless Transfer (1)
Practically all controllers can be run in two modes:
manual or automatic
When the system is in manual mode, the control
29
Bumpless Transfer (2)
Comparison of true and internal setpoint
True Setpoint
Internal Setpoint
Time
30
Bumpless Transfer (3)
Control Performance with and without
bumpless transfer
w/o bumpless transfer
w/ bumpless transfer
Time
31
Derivative on Process Rather than Error (1)
The Facts:
◦ A step change in the set point results in a step change in the process
◦ The derivative term acts on the rate of change of the error
◦ The rate of change of a step change is very large
◦ An operator step change of the setpoint would causes a very large
change in the output, upsetting the process
Derivative
Spike
MV
SP
PVm
time
Fig. Process variable and valve response
to a setpoint change using standard PID
32
Derivative on Process Rather than Error (2)
d
P .D dt
PVm
1 . dPVm
CO = P (e + T
m ò )e -P D dt
33
Derivative on Process Rather than Error (3)
MV
SP
PVm
time
Fig. Process variable and valve response
to a setpoint change using
“Derivative on Process Measurement” PID
34
Derivative on Filtered Process
Rather than Process (1)
The Fact:
◦ The derivative mode is hypersensitive to noise
35
Gain on Process Rather than Error (1)
The Facts:
◦ In applications with high gain, a step change can result in a
sudden, large movement in the valve
◦ Not as severe as derivative effect, but still can upset the process
MV
Gain
response
SP
PVm
time
Fig. Process variable and valve response
to a setpoint change using
“Gain on error and Derivative on Process Measurement” PID
36
Gain on Process Rather than Error (2)
Solution: Let gain act only on process rather
SP e
than error+ P
T ò
dt
m
+ CO
P
d
P .D dt
PVm
P dPVm
CO = T
m
e dt + P( PVm +
ò dt )
37
Gain on Process Rather than Error (3)
Process variable and valve response to a
setpoint change
MV
SP
PVm
time
Fig. Process variable and valve response
to a setpoint change using
“Gain and Derivative on Process Measurement” PID
38
Digital PID Algorithms (1)
Data acquisition concepts
Sampled signal Original signal
Continuous signal
Dt
sample
Dt = sampling time
2Dt
39
Digital PID Algorithms (2)
Integral Derivative
de ei – ei-1
ò e dt @ Dt S ei dt @ Dt
.
1 de
CO = P e( + T
Continuous form:
ò D )
e dt + dt
m
Dt D
CO
Digital form: = P ei[+ Tm S ei +Dt (ei – e]i-1)
i = sampling instant
40
Digital PID Algorithms (3)
Two forms of digital PID algorithms:
◦ Positional form
Dt D
COi = P ei[+ Tm S ei dt D
+t (ei – ]ei-1)
◦ Velocity form
Inherently have anti reset windup
D feature
COi = COi-1 + P [(ei – ei-1) + Dt eDi t+ (ei – 2e]i-1+ei-2)
Tm
41
Guidelines for Common Control Loops (1)
pipe/transportation)
Usually with small high-frequency noise
PI controller with intermediate controller gain
integrating process
Conservative setting for averaging control when it is
42
Guidelines for Common Control Loops (2)
reset time)
Temperature control
Wide variety of the process nature
Usually slow response with time delay
Use PID controller to speed up the response
43
Guidelines for Common Control Loops (3)
Composition control
Similar to temperature control usually with
44
Session Summary
PID control, which is the most widely used
control algorithm in process control
application, comes in different forms and
terms
Each of the terms of the PID equation must be
understood to obtain a right combination of
the PID control elements for various process
control application objectives
45