You are on page 1of 33

Process Control

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 parameters K, TI and td affect response of control loops
• Be able to prove the magnitude or absence of offset using TF and final value
theorem

2
PID response matches
“common sense”
1 de
u(t)  K [e(t)   e(t)dt  t d ]  u(0)
c T dt
i
• If a big error occurs:
• You need a big response Proportional P
• But there is still a remaining error:
• Adjust until you eliminate error Integral I
• Rapid change
• rapid response required Derivative D

U  1 
 K c 1   t d s 
E  TI s 
3
General Block Diagram

D Gd

YSP + Y Y depends
E U +
Gc Gv Gp
+ on both
-
YSP and D
Ym
Gm

G G G G
c v p d
Y Y  D
1 G G G G s 1 G G G G
c v p m c v p m

4
P control: What does offset mean?

• If you make a setpoint change while in proportional ONLY control, the output
will change and move towards the setpoint but will not quite reach the
setpoint.
• (If gain is high, will come close to SP)

5
0.5
4.5

E.g SP = +5 °C,
Final value = + 4.5 °C
Offset = 5 - 4.5 = 0.5 °C

5
P control: What does offset mean?

• If there is a disturbance while in proportional only control, the output will drift
initially away from SP, and may drift back towards SP but will never actually
return to the original

E.g. Disturbance = + 5 °C,


Final value = + 1.5 °C
Offset = 1.5 °C 1.5
1.5

6
Proportional Control Causes Offset
First order closed loop response to a unit step in SP Always some
Offset for P control

Size of offset
depends on size of
controller gain Kc

G G G
Y c v p

YSP 1  G G G G
c v p m

Smith & Corropio


7
P control for a disturbance

Smith

P → Offset
i.e., h(t) reached
steady state, but
did not return to h
OFFSET
=6.0 after the
disturbance

8
P control and offset

• In both cases, offset is the difference between the


desired SS value and the actual SS value
• SS Offset = |desired output- actual output|
• For a setpoint change, want output to reach the
setpoint : Desired = DSP
• OffsetDSP=|SP-FVT|
• For a disturbance, want output to stay unaffected:
Desired=0
• OffsetDD=|0-FVT| =FVT
• FVT = Final Value Theorum
9
Example:
Proportional Control for SP Change
• Even for the most simple 1st order system:

Y K cG p
 ≠1
SP 1  K cG p D
Gd= 3
4s+1
+
SP E U Fs Gp= 5 + Y
Kc Kv =1
+
-
3s +1

Km = 1

10
Example: Proportional control for SP change to
a first order process
• Closed Loop response to a step in setpoint:
5
K cG p Kc
Y
  3 s  1 
5K c
SP 1  K cG p 1  K 5 3s  1  5K c
3s  1
c

• Rearrange to standard form K/(ts+1):


5K c 5K c Overall
K overall 
Y 1  5K c 1  5K c Gain ≠1

SP  3   3 
  s  1 t   
Time Constant

 1  5K c 
affected by Gain
 1  5K c 

11
Example: Proportional control for SP
change to a first order process
• For unit step in SP 5K c
(i.e. SP=1/s) 1 1  5K c
Y
s 3 
  s  1
 1  5K c 
Final Value Theorem: lim f ( t )  lim[sf (s)]
t  s 0
• Evaluate sY(s) as s 0
• Actual Y= 5Kc/(1+5Kc) ≠ 1
• Desired = 1 (since unit change in SP)
• May be “close enough” if 5Kc >>1

12
Example: Proportional control for SP change
to a first order process
Desired = SP for
• SS Offset = |desired - actual| SP changes
1.2

1
Kc=5
0.8
Kc=2 Kc=1
0.6

0.4

0.2

0
0 1 2 3 4
Example: Proportional control for a
disturbance to a first order process
Y Gd

D 1  K cG p
3
D
4s+1
+
SP E U Fs 5 + Y
Kc Kv =1
+
-
3s +1

Km = 1

14
Example: Proportional control for a
disturbance to a first order process
• Closed Loop Disturbance TF Y/D:
3
Y

Gd
 4 s  1 
3
D 1  K cG p 1  5K c 3s  1  5K c
(4s  1)( )
3s  1 3s  1
 3 
 (3s  1)
Y 3(3s  1)  1  5K c 
 
D (4s  1)(3s  1  5K c )  3 
(4s  1) s  1
 1  5K c  
Lead-lag response
15
Example: Proportional control for a
disturbance to a first order process

 3 
• For unit step in D:  (3s  1)
1  1  5K c 
Y
s  3 
(4 s  1) s  1
 1  5K c  
• Offset calculated using Final Value Theorem:
• sY(s) as s  0 : Y= 3/(1+5Kc)
• Desired = 0
• Offset = 3/(1+5Kc)

16
Example: Proportional control for a
disturbance to a first order process
Desired = 0 for
• SS Offset = |desired - actual| disturbances
0.5

0.45 3
K=1 actual   offset
0.4
1  5K c
0.35

0.3
Amplitude

0.25

0.2
K=2
0.15

0.1

0.05
K=5
0
0 2 4 6 8 10 12 14 16
Time (secs)
17
Summary: Proportional control of first
order processes

• Closed loop means offset is unavoidable


• Offset may not be important in practice
• Or, the offset could be critical
• This depends on the values of gains in the process and the process application!
• Offset occurs for both setpoint changes and process disturbances
• Controller Gain directly affects overall process gain AND time constant

18
Example: Proportional control for a SP
change to a second order process
P control of 2nd order process (Kv=1)
Kp Gp
Gp  2 2 SP E U F Y
t s  2ts  1
+
+
Kc Kv =1 s
2nd order
-

Km = 1

Kc K p
Closed loop TF: 1  Kc K p
System is still
second order but Kc
Y affects time
 t2  2  2t  constant, t
  s    s  1
 1  Kc K p  1  Kc K p
AND damping
  coefficient, 

19
Example: Proportional control for a SP
change to a second order process
Kc K p
1 1  Kc K p
Y
s  t2  2  2t 
 s   s  1
1 K K  1 K K 
 c p   c p 

K values affect ξ
• FVT: KcK p Underdamped?
lim 
 0 
sY ( s )
Overdamped?
1  Kc K p Stability?

• Dynamics t 
tcontrol  control 
1  Kc K p 1  Kc K p

20
Example: Proportional control for a SP
change to a second order process

1
1 Kc=8: ξ>1
Gp  0.9
underdamped
9s  12s  1 0.8

0.7
Kc=3: ξ=1
Critically damped
P  2
0.6

Amplitude
0.5

0.4
2 Kc=1: ξ>1
control  0.3
overdamped
1  Kc 0.2

0.1

0
0 5 10 15 20
Time (secs)

21
Summary: Behaviour of the
Proportional Controller
• As the gain increases control quality (error, or
deviation from set point) starts to improve
• But oscillation increases
• Beyond a certain gain instability occurs
• For stable control there is a residual steady state
error
• This is called the OFFSET
• P control will ALWAYS leave an offset
• Increasing the gain reduces the offset

22
PI control
1
u(t)  K [e(t)   e(t)dt]  u(0) • This is a two-term
c T controller
i
• The integral action
eliminates offset
L
• It also makes the
control system less
U  1  stable
 K c 1   • The PI controller is
E  TI s  the most widely
used controller in
Kc = controller gain TI = Integral time the process
industries
23
P vs PI control for a disturbance

Smith 24
PI control for a setpoint change
to any first order process
• 1st order system Kp
Gp 
ts  1
 1 
G c  K c 1  
 TIs 
• Closed loop TF
 1 
K p K c 1  
Y
  TIs 
SP  1 
ts  1  K p K c 1  
 TIs 
25
PI control for a setpoint change to any
first order process
• Closed loop TF:
Multiply by (Tis)/(Tis)
 1 
K p K c 1  
Y  TI s  K p K c TI s  1
 
SP  1  TI s(ts  1)  K p K c TI s  1
ts  1  K p K c 1  
 TI s 

• Step change in SP: 1 K p K c TI s  1


Y

s TI s(ts  1)  K p K c TI s  1 
26
PI control for a setpoint change to any
first order process

• Final Value Theorem:


lim   0  1
sY ( s )
• OFFSET = 0
• Dynamics of PI control of 1st order process:
• Like a second order system
• Can be underdamped and oscillate

27
Example: PI control of a 1st order process
3
D
4s+1
+
SP E 1+1 U Fs 5 + Y
G G G Kv = 1
Y c v p + TiS 3s +1
 -

YSP 1  G G G G
c v p m Km = 1

 1  5
1  
Y  TI s  (3s  1) TI s  1
 
SP  1  5 0.6T s 2
 1.2TI s  1
1  1   I

 TI s  (3s  1)

Exercise: make sure you can do this!


28
Example: PI control of a 1st order process

Y TI s  1 K
  2 2
SP 0.6TI s  1.2TI s  1 t s  2t s  1
2

0.6TI
t control  0.6TI  control   0.6TI
0.6TI
Exercise: introduce a step change and use the Final
Value Theorem (FVT) to prove that the offset = 0,
regardless of the value of TI.

29
Example: PI control of step change to SP for a
1st order process
1.4

TI=0.2
1.2

1
TI=1
No offset with PI
0.8 Goes to +1 exactly
Amplitude

TI=2
Y 5TIs  5

0.6

0.4
SP 3TIs2  6TIs  5

0.2

0
0 1 2 3 4 5
Time (secs) 30
PID Transfer Function
1 de
u(t)  K [e(t)   e(t)dt  t d ]  u(0)
c T dt
i
L

U  1 
 K c 1   t d s 
E  TI s 
• Same procedure as used for P and PI control
• Substitute the controller transfer function:
• Use final value theorem to final SS value
• Practice this in assignment and lab 31
Effects of the Different Control Actions
At low
Mode Advantage At high values… Applications
values…
Increased Basic P or L
Decreased offset; control (offset
P Most stable
stability Slower may be
response tolerable)
Decreased
stability;
Slower return F control (offset
PI Removes offset Longer
to setpoint not tolerable)
oscillation
period
T or C control (D
Increases stability;
Increased Eliminates required to
PID Shorter oscillation
stability benefit increase speed
period
of response)

NOTE: Noise is amplified by D, e.g. liquid splashing


32
PID Control Choice
Start

Yes
Can offset be tolerated? Use P-Only
No
Yes
Is there noise present?
No Use PI
Yes
Is dead time excessive?
No
Yes
Is capacity extremely small?
No
Use PID

(Courtesy: Brent Young)


33

You might also like