Lecture 12—Auto-tuning and Gain
Scheduling
1,Introduction
2,Tuning Techniques
3,Relay tuning
4,Applications
5,Gain Scheduling
6,How to find schedules
7,Applications
8,Conclusions
Introduction
Tuning and adaptation
Prior knowledge
Initialization of adaptive controllers
PID Control
Operational aspects
Operator interface
Views from the field
Views from the Field
Canadian mill audit,Average paper mill
has 2000 loops,97% use PI the remaining
3% are PID,adaptive etc,Bill Bialkowski
CCA’93.
Default settings
Poor control performance due to bad
tuning
Poor control performance due to
valves,actuators or positioner problems
Process Performance is not as good as you
think,D,Ender,Control Engineering 1993.
More than 30% of installed controllers
operate in manual
More than 30% of the loops actually
increase short term variability
About 25% of the loops use default
settings
About 30% of the loops have equip-
ment problems
Auto-tuning Techniques
The Ziegler-Nichols method
Transient response methods
Frequency response methods
ccirclebig K,J,?str?m and B,Wittenmark 1
Transient Response Methods
The three parameter model
GHsI
k
1 sT
e
sL
Step response methods
k
a
LT
Time
0.63k
The Ziegler-Nichols method
Controller aK
c
T
i
/L T
d
/L T
p
/L
P 1 4
PI 0.9 3 5.7
PID 1.2 2 0.5 3.4
Difficulties with Ziegler-Nichols
Difficult to determine parameters
Too low damping
Two parameters not enough
Area methods
A
0
L + T
k
A
1
Parameters are given by
T L
A
0
k
T
eA
1
k
Ziegler-Nichols Frequency
Response Method
Idea,Run a proportional controller,increase
gain until the system starts to oscillate.
Observe "ultimate gain K
u
,and "ultimate
period T
u
.
Interpretation,Find features of frequency
response
G(iw )
-
1
N(a)
Controller parameters
Controller K
c
/K
u
T
i
/T
u
T
d
/T
u
T
p
/T
u
P 0.5 1
PI 0.4 0.8 1.4
PID 0.6 0.5 0.12 0.85
Relay Tuning
The experiment
S Process
PID
Relay
A
T
u y
- 1
The results
0510
1
0
1
Time
Closed loop experiment
Stable limit cycle for large class of
processes
Much control energy close to ω
180
ccirclebig K,J,?str?m and B,Wittenmark 2
Practical Issues
Prior information?
How to start the experiments
Feedback to limit the amplitiude of the
oscillation
Modified Ziegler-Nichols rules
– Change values in the tables
– Use three parameters k
u
,T
u
and K
p
How to cope with disturbances
– Load disturbances
– Measurement noise
– Hysteresis
Automatic Tuning of the Double
Tank
Consider the double tank used in our
laboratory experiments.
Here is the results obtained with one of our
earliest auto-tuners.
y
u
200 s1000
0
0
1
u
c
Tuning PID control
200 s1000
0.5
Flow Control Temperature Control
ccirclebig K,J,?str?m and B,Wittenmark 3
Composition Control Adding Dynamics in the Feedback
Loop
Other information can be obtained by
introducing dynamics in the feedback loop
An integrator gives ω
90
A differentiator gives ω
270
Process
–1
1
s
S
a)
Process
–1
1
s
S
b)
Closed Loop Experiments
Controller Process
–1
–1
SS
An integrator can also be added
–1
Im L(iw )
Re L(iw )
L(iw )
B
A
Summary of Relay Feedback
Close to industrial operation
Easy to use
One-button tuning
Easy to explain to users
Works well for standard loops
Little prior information
Very robust
Generates automatically a perturbation
signal with a lot of energy at ω
180
Many possibilities not exploited
ccirclebig K,J,?str?m and B,Wittenmark 4
On-line Iteration
Idea,Find features of the online response
due to set point or load disturbances.
Modify controller settings based on the
observed features.
e
1
e
2
e
3
T
p
Features,damping d and overshoot o
d
e
3
e
2
e
1
e
2
o?
e
2
e
1
Controller modified based on heuristic rules.
Easy for PI more difficult for PID.
Prior information
Pre-tuning
Gain Scheduling
1,What is it?
2,How to find schedules?
3,Applications
4,Conclusions
Gain Scheduling
Process
schedule
Gain
Output
Control
signal
Controller
parameters
Operating
condition
Command
signal
Controller
Example of scheduling variables
Production rate
Machine speed
Mach number and dynamic pressure
How to Find Schedules?
Select scheduling variables
Make control design for different
operating conditions
Use automatic tuning
Transformations
ccirclebig K,J,?str?m and B,Wittenmark 5
Valve Characteristics
Flow
Position
Quick opening
Linear
Equal percentage
The valve characteristics depend on the
installation
A
B C
Schedule on Controller Output
FT
FIC
GS Ref
Discuss when this is appropriate
Schedule on Process Variable
LT
LIC
GS Ref
Discuss when this is appropriate
Schedule on External Variable
FTTT
TIC
GS Ref
Discuss when this is appropriate
ccirclebig K,J,?str?m and B,Wittenmark 6
Nonlinear Valve
A typical process control loop
S PI
cu
f
vy
Process
- 1
f
- 1
u
c
G
0
(s)
Valve characteristics
0 0.5 1 1.5 2
0
10
Time
fHuI
fHuI
A crude approximation!
Results
Without gain scheduling
0 10203040
0.2
0.3
0 10203040
1.0
1.1
0 10203040
5.0
5.2
Time
Time
Time
u
c
y
u
c
y
y
u
c
With gain scheduling
0 2040608010
0.2
0.3
0 2040608010
1.0
1.1
0 2040608010
5.0
5.1
Time
Time
Time
u
c
y
u
c
y
u
c
y
Concentration Control
System
c
in
V
d
V
m
c
Performance with changing flow
0 5 10 15 20
0.0
0.5
1.0
0 5 10 15 20
0.0
0.5
1.0
1.5
Time
Time
(a) Output c
c
r
q 0.5
q 0.9
q 1.1
q 2
(b) Control signal c
in
q 0.5
q 0.9
q 1.1
q 2
Variable Sampling Rate
Process model
GHsI
1
1 sT
e

where
T
V
m
q
τ
V
d
q
Sample the system with period
h
V
d
nq
The sampled model becomes
cHkh hI acHkhI H1?aIuHkh?nhI
where
a e
qh/V
m
e
V?d/HnV
m
I
Notice that the sampled equation does not
depend on q!!!
ccirclebig K,J,?str?m and B,Wittenmark 7
Results
Digital control with h 1/H2qI.Theflows
are,(a) q 0.5;(b)q 1;(c)q 2
0 5 10 15 20
0
1
0 5 10 15 20
0
1
0 5 10 15 20
0
1
0 5 10 15 20
0
1
0 5 10 15 20
0
1
0 5 10 15 20
0
1
Time Time
Time Time
Time Time
(a)
c
c
in
(b)
c
c
in
(c)
c
c
in
Flight Control
Pitch dynamics
a
V
q
q =
˙
q
N
z
d
e
Operating conditions
0 0.4 0.8 1.2 1.6 2.0 2.4
80
60
40
20
0
1 2
3 4
Mach number
Altitude (x1000 ft)
The Pitch Control Channel
Filter
Filter
Filter A/D
A/D
A/D
D/A
D/A
Filter
-
H
H M
H
M
Pitch stick
Position
Acceleration
Pitch rate
S
S
S
S S
Gear
To servos
S
V
IAS
V
IAS
V
IAS
MH
K
DSE
K
SG
T
1
s
1+ T
1
s
1
1+ T
3
s
K
Q1
K
NZ
M H
K
QD
T
2
s
1+ T
2
s
Schedule of K
Q
with Respect to
Indicated Airspeed (IAS) and
Height (H)
0.5
010201000
H (km)
0
0.5
0 0
(km/h)
V
IAS
K
QD
IAS
K
QD
H
ccirclebig K,J,?str?m and B,Wittenmark 8
Surge Tank Control
A surge tank is used to smooth flow varia-
tions,The is allowed will fluctuate substan-
tially but it is important that the tank does
not become empty or that it overflows.
FIC
LICLT
Surge tank
FT
The Igelsta Power Station
Controller structure before modification
TT
TIC
Heat exchangerBoiler
PT
PIC
Set point
Fuel/air
DH
network
Modified controller structure
TT
TIC
Heat exchangerBoiler
PT
PIC
Set point
Fuel/air
XT
DH
network
Schedule
Valve Position K
c
T
i
T
d
0.00-0.15 1.7 95 23
0.15-0.22 2.0 89 22
0.22-0.35 2.9 82 21
0.35-1.00 4.4 68 17
When to Use Different
Techniques?
Gain scheduling
Auto-tuning
Adaptation
Constant dynamics
Predictable
changes in dynamics
Unpredictable
changes in dynamics
Constant controller
parameters
Predictable
parameter changes
Unpredictable
parameter changes
Auto-tuning
Auto-tuning
Auto-tuning
Auto-tuning
ccirclebig K,J,?str?m and B,Wittenmark 9
Conclusions
Very useful technique
– Linearization of nonlinear actuators
– Surge tank control
– Control over wide operating ranges
Requires good models
Easy to use when combined with auto-
tuning
Good operational experience
Issues to be considered
– Choice of scheduling variables
– Granularity of scheduling tables
– Interpolation
– Bumpless parameter changes
– Operator interfaces
ccirclebig K,J,?str?m and B,Wittenmark 10