Chapter 6 PID Control
Chapter 6 PID Control
PID Control
PID Controls
Gd(s)
Ys(s)
Gs(s)
Closed Loop Transfer Functions
• From the general feedback control loop and using
the properties of transfer functions, the following
expressions can be derived:
Y (s) G p ( s ) Ga ( s ) Gc ( s )
=
Ysp ( s ) G p ( s ) Ga ( s ) Gc ( s ) Gs ( s ) + 1
Y ( s) Gd ( s)
=
D( s) G p ( s) Ga ( s) Gc ( s) Gs ( s) + 1
Characteristic Equation
• Since setpoint tracking and disturbance rejection
have the same denominator for their closed loop
transfer functions, this indicates that both setpoint
tracking and disturbance rejection have the same
general dynamic behavior.
• The roots of the denominator determine the
dynamic characteristics of the closed loop process.
• The characteristic equation is given by:
G p ( s) Ga ( s) Gc ( s) Gs ( s) + 1 = 0
Characteristic Equation Example
• Consider the dynamic behavior of a P-only
controller applied to a CST thermal mixer (Kp=1;
tp=60 sec) where the temperature sensor has a
ts=20 sec and ta is assumed small. Note that
Gc(s)=Kc.
Substituti ng into the characteristic equation
1 1
Kc +1= 0
60s + 1 20s + 1
After rearranging into the standard form,
1200 1.15
tp = =
1 + Kc 1 + Kc
Characteristic Equation Example
• Consider the dynamic behavior of a P-only
controller applied to a second order system
(Kp=10; tp=10 sec; = 2) where the sensor has a
ts=1 sec and Gc (s) =1. Note that Gc(s)=Kc.
• Reverse acting
1 t d e(t )
c(t ) = c0 − K c e(t ) +
tI
0
e(t )dt + t D
dt
• Direct acting
Definition of Terms
• e(t)- the error from setpoint [e(t)=ysp-ys].
• Kc- the controller gain is a tuning parameter
and largely determines the controller
aggressiveness.
• tI- the reset time is a tuning parameter and
determines the amount of integral action.
• tD- the derivative time is a tuning
parameter and determines the amount of
derivative action.
Level Control Example
• Process gain is positive
because when flow in is
increased, the level
Fin
LT LC
increases.
• If the final control
L
Fout element is direct acting,
use reverse acting PID.
• For reverse acting final
control element, use
direct acting PID.
Level Control Example
• Process gain is negative
because when flow out
Fin is increased, the level
LT LC decreases.
L • If the final control
Fout element is direct acting,
use direct acting PID.
• For reverse acting final
control element, use
reverse acting PID.
Guidelines for Selecting Direct
and Reverse Acting PID’s
• Consider a direct acting final control element
to be positive and reverse to be negative.
• If the sign of the product of the final control
element and the process gain is positive, use
the reverse acting PID algorithm.
• If the sign of the product is negative, use the
direct acting PID algorithm.
Proportional Band
100%
PB =
Kc
• Another way to express the controller gain.
• Kc in this formula is dimensionless. That is, the
controller output is scaled 0-100% and the error
from setpoint is scaled 0-100%.
• In more frequent use 10-15 years ago, but it still
appears as an option on DCS’s.
Conversion from PB to Kc
100% 100%
K =
D
c = = 0.5
PB 200%
100%
K c = 0.5 = 0.25 % / psi
200 psi
Digital Equivalent of PID
Controller
n
0
e(t ) dt e(i t ) t
i =1
• The trapezoidal
approximation of the
integral.
t n e(t ) − e(t − t )
c(t ) = c0 + K c e(t ) + e(i t ) + t D
t I i =1 t
t
n=
t
Derivation of the Velocity Form
of the PID Control Algorithm
t n
e(t ) − e(t − t )
c(t ) = c0 + K c e(t ) +
tI
e(i t ) + t D
t
i =1
ys (t ) − 2 ys (t − t ) + ys (t − 2 t )
−t D
t
Correction for Aggressive
Setpoint Tracking
• For certain process, tuning the controller for good
disturbance rejection performance results in
excessively aggressive action for setpoint changes.
• This problem can be corrected by removing the
setpoint from the proportional term. Then setpoint
tracking is accomplished by integral action only.
t e(t ) ys (t ) − 2 ys (t − t ) + ys (t − 2t )
c(t ) = K c e(t ) − e(t − t ) + −t D
tI t
The Three Versions of the PID
Algorithm Offered on DCS’s
• (3) The form in which the proportional and
derivative terms are based on the process
measurement and the integral is based on
the error from setpoint.
t e(t ) y (t ) − 2 ys (t − t ) + ys (t − 2t )
c(t ) = K c ys (t − t ) − ys (t ) + −t D s
tI t
Laplace Transform for a PID
Controller
C ( s) 1
Gc ( s) = = K c 1 + + t D s
E ( s) tIs
Example for a First Order
Process with a PI Controller
Kc = 2 t I = 10 Kp =1 tp =5
Characteristic Equation :
1 2
5s + 1 2 + 10 s + 1 = 0
Rearrangin g
25s + 15s + 1 = 0
2
tp =5 = 1.5
Example of a PI Controller Applied
to a Second Order Process
K c = 1; t I = 1; K p = 1; t p = 5; = 2
Characteristic Equation :
1 1
25s 2 + 20 s + 1 1 + + 1 = 0
s
Rearrangin g
25s + 20 s + 2s + 1 = 0
3 2
Gd(s)
Yf(s) Ys(s)
Gf(s) Gs(s)
Effect of Filtering on Closed
Loop Dynamics
Characteristic equation for P − only controller
on first order process with sensor filtering :
Kp 1
Kc +1= 0
t p s + 1 t f s + 1
t pt f
tp =
Kc K p + 1
tp + tf
=
2 t p t f ( K c K p + 1)
Analysis of Example
• tf is equal to t (1/f-1) as f becomes
small, tf becomes large.
• When tf is small compared to tp, as tf is
increased, will decrease.
• When tf is large compared to tp, as tf is
increased, will increase.
• Critical issue is relative magnitude of tf
compare to tp.
Effect of the Amount of Filtering
on the Open Loop Response
Filtered Temperature
f=0.3
f=0.1
f=0.2
0 20 40 60 80 100
Time (seconds)
Effect of a Noisy Sensor on
Controlled Variable without Filtering
Product Temperature
Manipulated Variable
Time
Effect of a Noisy Sensor on
Controlled Variable with Filtering
Product Temperature
Manipulated Variable
Time
An Example of Too Much and
Too Little Filtering
Temperature (ºC)
104
102 f=0.01
f=0.2
f=0.5
100
0 50 100 150 200
Time (seconds)
Properties of Proportional Action
c(t ) = c0 + K c e(t )
Kc K p
Kc K p + 1
• Closed loop transfer function
Y (s)
= base on a P-only controller
Ysp ( s) tp
s +1 applied to a first order process.
Kc K p + 1
• Properties of P control
– Does not change order of process
– Closed loop time constant is
smaller than open loop tp
– Does not eliminate offset.
Offset Resulting from P-only
Control
Setpoint Offset
1.0
1
0
Time
Proportional Action for the
Response of a PI Controller
ysp
ys
cprop
Time
Properties of Integral Action
Kc
t
c(t ) = c0 + e(t ) dt
tI 0
• Based on applying an I-
Y (s) 1
= only controller to a first
Ysp ( s) t It p 2 t order process
s + I s +1
Kc K p Kc K p • Properties of I control
t It p – Offset is eliminated
t I = – Increases the order by 1
Kc K p
– As integral action is
1 tI increased, the process
=
2 t p Kc K p becomes faster, but at the
expense of more sustained
oscillations
Integral Action for the Response
of a PI Controller
ysp
ys
cint
Time
Properties of Derivative Action
de(t )
c(t ) = c0 + K ct D
dt
Y (s) K c K pt D s
= 2 2
Ysp ( s) t p s + (2t p + K c K pt D )s + 1
ysp
ys
cder
Time
PID Controller Design Issues
• Over 90% of control loops use PI controller.
• P-only: used for fast responding processes
that do not require offset free operation
(e.g., certain level and pressure controllers)
• PI: used for fast responding processes that
require offset free operation (e.g., certain
flow, level, pressure, temperature, and
composition controllers)
PID Controller Design Issues
• PID: use for sluggish processes (i.e., a process
with large deadtime to time constant ratios) or
processes that exhibit severe ringing for PI
controllers. PID controllers are applied to
certain temperature and composition control
loops. Use derivative action when:
p
1
tp
Comparison between PI and PID
for a Low p/tp Ratio
PI
PID
Time
Comparison between PI and PID
for a High p/tp Ratio
PI
PID
Time
Analysis of Several Commonly
Encountered Control Loops
• Flow control loops
• Level control loops
• Pressure control loops
• Temperature control loops
• Composition control loops
Flow Control Loop
FC Flow
Setpoint
FT
Air Pressure
Time
Flow Rate
0 20 40 60
Time (seconds)
• A control valve (deadband of ±10-25%) in a flow
control loop or with a positioner typically has a
deadband for the average flow rate of less than
±0.5% due to the high frequency opening and
closing of the valve around the specified flow rate.
Level Control Loop
• Dynamics of the sensor
and actuator are fast
compared to the
Fin
Lsp process.
Fout
LC LT • If operators want
FT
control to setpoint, use
FC
PI controller with small
RSP
amount of integral
action, otherwise use P-
only controller.
Pressure Control Process
Psp PC
Vent
PT C.W.