Slides Robin Autotuning
Slides Robin Autotuning
PID AUTO-TUNING
Robin De KEYSER, Ghent University / Belgium, EeSA-department of Electrical energy, Systems & Automation 1
Part 1:
AUTO-TUNERS
Robin De KEYSER, Ghent University / Belgium, EeSA-department of Electrical energy, Systems & Automation 2
RELAY Experiment
Σ
e d u y Σ
e d u y
P(s) P(s)
τd
Relay Process Relay Delay Process
-1 -1
u
d=1
Robin De KEYSER, Ghent University / Belgium, EeSA-department of Electrical energy, Systems & Automation 3
TUNING Values
4d
period oscillation = Tc ; amplitude oscillation = a ⇒ Kc =
πa
(Tc : critical period; K c : critical gain)
AH : UCM (relay) KC : PMM (relay) KR : PMM (relay + delay)
Mode
Ultimate Cycle Method Phase Margin Method Phase Margin Method
P control K p = 0.5 K c adapt PID as for AH adapt PID as for AH
K p = 0.45 K c
PI control adapt PID as for AH adapt PID as for AH
Ti = 0.83Tc
K p = K c cos PM
K p = 0.6K c K p = 0.8K *c
PID 1 + sin PM
= =
Ti 0.5T T T = T 0.64T*
π *cos PM
c i c i c
control
=
Td 0.25T Td 0.25Ti
i Td = 0.25Ti
Notice: Ti=4Td ⇒ PID has 2 identical real zeros
Robin De KEYSER, Ghent University / Belgium, EeSA-department of Electrical energy, Systems & Automation 4
AH: tuning principle (1/2)
2π output amplitude a πa 1
ωc = 2π f c = G ( jωc ) = Φ = −180° G ( jωc ) = M = = = =
Tc input amplitude 4d 4d Kc
π
Critical point
Im G(jω) ω = ωc 1
NYQUIST (polar plot) Kc
x
-1 G ( jω ) Re G(jω) -1
G ( jωc ) = Me jΦ
G ( jω )
1 − j180°
= e
Kc
ω 1
= −
Kc
G(s) = (unknown !) process transfer function
Robin De KEYSER, Ghent University / Belgium, EeSA-department of Electrical energy, Systems & Automation 5
AH: tuning principle (2/2)
1 1
PID: R( s )= K p 1 + + Td s ⇒ R( jω c )= K p 1 + + Td jω c
Ti s Ti jω c
2π 1 π 1
R( jω c ) = K p 1 + j Td − = 0.6 K c 1 + j − = K c (0.6 + 0.28 j )
Tc T 2π 4 π
i
Tc
−1
LOOP frequency response: R( s )G ( s ) ⇒ R( jω c )G ( jω c ) =
K c (0.6 + 0.28 j ) *
Kc
NYQUIST
-0,6 ROBUSTNESS:
-1
ωc -0,28 0.42 + 0.282 =
0.5
Robin De KEYSER, Ghent University / Belgium, EeSA-department of Electrical energy, Systems & Automation 6
KC: tuning principle (1/2)
1
Given: G ( jωc ) = − (ref. AH)
Kc
Task: find the controller parameters so that the Phase Margin = PM
1 1
R( jωc ) = K p 1 + + Td jωc = K p 1 + j Td ωc −
Ti jωc T ω
i c
PM larger: x -a
a
• more robustness -1
( tan PM ) + 1 tan PM
2 2
tan PM tan PM tan PM 1
Td ω=
c ± + 0.25= ± = ±
2 2 2 2 2 2 cos PM
sin PM + 1 sin PM + 1
Td ωc =
(only + gives a positive result for Td ωc ) ⇒ Td Tc
2 cos PM 4π cos PM
Robin De KEYSER, Ghent University / Belgium, EeSA-department of Electrical energy, Systems & Automation 8
KR: tuning principle (1/2)
1
25
Kp=1!!!
1+ + Td s for Ti =
4Td 20
Ti s 15
1 10
(2 real zeros at s = − ) 5
2Td 1.25 (1.94 dB)
0
0.5 1.0
90
Tc* 60
take ωTd ≡ 1 or Td = 30 37°
2π
0
*
Kc
take K p = and Ti 4Td -30
1.25 -60
ωTd
-90
-2 -1 0 1
10 10 Frequency (rad/sec) 10 10
Robin De KEYSER, Ghent University / Belgium, EeSA-department of Electrical energy, Systems & Automation 9
KR: tuning principle (2/2)
*
K
R( jωc* ) K=
p *1.25e
j 37°
=c
*1.25e j 37° K c*e j 37°
1.25
1 j ( −180°+ϕ )
LOOP frequency response: R( s )G ( s ) ⇒ R( jω c )G ( jω c ) = *
Kc e * * e * * j 37°
Kc
τd
PM − 37 *
⇒ Phase Margin= 37° + ϕ= 37° + 360° *= PM because τ d= Tc
Tc 360
ω = ω c* ϕ
Typical PM=40° … 70°
τd
PM larger: = ω=*
τ
c d 2π
Tc*
• more robustness x
-1
• less overshoot 1 1 j ( −180°+ϕ )
G ( jω *
c ) = e
• larger settling time K c* K c*
Robin De KEYSER, Ghent University / Belgium, EeSA-department of Electrical energy, Systems & Automation 10
Part 2:
APPLICATIONS
• Double Integrator (project)
• Time Delay (example)
Robin De KEYSER, Ghent University / Belgium, EeSA-department of Electrical energy, Systems & Automation 11
Double Integrator / Dead-time
Ro=0.45 Ro=0.45
OS<40% OS<40%
Ts minimum (100 shown) Ts minimum (50 shown)
FR-PI FR-PID
Robin De KEYSER, Ghent University / Belgium, EeSA-department of Electrical energy, Systems & Automation 13
Time Delay: KR and AH autotuners
Ro=0.45 Ro=0.45
OS<40% OS<40%
Ts: 50 shown Ts: 50 shown
KR 10° AH
Robin De KEYSER, Ghent University / Belgium, EeSA-department of Electrical energy, Systems & Automation 14
Time Delay: PID parameters
Kp Ti Td K z1 z2
FR-PI 1.00 16.7 0 1.00 −0.06 −
FR-PID 1.82 16.6 4.2 7.57 −0.12 −0.12
AH 1.62 10.5 2.6 4.26 −0.19 −0.19
KC 1.84 17.0 4.2 7.80 −0.12 −0.12
KR 1.85 15.4 3.8 7.10 −0.13 −0.13
AH
PI
1.2
KR
0.8 PID KC
0.6
0.4
0.2
0
0 5 10 15 20 25 30 35 40 45 50
Robin De KEYSER, Ghent University / Belgium, EeSA-department of Electrical energy, Systems & Automation 16
Time Delay: Load Disturbance
0.9
0.8
0.7
0.6
PI
0.5
AH
0.4
0.3
PID
KC
0.2
KR
0.1
-0.1
0 5 10 15 20 25 30 35 40 45 50
Robin De KEYSER, Ghent University / Belgium, EeSA-department of Electrical energy, Systems & Automation 17
Robot Controlled Motor
φ
Dynamic Model for:
V=19.6 m/s; c=0.98 m; L=h=0.49 m
Design 5 PID-controllers:
- a controller tuned by yourself
- a controller designed with FRtool
- a controller using the AH autotuner
- a controller using the KC autotuner (PM=47°)
- a controller using the KR autotuner (PM=47°) L
Compare the results and discuss.
Check setpoint & disturbance response
32
??? s(s+4)(s+16)
1 (very fast)
Robin De KEYSER, Ghent University / Belgium, EeSA-department of Electrical energy, Systems & Automation 18
CONCLUSIONS
Auto-Tuning!
The use of an autotuner
turns the controller-design-problem into
an automatic design based on a simple experiment.
Robin De KEYSER, Ghent University / Belgium, EeSA-department of Electrical energy, Systems & Automation 19