Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
PID Controllers
- Calculating &
Eliminating Offset
Chapter 7&8: Marlin
Chapter 6: Smith & Corripio
Learning objectives
Understand P control and calculate offset for
setpoint and disturbance changes
Understand how PI control eliminates offset
Understand how tuning control loop parameters
K, TI and d affect response of control loops
Be able to prove the magnitude or absence of
offset using TF and final value theorem
Proportional P
Integral I
Rapid change
rapid response required
Derivative D
1
U
= K c 1 +
+ d s
E
TI s
Gc
Gv
Gp
Ym
Gd
Gm
Y depends
on both
YSP and D
Forward
1+ Around the loop
G G G
G
c v p
d
Y=
Y +
D
s
1+ G G G G
1+ G G G G
c v p m
c v p m
Exercise: Derive this Closed Loop Transfer Equation relating Y to Ys and D
P control
E.g Disturbance= +
5C,
Final value= + 1.5 C
Offset=1.5 C
1.5
1.5
Always some
Offset for P
control
Size of offset
depends on size
of controller gain
Kc
OFFSET
Smith
3
Gd =
4s + 1
5
Gp =
3s + 1
K cG p
Y
=
SP 1 + K c G p
SP
1
Kc
Gd= 3
4s+1
K v =1
Fs
Km = 1
Gp= 5
3s +1
s + 1
1 + 5K c
K overall =
5K c
1 + 5K c
=
1 + 5K c
Overall
Gain 1
Time Constant
affected by Gain
s + 1
1 + 5K c
s0
Evaluate sY(s) as s 0
Y= 5Kc/(1+5Kc) 1
Proportional Offset
Desired=SP for a
SP change
5
K=2
0.8
0.6
K=1
0.4
0.2
0
0
Gd
Y
=
D 1 + K cG p
SP
Kc
3
4s+1
K v =1
Fs
Km = 1
5
3s +1
(3s + 1)
1 + 5K c
Y
3(3s + 1)
=
=
D (4 s + 1)(3s + 1 + 5 K c )
3
(4 s + 1)
s + 1
(1 + 5 K c )
Lead-lag response
(3s + 1)
1 1 + 5K c
Y=
s
3
(4 s + 1)
s + 1
(1 + 5 K c )
Y= 3/(1+5Kc)
Desired = 0
Offset = 3/(1+5Kc)
Disturbance Offset
SS Offset = |desired - actual|
Desired=0
For disturbances
0.5
3
= offset
actual =
1 + 5K c
0.45
K=1
0.4
Amplitude
0.35
0.3
0.25
K=2
0.2
0.15
0.1
K=5
0.05
0
8
Time (secs)
10
12
14
16
Proportional Control:
Calculating Offset for a Disturbance
2: Regulator Transfer Function
D
YSP
+
Gc
Gv
Gp
Ym
Gd
In process
control YSP
+ Y is usually
+
constant
& D(t) varies
So YSP = 0
Gm
G
Y
d
=
D 1+ G G G G
c v p m
Exercise: Write down the Transfer Function Y/Ys for D(t) = constant
Proportional control of
st
1
order
Proportional control of
Second Order processes
P control of 2nd order process (Kv=1)
Gp =
Kp
s + 2s + 1
Closed loop TF:
2 2
Gp
SP
+
Kc
K v =1
F
s
2nd order
Km = 1
Kc K p
Y
= 2 2
SP s + 2s + 1 + K c K p
For step in SP:
Kc K p
1
Y=
s 2 s 2 + 2s + 1 + K c K p
Proportional control of
Second Order processes
For step in SP
Kc K p
1
Y=
s ( 2 s 2 + 2s + 1 + K c K p )
Kc K p
1 + Kc K p
1
Y=
s 2
2 2
s +
s + 1
1+ K K
1+ K K
c
p
c
p
s +
s + 1
1+ K K
1+ K K
c
p
c
p
K values affect
Underdamped?
Overdamped?
Stability?
KcK p
(s)
FVT: lim sY
0 =
1 + KcK p
Dynamics
control
=
1 + KcK p
control
=
1 + KcK p
With control
control
2
=
1 + Kc
Amplitude
1
Gp =
9s + 12s + 1
K=8: >1
0.9
underdamped
0.8
0.7
K=3: =1
0.6
Critically damped
0.5
0.4
K=1: >1
overdamped
0.3
0.2
0.1
0
10
15
Time (secs)
P vs PI control
Discussed P control
1st and 2nd order processes
SP and D changes
PI control
1
u(t) = K [e(t) + e(t)dt] + u(0)
c
T
i
U is the controller output
E is the difference between SP
& the measured value
Laplace transform
1
U
= K c 1 +
E
TI s
Kc = controller gain
TI = Integral time
U
1
= K [1 +
]
c
E
Ts
i
Smith
Gp =
Kp
s + 1
G c = K c 1 +
TIs
Closed loop TF
K p K c 1 +
TIs
Y
=
SP
s + 1 + K p K c 1 +
TIs
Multiply by (Tis)/(Tis)
K p K c 1 +
K p K c (TI s + 1)
TI s
Y
=
=
SP
1 TI s (s + 1) + K p K c (TI s + 1)
s + 1 + K p K c 1 +
TI s
Step change in SP = 1/s:
K p K c (TI s + 1)
1
Y=
s TI s (s + 1) + K p K c (TI s + 1)
0 = 1
lim
sY ( s )
Example: PI control of a
1st order process
Gc Gv G p
Y
=
SP 1 + Gc Gv G p Gm
Gc = 11 +
Ti s
SP
Gc
3
4s+1
Gv =1
Fs
Gm = 1
5
3s +1
Example: PI control of a
1st order process
Gc Gv G p
Y
=
SP 1 + Gc Gv G p Gm
1
5
1 5
51 +
1 +
5+
TI s
TI s
TI s (3s + 1)
Y
=
=
=
SP
1 3s + 6 + 5
1 5
3s + 1 + 51 +
1 + 1 +
TI s
T
s
T
s
(
3
s
1
)
+
I
3
4s+1
SP
+
-
1+1
TiS
K v =1
Fs
Km = 1
5
3s +1
Example:
st
1
5+
CLTF =
5
TI s
Y
=
SP 3s + 6 + 5
TI s
Y
5TI s + 5
=
SP 3TI s 2 + 6TI s + 5
Y
TI s + 1
=
SP 0.6TI s 2 + 1.2TI s + 1
control = 0.6TI
control
0.6TI
=
= 0.6TI
0.6TI
Offset of PI control
Y
TI s + 1
Use FVT to evaluate as
=
2
sF(s) 0
SP 0.6TI s + 1.2TI s + 1
Assume unit step in SP
Put into equation and
TI s + 1
1
evaluate using FVT
FVT ( sY ) = s
2
s 0.6TI s + 1.2TI s + 1
If Y=1 after SP=1, then Y
will reach the SP
exactly (no offset)
0 +1
=1
FVT =
Independent of Ti value
0 + 0 +1
Offset elimination is the main
advantage of PI control
Note:Integral time choice does affect stability
Example:
st
1
1.4
TI=0.2
1.2
TI=1
No offset with PI
Goes to +1 exactly
TI=2
0.8
Y
5TIs + 5
=
2 means
Shorter
SP integral
+ 6TIs + 5
3TIstime
Setpoint increase of +1
0.6
0.4
0.2
2
Time (secs)
Error integrals
Smith
1
U
= K c 1 +
+ d s
E
TI s
Typical responses
Seborg
VALUE
Most stable
INTEGRAL
(RESET)
Removes
offset
DERIVATIVE
(RATE)
Increases
stability
Shorter
oscillation
period
TOO MUCH
Stability
decreases
TOO LITTLE
Larger offset
Slower
response
Stability
Slower return
decreases
to set point
Longer
oscillation
period
Stability
Max benefit
increases
not achieved
Amplify noise
Yes
Use P-Only
No
Yes
No
Use PI
Yes
No
Use PID
No
Which controller?
P, PI or PID?
1. Basic pressure or
level control
Basic P control OK
Can use PI to remove
offset
2. Flow control
3. Temp or concentration
Usually SLOW response
PI usually slow or unstable
Use PID: Need D to
increase K and speed of
response
Simplest.
P+D
Rare.
P+I
Most common
Widely used
T1: Modelling
& Laplace TF
T7: Tuning
Control loops
T8: Cascade
Control
T9: Feed
Forward
& Ratio control