Advances in PID Control: Karl Johan Åström

Download as pdf or txt
Download as pdf or txt
You are on page 1of 51

Advances in PID Control

Karl Johan Åström

Department of Automatic Control, Lund University

March 10, 2018


Introduction
◮ Awareness of PID and need for automatic tuning:
◮ KJs Telemetric Experience 79-80, Westrenius
◮ Euroterm and Mike Sommerville
◮ The idea - Automatic generation of good input signals
◮ The patents Tore+KJ: Sweden 83, USA 85, ...
◮ Commercial exploitation
◮ NAF Control, Sune Larsson, Ideon: Tore, Båth, SDM 20
(84), ECA 40 (86)
◮ Ahlsell, Alfa Laval Automation, Satt Control, ABB
◮ Fisher Controls, Advisory board 88-92, board of directors
90-92. Fisher Controls + Rosemount [ Emerson
◮ Product development - From 2kbytes to Mbytes
◮ Gain scheduling, continuous adaptation
◮ Research: papers, MS, Lic & PhD
◮ Research Goals
Understand PID control and its use
How good models are required?
How to find tuning rules - computation dependent
◮ This lecture: What have we learned?
Tore – 40 Years of Collaboration
◮ Phd student 1978, PhD 1983;
New Estimation Techniques for
Adaptive Control
◮ Relay auto-tuning - patent 1983
◮ NAF 1985-89
◮ Back to the department at LTH
1999
◮ PID control
Recent PhD Students
◮ Kristian Soltesz 2013 On automation in Anesthesia
◮ Vanessa Romero 2014 CPU Resource Management and
Noise Filtering for PID Control
◮ Olof Garpinger 2015 Analysis and Design of
Software-Based Optimal PID Controllers
◮ Martin Hast 2015 Design of Low-Order Controllers using
Optimization Techniques
◮ Josefin Berner 2017 Automatic Controller Tuning using
Relay-based Model Identification
◮ Fredrik Bagge Carlson 201X Side projects: Optimization
Julia programming
The Magic of Feedback

Feedback has some amazing properties, it can


◮ make good systems from bad components,
◮ make a system insensitive to disturbances and component
variations,
◮ stabilize an unstable system,
◮ create desired behavior, for example linear behavior from
nonlinear components.
The major drawbacks are that
◮ feedback can cause instabilities
◮ sensor noise is fed into the system
PID control is a simple way to enjoy the Magic!
The Amazing Property of Integral Action
Consider a PI controller
Z t
u = ke + ki e(τ )dτ
0

Assume that all signals converge to constant values e(t) → e0 ,


Rt
u(t) → u0 and that 0 (e(τ ) − e0 )dτ converges, then e0 must be zero.
Proof: Assume e0 ,= 0, then
Z t Z t 
u(t) = ke0 + ki e(τ )dτ = ke0 + ki e(τ ) − e0 dτ + ki e0 t
0 0

The left hand side converges to a constant and the left hand side
does not converge to a constant unless e0 = 0, furthermore
Z ∞

u(∞) = ki e(τ ) − e0 dτ
0

A controller with integral action will always give the correct steady
state provided that a steady state exists. Sometimes expressed as it
adapts to changing disturbances.
Predictions about PID Control
◮ 1982: The ASEA Novatune Team 1982 (Novatune is a
useful general digital control law with adaptation):
PID Control will soon be obsolete
◮ 1989: Conference on Model Predictive Control:
Using a PI controller is like driving a car only looking at the
rear view mirror: It will soon be replaced by Model
Predictive Control.
◮ 2002: Desborough and Miller (Honeywell):
Based on a survey of over 11 000 controllers in the refining,
chemicals and pulp and paper industries, 98% of regulatory
controllers utilise PID feedback. The importance of PID
controllers has not decreased with the adoption of
advanced control, because advanced controllers act by
changing the setpoints of PID controllers in a lower
regulatory layer.The performance of the system depends
critically on the behavior of the PID controllers.
◮ 2016: Sun Li
A recent investigation of 100 boiler-turbine units in the
Guangdong Province in China showed 94.4% PI, 3.7% PID
and 1.9% advanced controllers
Entech Experience & Protuner Experiences
Bill Bialkowsk Entech - Canadian consulting company for pulp
and paper industry Average paper mill has 3000-5000 loops,
97% use PI the remaining 3% are PID, MPC, adaptive etc.
◮ 50% works well, 25% ineffective, 25% dysfunctional
Major reasons why they don’t work well
◮ Poor system design 20%
◮ Problems with valve, positioners, actuators 30%
◮ Bad tuning 30%
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 increase short term variability
◮ About 25% of the loops use default settings
◮ About 30% of the loops have equipment problems
PID versus More Advanced Controllers

Error Present
Past Future

Time
t t + Td
t  dy dyf 
Z
  sp
u(t) = kp β ysp (t) − yf (t) + ki ysp (τ ) − yf (τ ) dτ + kd γ −
0 dt dt

◮ PI does not predict


◮ PID predicts by linear extrapolation, Td prediction horizon
◮ Advanced controllers predict using a mathematical model
Publications in Scopus

6
10
Pubications per year

4
10

2
10

0
10
1920 1930 1940 1950 1960 1970 1980 1990 2000 2010 2020
Year

Number of publications by year for control (blue), PID (red) and


model predictive control (green) from Scopus search for the
words in title, abstract and keywords.
Outline

1. Introduction
2. Requirements
3. Tradeoffs
4. PI Control
5. PID Control
6. Relay Auto-tuners
7. Summary
Requirements

d n

ysp ym e u x y
F Σ C Σ P Σ

−1
Controller Process

◮ Attenuate load disturbances d


◮ Do not inject too much measurement noise n
◮ Robustness to model uncertainty
◮ Setpoint response - Can be dealt with separately by
feedforward F – (2 DOF, setpoint weighting, I-PD)
I–PD Controller with filtering and antiwindup
Filter
−ẏf uff Actuator
y kd Model
Gf (s)
−yf µ u
kp Σ
r e − +
1
Σ ki Σ s Σ
es
kt

The filter (can be combined with antialias filter)

0 1 0
      
d x1 x1
= + y,
dt x2 −Tf−2 −Tf−1 x2 Tf−2

has the states x1 = yf and x2 = dyf /dt. The filter thus gives
filtered versions of the measured signal and its derivative. The
second-order filter also provides good high-frequency roll-off.
Tune for Load Disturbances - Shinskey 1993
“The user should not test the loop using set-
point changes if the set point is to remain
constant most of the time. To tune for fast
recovery from load changes, a load distur-
bance should be simulated by stepping the
controller output in manual, and then trans-
ferring to auto. For lag-dominant processes,
the two responses are markedly different.”

Process control: Tune kp , ki , kd and Tf for load disturbances,


measurement noise and robustness, then tune β , and γ for
setpoint response.

t  dr dy 
Z
− f
 
u(t) = kp β r (t) − yf (t) + ki r (τ ) − yf (τ ) dτ + kd γ
0 dt dt
1
Yf (s) = Y (s)
1 + sTf + s2 Tf 2 /2
Assessment of Disturbance Reduction

Compare open and closed loop systems!

Ycl 1
= =S
Yol 1 + PC

Geometric interpretation: Distur-


bances with frequencies outside
are reduced. Disturbances with fre-
quencies inside the circle are am-
plified by feedback, the maximum −1
amplification is Ms . ω ms
Disturbances with frequencies
less than sensitivity crossover ω sc
frequency ω sc are reduced by
feedback.
Load Disturbance Attenuation

Transfer function from load disturbance d to process outpur y (


P(0) = K )

P sP(s) s s
Gyd = = SP ( ( $K (
1 + PC s + Kki s + Kki ki

P = 2(s + 1)−4 PI: kp = 0.5, ki = 0.25

0
10
pGxd (ω )p

−1
10

−2
10
−2 −1 0 1
10 10 10 10
ω
Criteria and FOTD Model
Traditionally the criteria
Z ∞ Z ∞ Z ∞
IE = e(t)dt , IAE = pe(t)pdt , IE2 = e2 (t)dt
Z0 ∞ 0
Z ∞ 0
2 2
ITAE = t pe(t)pdt , QE = (e (t) + ρ u (t))dt
0 0

Notice that for a step u0 in the load disturbance we have

1
Z ∞
u(∞) = ki e(t)dt , IE =
0 ki

The FOTD model


K L
P(s) = e−sL , τ = 0 ≤τ ≤ 1
1 + sT
,
L+T
Lag dominant τ small (τ < 0.3) and delay dominant dynamics τ
close to 1
Measurement Noise Injection
d n

u x y
CPID Σ P Σ

−Gg

Controller Process

Controller transfer function


1 ki
Gf = CPID (s) = kp + +kd s, C = CPID Gf
1 + sTf + s2 Tf2 /2 s

Transfer function from measurement noise n to control signal u

C s ki + kp s + kd s2
−Gun (s) = − = −SC ( − $
1 + PC s + Kki s(1 + sTf + (sTf )2 /2)

Only controller parameters and K = P(0)


Bode Plots of Noise Transfer Function Gun
Lag dominated Balanced Delay dominated
1 1 1
10 10 10
PI

0 0 0
10 10 10

−1 −1 −1
10 10 10

−2 0 2 4 −2 0 2 −2 0 2
10 10 10 10 10 10 10 10 10 10

1 1 1
10 10 10
PID

0 0 0
10 10 10

−1 −1 −1
10 10 10

−2 0 2 4 −2 0 2 4 −2 0 2
10 10 10 10 10 10 10 10 10 10 10

◮ Validity of approximation (error in mid frequency range Ms


peak)
◮ Differences PI/PID lag dominated/delay dominated
Stochastic Modeling of Measurement Noise
Measurement noise stationary with spectral density Φ(ω )
Z ∞ Z ∞
2 2 2
σu = pGun (i ω )p Φ(ω )d ω , σ yf = pGf (i ω )p2 Φ(ω )d ω
−∞ −∞
ki + kp s + kds2
Gun (s) ( −
(s + Kki )(1 + sTf + (sTf )2 /2)
2 − 2k k 2
!
k k i d k π
σ u2 ( π σ y2f =
i p
+ + 2 d3 Φ0 , Φ0
K Tf Tf Tf

Noise gain kn = σ u /σ yf and SDU (standard deviation of u with


white measurement noise Φ0 = 1)
s
σu ki Tf k2
knw = ( + kp2 − 2ki kd + 2 d2
σ yf K Tf
v
2 − 2k k 2
u !
u ki kp i d k
π Φ0 = 1 [ SDU = t + +2 3
d
K Tf Tf
Outline

1. Introduction
2. Requirements
3. Tradeoffs
4. PI Control
5. PID Control
6. Relay Auto-tuners
7. Summary
Load Disturbance Attenuation and Robustness
◮ Performance (IAE= 1/ki blue) and robustness (Ms , Mt red)
◮ IE level curves are horizontal lines (P(s) = (s + 1)−4
1

0.9

0.8

0.7
1.8

0.6
1.6
ki

2
0.5

1.4
0.4
1.9
0.3 1.7
1.2 1.5
0.2
1.3

0.1

0
0 0.1 0.2 0.3 0.4 0.5
kp

Little difference IE and IAE for ki < 0.4 and robust systems Ms < 1.6
Approximately: ki gives performance and kp sets robustness
Load Disturbance Attenuation and Noise Injection
1
Process: P(s) = e−s τ = 0.09 lag dominated!
1 + 0.1s
 k  1
Controller: C = kp + i + kd s $
s 1 + sTf + (sTf )2 /2
MIGO design without filtering: kp = 2.78, Ti = 47.2, Td = 11.6

Filter time constants:


Tf = [0.01 0.02 0.05 0.1 0.2 0.5 1 2 5 10 20 50 100]

2
10
IE

1
10

0
10

0 1 2
10 10 10
kn
Outline

1. Introduction
2. Requirements
3. Tradeoffs
4. PI Control
5. PID Control
6. Relay Auto-tuners
7. Summary
Design Process
Models - Essentially monotone step responses
Ziegler-Nichols - Two parameters
The FOTD model - Three parameters K , L, T
◮ G(s) = K e−sL
1+sT
◮ Normalized time delay τ = L , 0 ≤ τ ≤ 1
L+T
◮ Lag (small τ ) and delay dominated dynamics τ close to one
More complex models
The test batch - essentially monotone dynamics
◮ Heritage of Eurotherm and Mike Sommerville
◮ 123 processes

0.8

0.6
y

0.4

0.2

−0.2
0 0.5 1 1.5 2 2.5 3 3.5 4
x

Design controllers and match to model parameters


Constrained Optimization
◮ Modeling & control design Convex-concave methods
◮ Criteria
Load disturbance
attenuation IE, IAE 0

Robustness Ms Mt

ℑ L(i ω )
Measurement noise SDU
Noise gain kn
−1
◮ Loop transfer function

ki 
Gl = PGf kp + + kd s
s −2
−2 −1 0

linear in parameters ℜ L(i ω )


◮ Many algorithms

github.com/JuliaControl/ControlSystems.jl/
PI Control: Minimize IAE, Ms , Mt ≤ 1.4
2 Kkp vs τ akp vs τ
10
1
10
1
10
0
0 10
10

−1 −1
10 10
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1

2 Ti /T vs τ Ti /L vs τ
10
1
10

0
10 0
10

−2 −1
10 10
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1

◮ The two parameter Ziegler-Nichols does not work (red


dashed right figures)!
◮ Tuning of PI controller can be done with a three parameter
FOTD model model
Some Tuning Rules
◮ Ziegler-Nichols step

0.9 0.27
kp = ki = Ti = L/0.3
K v L3
, ,
Kv L
◮ Ziegler-Nichols frequency

ku
kp = 0.45ku , ki = 0.54 , Ti = Tu /1.2
Tu
◮ Lambda Tuning - Tcl = T , 2T , 3T

T 1
kp = , ki = , Ti = T
K (Tcl + L) K (Tcl + L)
◮ Skogestad SIMC Like Lambda but Ti = min(T , 4(Tcl + L))
◮ Skogestad SIMC+

T + L/3
kp = , Ti = min(T + L/3, 4(Tcl + L))
K (Tcl + L)
◮ AMIG0 (Ms , Mt = 1.4)

0.15  LT T 13LT 2
kp = + 0.35 − Ti = 0.35L +
(L + T )2 KL T 2 + 12LT + 7L2
,
K
Tuning – Lag-Dominated Dynamics
Lagdominant
20
1.9
18 S S+
16

14

12
1.6
ki

10

8 S S+
A
6
S S+
4 21.8
1.7
1.5
1.4
2 1.3
1.2

0
λ
0 2 4 6 8 10
kp

◮ Lambda tuning has very low gains


◮ S and S+ give similar tuning
◮ Lambda tuning gives constant integral time Ti = kp /ki
Tuning – Balanced Dynamics
Balanced
0.4 3

0.35

0.3 2.5 1.9

0.25 2

1.8
λ
S
ki

S+
0.2 1.6

1.5 A 1.7
0.15
S
S+ λ
1.3
S
S+λ
0.1

0.05 1.1 1.4


1.2

0
0 0.2 0.4 0.6 0.8 1 1.2
kp

◮ Tuning methods S+, A and λ gives similar results


◮ All controllers have constant integral time Ti = kp /ki
Tuning Delay-Dominated Dynamics
Delay dominated
1

0.9 λ
0.8
λ
λ 2
0.7
1.9
0.6 1.8
1.7

S 1.6
ki

0.5
A S+
0.4 1.4

0.3
S S+
S 1.2 S+
0.2
1.5
0.1 1.3
ZN
0
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4
kp

◮ Lambda tuning too high integral gain


◮ Obvious why Skogestad modified his method
◮ All controllers have constant integral time Ti = kp /ki
Outline

1. Introduction
2. Requirements
3. Tradeoffs
4. PI Control
5. PID Control
6. Relay Auto-tuners
7. Summary
Difficulties with Derivative Action
◮ Shapes of stability region - don’t fall off the cliff

0.8

0.6
ki

0.4

0.2

0
0

0.5 3.5
3
2.5
1 2
1.5
1
0.5
kp 1.5 0
kd
◮ Filtering necessary

Temperature Control P(s) = e − s

11.54 48.25
CPI (s) = 2.94 + CPID (s) = 7.40 + + 0.46s
s s
IE = 0.086, IAE = 0.10 IE = 0.021, IAE = 0.031

System output, y (t)

0.2 1

0.1
0

ℑ L(i ω )
−1
0 1 2 3
Control signal, u(t)
−2
0.5
0
−0.5 −3
−3 −2 −1 0 1
−1
ℜ L(i ω )
−1.5
0 1 2 3
IE or IAE for P = (s + 1)−3
1

6.62
CIE = 3.31 + + 6.26s 0.5

s 0

IAE = 0.74
−0.5

3.20
Cκ = 3.61 + + 3.34s −1

s
= 0.57
−1.5
IAE
3.33
−2

CIAE = 3.81 + + 4.25s


s −2.5

IAE = 0.53 −3
−3 −2.5 −2 −1.5 −1 −0.5 0 0.5 1

0.2

0.15

0.1

0.05

−0.05

−0.1
0 2 4 6 8 10 12 14 16 18 20
PID Control: Minimize IAE, Ms , Mt ≤ 1.4
2
10 Kkp vs τ 2
10
aK = kp KL/T vs τ
1 1
10 10

0 0
10 10

−1 −1
10 10
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1

1
10
Ti /T vs τ 2
10
Ti /L vs τ
0 1
10 10

−1 0
10 10

−2 −1
10 10
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1

1
10
Td /T vs τ 1
10
Td /L vs τ
0 0
10 10

−1 −1
10 10

−2 −2
10 10
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1

◮ Tuning rules based on FOTD can be found for τ > 0.3


◮ More complex models for lag dominated dynamics
◮ Limiting cases 1+sT
K
e−sL and (1+sT
K
/2)2
e−sL
Modeling for PI & PID Control
AMIGO Tuning - complete testbatch

2
ki [PID]/ki [PI] vs τ
10

1
10

0
10
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

K K
circles: P(s) = e−sL , squares: P(s) = e−sL
1 + sT (1 + sT )2

◮ FOTD OK for τ > 0.4 better model required for smaller τ !


◮ Derivative action small improvement for τ > 0.8
Outline

1. Introduction
2. Requirements
3. Tradeoffs
4. PI Control
5. PID Control
6. Relay Auto-tuning
7. Summary
Relay Auto-tuning

0.5

0
y

−0.5

−1
0 5 10 15 20 25 30
t

Relay feedback creats oscillation at ω 180 !


Automation of ZN frequency response method modified ZN tuning rules
The First Industrial Test 1982
Temperature Control of Distillation Column
Commercial Autotuners
◮ One-button autotuning
◮ Three settings: fast, slow,
delay dominated
◮ Automatic generation of gain
schedules
◮ Adaptation of feedback gains
◮ Adaptation of feedforward
gain
◮ Many versions
Single loop controllers
DCS systems
◮ Robust
◮ Excellent industrial
experience
◮ Large numbers
Industrial Systems
Functions
◮ Automatic tuning AT
◮ Automatic generation of gain scheduling GC
◮ Adaptive feedback AFB and adaptive feedforward AFF
Sample of products
◮ NAF Controls SDM 20 - 1984 DCS AT, GS
◮ SattControl ECA 40 - 1986 SLC AT, GS
◮ Satt Control ECA 04 - 1988 SLC AT
◮ Alfa Laval Automation Alert 50 - 1988 DCS AT, GS
◮ Satt Control SattCon31 - 1988 PLC AT, GS
◮ Satt Control ECA 400 -1988 2LC AT, GS, AFB, AFF
◮ Fisher Control DPR 900 - 1988 SLC
◮ Satt Control SattLine - 1989 DCS AT, GS, AFB, AFF
◮ Emerson Delta V - 1999 DCS AT, GS, AFB, AF
◮ ABB 800xA - 2004 DCS AT, GS, AFB, AFF
Next Generation of Autotuners
Observations
◮ A sine-wave input permits estimation of only two
parameters
◮ PI controllers can be designed based on an FOTD model
◮ Little difference between PI and PID for processes with
delay dominated dynamics
◮ Improvement by derivative action a factor 2 for τ = 0.45
◮ PID controllers require better modeling if τ < 0.4
◮ Separate real delays from higher order dynamics
◮ Suitable model classes
Requirement on an auto-tuner
◮ Good excitation - modify relay and experiments
◮ Short experiment time - do not wait for steady state
◮ Other types of inputs - asymmetric relay additional inputs
◮ Trade-off buttons - performance & robustness related
Models
Two parameter models
b
P(s) = , P(s) = K e−sL
s+a
Three parameter models
b b K
P(s) = P(s) = e−sL , P(s) = e−sL
s2 1 + sT
,
+ a1 s + a2 s+a
K
P(s) = e−sL
(1 + sT )2
Four parameter models
b1 s + b 2 b
P(s) = P(s) = e−sL
s2 s2
,
+ a1 s + a2 + a 1 s + a2
Five parameter model
b1 s + b 2
P(s) = e−sL
s2 + a 1 s + a2
Typical Experiments
10 2
5 1
u

y
0 0
−5 −1
10 11 12 13 14 15 16
10 2
5 1
u

y
0 0
−5 −1
0 10 20 30 40 50
10 2
5 1
u

y
0 0
−5 −1
10 12 14 16 18 20 22
Time [s]

Figure from Josefin Berner


Better Excitation with Asymmetric Relay

0.08

0.06
|U|2
R

0.04
|U|2

0.02

0.00
0 1 2 3 4 5 6 7 8 9 10
ω [rad/s]

◮ Symmetric relay blue


◮ Asymmetric relay red
Figure from Josefin Berner
Chirp Signal – Broadband Excitation

u(t) = (a + b t) sin (c + d t)t


Frequency varies between a and c + d tmax amplitude between
a + b tmax
4

2
u(t)

−2

−4
0 1 2 3 4 5 6 7 8 9 10

1
u(t)dt

0.8

0.6

0.4
Rt

0.2

0
0 1 2 3 4 5 6 7 8 9 10
t

Notice both high and low frequency excitation


Asymmetric Relay and Chirp
◮ Asymmetrical relay experiment combined chirp signal
experiment
◮ Double experiment time. Constant amplitude,
L = 0.01, w = 15 ∗ (1 + 0.5 ∗ t), tmax = 2.7,
0.15 ≤ ω L ≤ 0.35

Relay only Relay and Chirp


P(s)=b exp(−sL)/(s2+a1*s+a2) b exp(−sL)/(s2+a1 s+a2)

0 0
10 10

−1 −1
10 10

−2 −2
10 10
−2 −1 0 1 2 −2 −1 0 1 2
10 10 10 10 10 10 10 10 10 10

0 0

−90 −90

−180 −180

−270 −270
−2 −1 0 1 2 −2 −1 0 1 2
10 10 10 10 10 10 10 10 10 10
Outline

1. Introduction
2. Requirements
3. Tradeoffs
4. PI Control
5. PID Control
6. Relay Auto-tuners
7. Summary
Summary

Insight into PID control


◮ PI control can be designed based on FOTD model
◮ Importance of lag and delay dominant dynamics and
normalized time delay τ
◮ PI is sufficient for delay dominated processes τ > 0.8
◮ Derivative action helps for τ ≤ 0.8
◮ Derivative action gives significant improvement for τ < 0.4
but improved models are required
Next generation of relay auto-tuners
◮ Use system identification and model testing
◮ Use algorithms instead of simple tuning rules
◮ Admits tuning knob

You might also like