CHE3162.Lecture10 Tuning Stability
description
Transcript of CHE3162.Lecture10 Tuning Stability
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:
– 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
1st Performance
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) • Quantifiable in simulations, usually not in practice
– but some modern systems can – Theoretical tunings : Zeigler Nichols, Cohen Coon
∫ dte
∫ dtet∫ dte2
∫ dtte2
Some Control Quality Criteria -2
• Quarter decay ratio between first 2 peaks – "It looks right"
0 5 10 15 20Time
0
0.5
1
1.5
Res
pons
e
Response for a set-point change
Response has some damped oscillation, but not “too much”
Trades off speed of response with stability
A B B/A = 0.25
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
Gp
T Fs Gv
U
Km = 1 Tm
+
Response
Open-loop step response
The open loop (valve + process + sensor) is modelled as first order + dead time (FODT)
Step input
δ
Finding FODT Model
• Use 28% & 63% points to calculate τ & θ
0 5 10 15 20 25 30 35 40 0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Time
Res
pons
e t63
t28
∆
1s
sKe+τ
θ−
τ−=θ−=τ
%63
%28%63 )(5.1t
tt
• Also calculate K = ∆/δ
Cohen-Coon Recommended Tuning Parameters
R = θ/τ (Beware θ ≈ 0 [R ≈ 0] – case)
MODE: P P + I P + D P + I + D GAIN (1+R/3)
---------- KR
(0.9+R/12) -------------
KR
(1.25+R/6) -------------
KR
(1.33+R/4) -------------
KR INTEGRAL
TIME θ(30+3R)
----------- (9+20R)
θ(32+6R) ------------- (13+8R)
DERIVATIVE TIME
θ(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 Kq Kq/1.05 Kq
Ti - Pq Pq/1.5 τd - - 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
τd - - Pu/8
At ultimate gain, system oscillates
• Damping coefficient = 0 • “undamped” system
Seborg
Seborg
0<ξ<1
ξ=0
ξ<0 IF an exact 2nd order system:
Effect of gain on controller response Kc<Ku
Kc = Ku
Kc > Ku
Closed loop responses for different values of the controller gain Kc compared to the ultimate gain Ku
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 τd 0.9 1.17
Disturbance step: effect Kc
y
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!
23 Fig. 12.1. Unit-step disturbance responses for the candidate controllers (FOPTD Model: K = 1, PI Contoller θ 4, τ 20).= = Seborg
Direct Synthesis tuning • Not always trial and error if you know the loop transfer functions. • Can solve directly for desired response
• Let so:
(12-1)1
m c v p
sp c v p m
K G G GYY G G G G
=+
(12-2)1
c
sp c
G GYY G G
=+
v p mG G G G
Seborg
Rearranging and solving for Gc gives an expression for the feedback controller:
/1 (12-3a)1 /
spc
sp
Y YG
G Y Y
= −
Direct Synthesis example
4
15s+1 T F
s 1 Kc U
Km = 1 Tm
1e-s
1+5s TD
+ +
Ts E +
-
Valve
Disturbance Example block diagram
Define that we want: ( )12
1+
=sT
T
SP
−
=SP
SPc YY
YYG
G/1
/1
( ) ( )
( )ss
sG
ss
s
ssG
c
c
81
815
8115
1121
4115
)12(11
)12(1
4115
+=+
=
−++
=
+−
++=
)11(sT
KGi
cc +=
For a PI controller:
So we need a PI controller:
)15
11(8
15s
Gc +=
Direct synthesis Tuning: P control of 2nd Order process
For step in SP
• System is still second order but Kc affects time constant τ AND damping coeff ξ
11
21
11
121
22
22
+
++
+
+=
+++=
sKK
sKK
KKKK
sY
KKssKK
sY
pcpc
pc
pc
pc
pc
ξττ
ξττ(Assuming Kv=Km=1)
Direct synthesis Tuning: P control of 2nd Order process
pccontrol KK1+
τ=τ
pccontrol KK1+
ξ=ξ
11
21
11
22
+
++
+
+=
sKK
sKK
KKKK
sY
pcpc
pc
pc
ξττ K values affect ξ Underdamped? Overdamped? Stability?
Choose value of Kc to set damping coefficient value to give response you want
Underdamped Overdamped
2nd order responses
0 -1 1
ξ r1,r2 are –ve
r1,r2 =p+iw where p is -ve
r1,r2 =p+iw where p is +ve
r1,r2 are +ve
1s2sK
XY
22 +ξτ+τ=
UNSTABLE STABLE
Dead Time De-stabilises Control loops
+
- G c G p
Y s
d
+ +
G D
U Y E e -θs
A process with some dead time
Plot
Time (sec)0 5 10 15 20 25 30
-20
-15
-10
-5
0
5
10
15
20
Effect of dead time
• First order systems (no deadtime) are always stable • Add deadtime and response is very different • Example - P control of:
• Set Kc = 2 • Make a SP change
132 2
+=
−
se
XY s
UNSTABLE!
Ziegler-Nichols Ultimate Sensitivity Method – From Frequency Response
4e-2s
1 + 15s T Fs 0.5
1 +0.5s Kc U
Km = 1 Tm
1e-s
1+5s TD
+ +
Ts E +
-
Valve
Disturbance Example block diagram
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
4e-2s
1 + 15s T Fs 0.5
1 +0.5s U
Km = 1 Tm
+
Input a sine wave, frequency ω rad/time
Response is a sine wave, same frequency, different amplitude and phase
A Bode plot of amplitude ratio and phase vs frequency is the OPEN-LOOP FREQUENCY
RESPONSE
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
10 -3 10 -2
10 -1 10 0 10 -3
10 -2
10 -1
10 0
w, rad/time
AR
10 -3 10 -2
10 -1
10 0 -200
-150
-100
-50
0
w, rad/time
phas
e, d
eg
-180 ω = 0.673
0.187
AR=0.187 Ku*AR≤1 (stability limit)
Hence: Ku ≤ 1/0.187 ≤ 5.34 Z-N Kc =0.5Ku So set Kc=2.67
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 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