You are on page 1of 35

CHE3162 Lecture 10

PID Controller
Tuning &
Stability

Learning Objectives
Understand how to tune feedback PID loops to
find optimal values for K, TI and d by:
two experimental methods (Zeigler-Nichols ult
sensitivity and decay)
Three calculatation methods (Zeigler-Nichols, Cohen
Coon, Direct Synthesis)

Awareness of alternate tuning criteria


Understand meaning of stability in control
loops
Be able to select appropriate tuning parametes
to ensure a stable control loop

What is perfect control ?


For all systems:

Performance

1st
A load disturbance (D) has NO effect on the
controlled variable (Y)
The controlled variable (Y) follows its set point Ys
EXACTLY

For multiple loop systems:


A change to one variable does not affect other
controlled variables. i.e., NO INTERACTION

For real systems:


Control has the ability to handle CONSTRAINTS

Some Control Quality Criteria - 1


Minimum total error (deviation from set point) until
new steady state. eg:
Integral of absolute value of error (IAE)
Integral of time-multiplied absolute
value of error (ITAE)
Integral of error squared (ISE)
Integral of time-multiplied error
squared (ITSE)

e dt
t e dt
2

e dt
2
te dt

Quantifiable in simulations, usually not in practice


but some modern systems can
Theoretical tunings : Zeigler Nichols, Cohen Coon

Some Control Quality Criteria -2


Quarter decay ratio between first 2 peaks
"It looks right"
1.5

B B/A = 0.25

A
Response

Response has
some damped
oscillation, but
not too much

Trades off
speed of
response with
stability

0.5

Response for a set-point change


0
0

10
Time

15

20

Controller Tuning Methods


Trial and error using one of the criteria as a
guide, or empirical rules of thumb
1. Cohen-Coon Method
(Open Loop)
2. Ziegler-Nichols Ultimate Sensitivity Method
(Closed Loop)
3. Ziegler-Nichols Quarter Decay Method
(Closed Loop)
4. Ziegler-Nichols BODE stability method

The Cohen-Coon Tuning Method


The open loop (valve + process + sensor) is
modelled as first order + dead time (FODT)

Step input

Gv

Fs

Open-loop step
response

Tm
Response

Km = 1

Gp

s
Ke

Finding FODT Model


Use 28% & 63%
points to calculate
&

s + 1

1
0.9
0.8
0.7

t28

= 1.5(t63% t 28% )
= t63%

Response

0.6

0.5

t63

0.4
0.3
0.2

Also calculate
K = /

0.1

0
0

10

15

20

Time

25

30

35

40

Cohen-Coon Recommended
Tuning Parameters
(Beware 0 [R 0] case)

R = /

MODE:

GAIN

(1+R/3)
---------KR

INTEGRAL
TIME
DERIVATIVE
TIME

P+I

P+D

P+I+D

(0.9+R/12) (1.25+R/6) (1.33+R/4)


------------- ------------- ------------KR
KR
KR
(30+3R)
(32+6R)
----------------------(9+20R)
(13+8R)
(6-2R)
---------(22+3R)

4
----------(11+2R)

Zeigler Nichols tuning


Set of parameters to give decay ratio
response
Determined by one of two experimental
methods:
1. Quarter decay tuning experiment
2. Ultimate sensitivity experiment (also called
continuous cycling method)

Can also work out theoretically from TF


Decay ratio equation, or frequency response to find
ultimate gain

Ziegler-Nichols Quarter Decay


Method -- Experimental
Make control action Proportional only
Switch off, or minimise Integral & Derivative actions

Iteratively find proportional gain (Kc) to give damped


oscillation with quarter decay ratio
Note this value = Kq
Note oscillation period = Pq (time units)
Apply rules:
P
P+I
PID
Kc
Ti

Kq
-

Kq/1.05
Pq
-

Kq
Pq/1.5
Pq/6

Quarter decay responses

Ziegler-Nichols Ultimate Sensitivity


Method -- Experimental
Make control action Proportional only
Switch off, or minimise Integral & Derivative actions

Iteratively find proportional gain (Kc) to give constant


amplitude oscillation
Note this value = Ku (Ultimate sensitivity or gain)
Note oscillation period = Pu (ultimate period as a time)
Apply rules:
P
P+I
PID
Kc

0.5Ku

0.45Ku

0.6Ku

Ti

Pu/1.2

Pu/2

Pu/8

At ultimate gain, system oscillates


Damping coefficient = 0
undamped system

Seborg

Effect of gain on controller response


Kc<Ku

0<<1
Kc = Ku

Closed loop responses for


different values of the
controller gain Kc compared
to the ultimate gain Ku

=0

Kc > Ku

<0

IF an exact 2nd order system:

Seborg

C-C and Z-N Tuning parameters


are close, but not identical!
Modes

Cohen-Coon

Ziegler-Nichols

PI

Kc

2.7

2.4

PI

Ti

6.2

7.8

PID

Kc

4.1

3.2

PID

Ti

5.8

4.67

PID

0.9

1.17

Disturbance step: effect Kc

Seborg

ZN continuous cycling
disadvantages
The continuous cycling method is frequently recommended by control system
vendors. Even so, the continuous cycling method has several major
disadvantages:
1. It can be quite time-consuming if several trials are required and the
process dynamics are slow. The long experimental tests may result in
reduced production or poor product quality.
2. In many applications, continuous cycling is objectionable because the
process is pushed to the stability limits.
3. This tuning procedure is not applicable to integrating or open-loop
unstable processes because their control loops typically are unstable at
both high and low values of Kc, while being stable for intermediate values.
4. For first-order and second-order models without time delays, the
ultimate gain does not exist because the closed-loop system is
stable for all values of Kc, providing that its sign is correct. However, in
practice, it is unusual for a control loop not to have an ultimate gain.
Seborg

Tuning & Stability


Zn and CC methods are excellent places to start
Further optimization is possible
May be required in high performance situations on critical control
loops

Tuning the control loops also can affect the


stability of the control loop
A loop is considered to be stable if it reaches a
new steady state value
Does not climb/fall indefinately
Does not have increasing oscillations

Controller Tuning:Choose wisely!

Fig. 12.1. Unit-step disturbance responses for the candidate controllers


23
(FOPTD Model: K = 1, =
4,=
20). PI Contoller

Seborg

Direct Synthesis tuning


Not always trial and error if you know the loop transfer functions.
Can solve directly for desired response

K mGc Gv G p
Y
=
Ysp 1 + Gc Gv G p Gm
Let

G Gv G p Gm

(12-1)

so:

Gc G
Y
=
Ysp 1 + Gc G

(12-2)

Rearranging and solving for Gc gives an expression for the feedback


controller:

1 Y / Ysp
Gc =
G 1 Y / Ysp

(12-3a)
Seborg

Direct Synthesis example


Disturbance

Example block diagram

Gc =

1
G

Y / YSP

1 Y / YSP

T
D

Valve

Ts

T
1
Define that we want:
=
TSP (2 s + 1)

1e-s
1+5s

E
-

Kc

F
s

4
15s+1

+
+

Tm
1

Km = 1

(15s + 1) (2s + 1) = (15s + 1) 1


Gc =

s
4
2
1
1
4
+

For a PI controller:
1

(2s + 1)
1

=
+
G
K
(
1
)
So we need a PI controller:
c
c
(15s + 1) = 15 + 1
Ti s
Gc =
15
1
8s
8 8s
Gc = (1 +
)
8
15s

Direct synthesis Tuning:


P control of 2nd Order process
For step in SP
(Assuming Kv=Km=1)

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

System is still second order but Kc affects time


constant AND damping coeff

Direct synthesis Tuning:


P control of 2nd Order process
Kc K p
1 + Kc K p
1
Y=
s 2
2 2
s + 1

s +
1+ K K
1+ K K
c
p
c
p

control

=
1 + KcK p

control

K values affect
Underdamped?
Overdamped?
Stability?

=
1 + KcK p

Choose value of Kc to set


damping coefficient value to
give response you want

nd
2

r1,r2 are +ve

order responses

r1,r2 =p+iw
where p is +ve

-1

r1,r2 are ve

r1,r2 =p+iw
where p is -ve
STABLE

UNSTABLE

Y
K
= 22
X s + 2s + 1

Underdamped

Overdamped

Dead Time De-stabilises


Control loops
D

Ys
+

Gd
+

Gc

A process
with some
dead time

+
-s
G
e
p

Effect of dead time


First order systems (no deadtime) are always stable
Add deadtime and response is very different
Example - P control of:
2e 2 s
Y
= Plot
20
3s + 1
X
15
Set Kc = 2
UNSTABLE!
Make a SP change 10
5
0
-5
-10
-15
-20

10

15
Time (sec)

20

25

30

Ziegler-Nichols Ultimate Sensitivity


Method From Frequency Response
Disturbance

Example block diagram

TD

1e-s
1+5s

Valve

Ts

Kc

+
-

Tm

0.5 Fs
1 +0.5s

Km = 1

4e-2s
1 + 15s

The Bode Stability Criterion


For stability, the total dynamic loop gain
(AR) must be < 1 at the frequency where
the open-loop phase shift = -180o (-
radians)
This frequency is called the ultimate
frequency (u)

Ziegler-Nichols Ultimate Sensitivity

Open Loop Frequency Response

Input a sine wave,


frequency rad/time

A Bode plot of amplitude ratio and phase vs


frequency is the OPEN-LOOP FREQUENCY
RESPONSE

0.5 Fs
1 +0.5s

4e-2s
1 + 15s

Response is a sine wave, same frequency,


different amplitude and phase

Tm

Km = 1

Q: What kind of system would produce a response of different frequency?

Stability and the Open Loop


Frequency Response
Suppose input sine wave frequency such that the phase shift through
the O/L = -180o exactly
i.e. Ym is a sinewave that is 180 degrees out of phase with input

The error detector introduces another -180o for the feedback signal
E=SP-Ym, where SP is constant but Ym is a sinewave, so E is now a sine
wave but another 180 degrees out of phase

Hence signal returns in phase


If total loop gain (KOL*Kc) = 1 signal continues on
System will oscillate with constant amplitude
standing wave is set up

If total loop gain < 1, oscillations die out each cycle loop will be
stable (damped)
If total loop gain > 1, system has growing oscillations each cycle will
increase the oscillations: unstable

Z-N Ultimate Sensitivity Method From


BODE/Frequency Response
Find ultimate frequency (u) when
= -180o (- radians) (calculation or graph)
This also gives Pu (= 2/ u)
Find open-loop dynamic gain (AR or KOL) at u
Use calcs or graph,
For stability, overall K around open loop must be 1
Overall open loop gain: Ku*AR 1

Therefore Z-N Ultimate Sensitivity Ku = 1/ AR


Use the std Z-N rules table to tune controller

Bode Plot of Open Loop Frequency


Response
0.187

AR=0.187
Ku*AR1

AR

10 0
-1
10
-2
10
-3
10
-3
10

(stability limit)

-2

w, rad/time

10

-1

10

phase, deg

Hence:
Ku 1/0.187
5.34
Z-N Kc =0.5Ku
So set Kc=2.67

10

-50
-100

= 0.673

-150

-180
-200
-3
10

10

-2

w, rad/time 10

-1

10

The Bode Stability Criterion


For stability, the total dynamic loop gain (AR)
must be < 1 at the frequency where the openloop phase shift = -180o (- radians)
This is the ultimate frequency (u)
The Ziegler-Nichols Ultimate Period
Pu = 2/ u

Summary Tuning & Stability


Can select values for control loop using

Direct Synthesis or calculation methods,


Zeigler-Nichols ultimate sensitivity/cycling methods
Cohen-Coon method (FODT processes only)
Many more methods available..

Loop can become unstable if using:

High values of Kc
Small values of integral time Ti
Large values of derivative time
Sinusoidal inputs at ultimate frequency

You might also like