You are on page 1of 65

Proportional-Integral-Derivative

PID Controllers
Cheng-Liang Chen
PSE
LABORATORY
Department of Chemical Engineering
National TAIWAN University
Chen CL 1
Outline
Proportional-Integral-Derivative Controller:
PID Control based on CurrentFuture Error with ConstantReset Bias
PID Control based on CurrentFuture Error with ConstantReset Bias
PID Control based on CurrentFuture Error with ConstantReset Bias
PID Control based on CurrentFuture Error with ConstantReset Bias
PID Control based on CurrentFuture Error with ConstantReset Bias
PID Control based on CurrentFuture Error with ConstantReset Bias
PID Control based on CurrentFuture Error with ConstantReset Bias
Chen CL 2
Steady Oset of PID when using Constant bias
Series PID Parallel PID
Response of PID Controllers to Typical Inputs
Operational Aspects of PID Controllers
problems of D action: sensitivity to noise
problems of I action: moving PB and reset windup
manual control requirement
bump-less transfer
Chen CL 3
PID Controller: A Survey
More Than 95% of Controllers Are of PID Type
Bialkowski (1993): paper mills in Canada
A typical mill has more than 2000 control loops
97% of loops use PI control
Only 20% of control loops were found to work well
and decrease process variability
Reasons for poor performance were
Poor tuning (30%)
Valve problems (30%)
Others (20%): sensor, bad sampling rates
Chen CL 4
PID Controller: A Survey
More Than 95% of Controllers Are of PID Type
Ender (1993)
30% of installed process controllers operate in manual
20% of loops use default parameters (factory tuning)
30% of loops function poorly because of equipment
problems (valves, sensors )
Chen CL 5
Why PID Controllers Are So Popular ?
Structure: simple
Easy for understanding
A few adjustable parameters, easy for tuning
Performance: good or acceptable level
Robustness: strong to uncertain operating conditions
Applicability: wide to dierent processes/industries
Chen CL 6
A Heat Exchanger with Feedback Control
Valve: AFC (ATO); Controller: Reverse Action
Chen CL 7
Simplest Controller: On-O Control
u(t) =
_

_
u
b
+ u if y(t) < y
sp
d
u
b
u if y(t) > y
sp
+ d
Problem: oscillatory response !
On-o cares about control direction only;
On-o gives same control action for dierent error magnitudes
Solution: control action considering error magnitude
Chen CL 8
Current-Error-Based P Control
with Constant Bias (SS value)
current control corrective action, u(t)
current error magnitude, e(t) y
sp
y(t)
u(t) e(t) y
sp
y(t)
u(t) = K
c
e(t) p(t) (K
c
: adjustable proportionality)
u(t) = K
c
e(t)
. .
u(t)
+ u
b
..
SS value
for e(t) = 0
Chen CL 9
Problem of Current-Error-Based P Control
u(t) = K
c
e(t)
. .
u(t)
+ u
b
..
SS value
for e(t) = 0
Too late to correct current error
It takes time to know eect of control on output
conservative action to guarantee stability
limited achievable control performance
Chen CL 10
Solution: Future-Error-Based P Control
Back to the Future
Control action based on future condition (error)
take control action in advance
better control performance
u(t) = K
c
e(t+T
d
)
. .
u(t)
+ u
b
..
SS value
for e(t) = 0
u(t) = K
c
e(t+T
d
)
. .
u(t)
+ u
b
..
SS value
for e(t) = 0
Chen CL 11
Future-Error-Based P Control
Gives Better Performance
HE: pulse decrease in input temperature
At t
1
: e(t
1
+ T
d
) > e(t
1
)
P control based on e(t
1
+ T
d
) has larger action
more steam smaller undershoot in T
( Pre-Act P)
..
K
c
e(t
1
+ T
d
) + u
b
> K
c
e(t
1
) + u
b
. .
( Normal P)
Chen CL 12
Future-Error-Based P Control
Gives Better Performance
HE: pulse decrease in input temperature
At t
2
: e(t
2
+ T
d
) < e(t
2
)
P control based on e(t
2
+ T
d
) has smaller action
less steam smaller overshoot in T
( Pre-Act P)
..
K
c
e(t
2
+ T
d
) + u
b
< K
c
e(t
2
) + u
b
. .
( Normal P)
Chen CL 13
Implement Future-Error-Based P Control
As Current-Error-Based PD Control
Original P: u(t) = K
c
e(t) + u
b
PreAct P: u(t) = K
c
e(t + T
d
) + u
b
K
c
_
e(t) + T
d
de(t)
dt
_
. .
e

(t)e(t+T
d
)
+ u
b
Chen CL 14
u(t) = K
c
e(t + T
d
) + u
b

K
c
_
e(t) + T
d
de(t)
dt
_
. .
e

(t)e(t+T
d
)
+ u
b

Chen CL 15
Sub-Summary
P control based on current error with constant bias
e(t) e(t + T
d
)
P control based on future error with constant bias

u(t) = K
c
e(t + T
d
) + u
b
K
c

e(t) + T
d
de(t)
dt

(t)
+u
b

PD control based on current error with constant bias
Chen CL 16
Steady Oset for P (PD) Control
Non-zero Steady State Oset (I): Setpoint Change
Initial steady state: (all variables [0, 100%])
y = y
sp
= y e = 0 u = u
b
= u =
Chen CL 17
Case I: Setpoint change y
sp
: y y +
New steady state: y =?, u =?, e =?
(change in y) = K
p
{change in process input}
= K
p
{(change in CO) + (change in load)}
y y = K
p

_
_
_
u u
. .
change in CO
+
..
change in load=0
_
_
_
= K
p

_
K
c
e
..
_
_
(y + )
. .
new sp
y
_
_
+u
b
. .
u
u +
..
=0
_

_
y = y +
K
c
K
p
1 + K
c
K
p

. .
new steady state
= y +
. .
desired sp
Chen CL 18
Non-zero Steady State Oset (II): Load Change
Initial steady state: (all variables [0, 100%])
y = y
sp
= y e = 0 u = u
b
= u =
Chen CL 19
Case II: Load change : +
New steady state: y =?, u =?, e =?
(change in y) = K
p
{change in process input}
= K
p
{(change in CO) + (change in load)}
y y = K
p

_
_
_
u u
. .
change in CO
+
..
change in load=
_
_
_
= K
p

_
K
c
e
..
_
_
(y)
..
sp
y
_
_
+u
b
. .
u
u +
_

_
y = y +
K
p
1 + K
c
K
p

. .
new steady state
= y
..
desired sp
Chen CL 20
Current-Error-Based P Control
with Reset Bias
Question:
using P or PD control with constant bias,
how to guarantee zero steady-state oset ?
(at steady state: e = 0, y = y
sp
)
Answer: u = u
b
at SS
desired: e = 0 (y = y
sp
) at SS
u = u
b
at SS
Chen CL 21
Reset Bias for Zero SS Oset
Simplest Method
Simplest method to guarantee u = u
b
at SS:
Let u
b
(t) = u(t) for all t
then u
b
= u at steady state
e = 0 y = y
sp
P control based on current error with reset bias
via a unity-gain dynamics (not workable !)
Chen CL 22
Reset Bias for Zero SS Oset
Feasible Method
Feasible method to guarantee u = u
b
at SS:
desired: u
b
= u at SS
simplest method: u
b
(t) equals u(t) t
feasible method: u
b
(t) tracks u(t) t
u
b
(t) tracks u(t) with rst-order dynamics:
(use T
i
to adjust tracking velocity)
T
i
du
b
(t)
dt
+ u
b
(t) = u(t)
. .
equal
. .
tracking
Chen CL 23
P control based on current error with reset bias
via rst-order dynamics
Chen CL 24
Reset Bias Integral Action
(1) u(t) = K
c
e(t) + u
b
(t) (P with reset bias)
(2) u(t) = T
i
du
b
(t)
dt
+ u
b
(t) (u
b
(t) tracks u(t))
T
i
du
b
(t)
dt
= K
c
e(t) = p(t)
u
b
(t) u
b
=
1
T
i
_
t
0
p(t)dt
. .
change in bias
=
K
c
T
i
_
t
0
e(t)dt
. .
=u
b
(t)
Chen CL 25
(1) u(t) = K
c
e(t)
. .
p(t)
+
u
b
(t)
..
1
T
i
_
t
0
p(t)(t)dt
. .
u
b
(t)
+u
b
(PI)
= K
c
e(t) +
K
c
T
i
_
t
0
e(t)dt + u
b
= K
c
_
e(t) +
1
T
i
_
t
0
e(t)dt
_
+ u
b
Reset bias: interpreted as integral action
current-error-based P control with reset bias
(reseting bias according to integral of error)
= current-error-based PI control with constant bias
Chen CL 26
Reset Bias Integral Action

Chen CL 27

Chen CL 28
Future-Error-Based P Control with Reset Bias
P control based on future error
. .
PD
with reset bias
. .
PI
Interpreted As PD +PI (series PID ) Controller
e(t + T
d
) e(t) + T
d
de(t)
dt
e

(t)
Chen CL 29
u
b
(t) =
1
T
i
_
K
c
e

(t)dt + u
b

u(t) = K
c
e

(t)
. .
p(t)
+
u
b
(t)
..
1
T
i
_
K
c
e

(t)
. .
p(t)
dt +u
b
. .
u
b
(t)

Chen CL 30
Series PID Parallel PID
K
p
c
= K
c

_
1 +
T
d
T
i
_
K
c
= K
p
c

_
0.5 +
_
0.25
T
p
d
T
p
i
_
T
p
i
= T
i

_
1 +
T
d
T
i
_
T
i
= T
p
i

_
0.5 +
_
0.25
T
p
d
T
p
i
_
T
p
d
= T
d
/
_
1 +
T
d
T
i
_
T
d
= T
p
d
/
_
0.5 +
_
0.25
T
p
d
T
p
i
_
Chen CL 31
Series PID Parallel PID
p(t) = K
c
_
e(t) + T
d
de(t)
dt
_
u(t) = p(t) + u
b
(t)
T
i
du
b
(t)
dt
+ u
b
(t) = u(t)
P(t) = K
c
_
E(t) + T
d
dE(t)
dt
_
U(t) = P(t) + U
b
(t)
T
i
dU
b
(t)
dt
+ U
b
(t) = U(t)
P(s) = K
c
(E(s) + T
d
sE(s)) = K
c
(1 + T
d
s)E(s)
U(s) = P(s) + U
b
(s)
T
i
sU
b
(s) + U
b
(s) = U(s) U
b
(s) =
1
T
i
s+1
U(s)
Chen CL 32
U(s) = P(s) + U
b
(s) = P(s) +
1
T
i
s+1
U(s)
U(s) =
T
i
s+1
T
i
s
P(s)
=
T
i
s+1
T
i
s
K
c
(1 + T
d
s)E(s) (series PID)
=
K
c
T
i
s
_
T
i
T
d
s
2
+ (T
i
+ T
d
)s + 1
_
E(s)
= K
c
T
i
+T
d
T
i
_
1 +
1
(T
i
+T
d
)s
+
T
i
T
d
T
i
+T
d
s
_
E(s)
= K
c
_
1 +
T
d
T
i
_
_
1 +
1
T
i

1+
T
d
T
i

s
+ T
d
_
1 +
T
d
T
i
_
s
_
E(s)
= K
p
c
_
1 +
1
T
p
i
s
+ T
p
d
s
_
E(s) (parallel PID)
Chen CL 33
P Control Based on {Current, Future} Error
with {Constant, Reset} Bias
const. bias reset bias
current error P PI
future error PD PID
Chen CL 34
P Action to Step Error
Chen CL 35
PD Action to Step Error
Chen CL 36
PI (P-Reset) Action to Step Error
Chen CL 37
PID Action to Step Error
Chen CL 38
PD Action to Ramp Error
Chen CL 39
PID Action to Ramp Error
Chen CL 40
Problem of D Action (I):
Sensitive to High-Frequency Noise
Derivative action without lter:
Problem: sinusoidal input output mag. frequency
e(t) = Asin(t) D(t) = T
d
de(t)
dt
= T
d
A cos (t)
Chen CL 41
Solution: (rst-order) low-pass lter
T
d
N
dD(t)
dt
+ D(t) = T
d
de(t)
dt
. .
D action
. .
equal
. .
follow
Chen CL 42
Problem: (again)
derivative + ltering large inner signal (e
d
)
Solution: ltering derivative
Chen CL 43
Problem of D Action (II):
Bump Response to Step Input
Solution 1: D action on measurement
Derivative on measurement:
y(t + T
d
) y(t) + T
d
dy(t)
dt
e(t + T
d
) = y
sp
y(t + T
d
)
= y
sp

_
y(t) + T
d
dy(t)
dt
_
e(t) T
d
dy(t)
dt
For noise: ltering + derivative action
T
d
N
dy
f
(t)
dt
+ y
f
(t) = y(t) (y
f
(t) follows y(t))
D(t) = K
c
T
d
dy
f
(t)
dt
(derivative on y
f
(t))
Chen CL 44
Solution 2: ltering on setpoint signal
(use r(t) as the practical setpoint)
Solution 3: setpoint weighting (skip)
Chen CL 45
Problem of Reset (I):
Moving Proportional Band
(Reverse) P with reset bias: ([u
min
, u
max
] = [0%, 100%])
u(t) = K
c
_
y
sp
y(t)

+ u
b
(t) (K
c
> 0)
y(t) = y
max
= ? u(t) = K
c
_
y
sp
y
max

+ u
b
(t) = u
min
= 0%
y(t) = y
min
= ? u(t) = K
c
_
y
sp
y
min

+ u
b
(t) = u
max
= 100%
y(t) > y
max
u(t) < u
min
(saturation !)
y(t) < y
min
u(t) > u
max
(saturation !)
y(t) {y
min
, y
max
} u(t) {u
max
, u
min
} (normal operation)
Chen CL 46
Proportional Band: (for normal operation)
PB = [y
min
, y
max
] =
_
y
sp
+
u
b
(t)u
min
K
c
, y
sp
+
u
b
(t)u
max
K
c
_
=
_
y
sp
+
u
b
(t)0
K
c
, y
sp
+
u
b
(t)100
K
c
_
If y(t) PB, Then controller output is normal
width of PB: aected by K
c
y
max
y
min
=
u
max
u
min
K
c
=
100
K
c
%
position of PB: aected by K
c
, y
sp
, u
b
(t)
Chen CL 47
Example:
y
sp
= 50%, K
c
= 2, u
b
(t) = 50% t,
u
min
= 0%, u
max
= 100%
PB =
_
50 +
u
b
(t) 100
K
c
% , 50 +
u
b
(t) 0
K
c
%
_
= [ 25% , 75% ]
Chen CL 48
Moving PB due to Resetting Bias: Example
Process: G(s) =
_
0.016
3s+1
__
50
30s+1
__
1
10s+1
_
ZN-PI tuning: K
c
= 3.40, T
i
= 37 ( PB =
100%
K
c
%/%
= 29.4%)
Chen CL 49
Moving PB due to Resetting Bias: Example
Process: G(s) =
_
0.016
3s+1
__
50
30s+1
__
1
10s+1
_
Faster reset: K
c
= 3.40, T
i
= 18.5 ( PB =
100%
K
c
%/%
= 29.4%)
Chen CL 50
Moving PB due to Resetting Bias: Example
Process: G(s) =
_
0.016
3s+1
__
50
30s+1
__
1
10s+1
_
Slower reset: K
c
= 3.40, T
i
= 74 ( PB =
100%
K
c
%/%
= 29.4%)
Chen CL 51
Problem of
Reset (II)
Reset Windup
HE Example
Chen CL 52
Anti Reset-Windup:
Use A Saturation Model to Limit Control Signal
u(t) =
_

_
100% for v(t) 100%
v(t) for 0% v(t) 100%
0% for v(t) 100%
Chen CL 53
Anti Reset-Windup for Parallel PID
If v > u = u
max
Then e
s
= u v < 0
1
T
t
_
e
s
dt < 0 v until v = u
max
Chen CL 54
Modication of PID (I):
High-Frequency Noise
Problem of D Action: sensitive to high frequency noise
Solution: low-pass lter on D (P & D)
Chen CL 55
Modication of PID (II):
Anti Reset-Windup
Problem of Reset Action: reset windup (saturation)
Solution: limiter
Chen CL 56
Modication of PID (III):
Manual Control
Manual control: with an integrator
Chen CL 57
Modication of PID (IV):
Bumpless A/M Transfer
When in automatic control: m(t) (manual ) tracks u(t) (auto)
m(t): always ready to control
Chen CL 58
Modication of PID (V):
Bumpless M/A Transfer
Method 1: resetting bias during M/A (keep original y
sp
)
let u
b
(t) = m(t) K
c
e(t) (when M/A transfer)
thus u(t) = u
b
(t) + K
c
e(t) (auto control action)
= m(t) (nal manual action)
Chen CL 59
Method 2: set-point tracking (y
sp
(t) tracks y(t) when manual control)
T
s
dy
sp
(t)
dt
+ y
sp
(t) = y(t) (when manual control)
Disadvantage: y
sp
moved to undesired value ?
Chen CL 60
A Complete PID Controller (I)
Automatic control
Anti-reset windup
Bias tracking: bias tracks nal output u(t)
Manual tracking: m(t) tracks nal output u(t)
Manual setpoint adjustment
Chen CL 61
A Complete PID Controller (II)
Manual control
Anti-reset windup
Bias tracking: bias tracks nal output u(t)
Manual tracking: m(t) tracks nal output u(t)
(Manual setpoint adjustment)
Chen CL 62
A Complete PID Controller (III)
External setpoint (used in Cascade Control)
Anti-reset windup
Bias tracking: bias tracks nal output u(t)
Manual tracking: m(t) tracks nal output u(t)
Setpoint tracking:
Chen CL 63
A Complete PID Controller (IV)
Automatic control (used in Override Control)
Anti-reset windup
Bias tracking: bias tracks external signal z(t)
Manual tracking: m(t) tracks nal output u(t)
Setpoint tracking:
Chen CL 64
Thank You for Your Attention

You might also like