Professional Documents
Culture Documents
PID control.
Practical issues
Smith Predictor (NOT PID…)
PID Controller forms
Ziegler-Nichols tuning
Windup
Digital implementation
Smith Predictor
Act ual plant : Gp
Model: G
Delay-free model: G0
" Smit h predict or" : G0 ¡ G (predict s y when G has delay)
Convent ional feedback cont roller: K
K 0 : designed for plant wit hout delay
Example
G = k ¿s+
e¡ µ s
1
Delay-free model: G0 = k ¿s+ 1
1
G0 ¡ G = ¿s+ 1 (1 ¡ e )
k ¡ µs
T hen
K = 1+ K kK 0( 1¡ e¡ µ s )
0 ¿s+ 1
SP looks good in theory. BUT: We have found that well-tuned PID (with τD = θ/3) is more
robust and almost always better than Smith predictor controller ) FORGET SP!
1
10/16/2017
PID controller
“Ideal” form:
• e(t) = ys – ym(t)
1. To get realizable controller and less sensitivity to measurement noise: Add filter on
the measurement:
3. To avoid integral “windup” when input saturates (at max or min), use “anti” windup.
Simplest: Stop integration while input saturates
2
10/16/2017
ys u
1 y
®¿D s+ 1
Typical: ®=0.1
u
ys
3
10/16/2017
Note: The reverse transformation (from ideal to series) is not always possible because
the ideal controller may have complex zeros.
4
10/16/2017
*Chriss Grimholt and Sigurd Skogestad. "Optimal PI-Control and Verification of the SIMC Tuning Rule". Proceedings IFAC conference on Advances in PID control (PID'12),
Brescia, Italy, 28-30 March 2012.
5
10/16/2017
TL-modification is smoother
(smaller Kc and larger ¿I).
6
10/16/2017
TIGHT CONTROL
Ziegler-Nichols is usually a
bit aggressive
TIGHT CONTROL
7
10/16/2017
Δy∞
1. OBTAIN DATA IN RED (first overshoot
and undershoot), and then:
Δyu=0.54
b=dyinf/dys
A = 1.152*Mo^2 - 1.607*Mo + 1.0
r = 2*A*abs(b/(1-b))
k = (1/Kc0) * abs(b/(1-b))
theta = tp*[0.309 + 0.209*exp(-0.61*r)]
tau = theta*r
tp=4.4
Example 2: Get k=0.99, theta =1.68, tau=3.03
Ref: Shamssuzzoha and Skogestad (JPC, 2010)
+ modification by C. Grimholt (Project, NTNU, 2010; see also PID-book 2012)
8
10/16/2017
9
10/16/2017
Integral windup
• Problem: Integrator “winds up” u(t) when actual input has
saturated d
Actual input is m.
m=u if no saturation
0.2
-0.2
-0.4
-0.6
-0.8
y(t)
0.25
-1
-1.2
0.2
-1.4
-1.6
0 50 100 150
0.15
0.1
0.05
0
-0.05
-0.1
m(t) 0. t=10: Disturbance d starts
-0.15 1. t≈12: Reach saturation in m (actual input)
-0.2
-0.25
u(t) 2. oopss! Integration makes u (desired input) “wind up” …
0 50 100 150 3. …so when disturbance ends (at t=30)
y(t) has to overshoot on the negative side to bring u(t) back.
Anti-windup
• Approaches to avoid windup
1. Stop integration (e.g. set ¿I=9999) when
saturation in input occurs (requires logic)
2. Force integrator to follow true input using high-
gain feedback correction (see Example)
3. Use discrete controller in velocity form
10
10/16/2017
Example anti-windup
d
Step2
Step1
u
m
Kc g y
Step Sum1
Sum Gain 1 Saturation To Workspace1
1/taui LTI System
s
100
Sum4 Integrator
Gain1
Anti Gain2
windup
Scope
Tid
Clock u
To Workspace
To Workspace3
Approach 2:
g= 0.2/(10*s+1) High-gain feedback correction
which makes u follow m.
tauc=1: Kc=12.5, taui=4 Gain should be 1 or larger.
(Without anti-windup:
Input: max=1, min=-1 Set this gain to zero)
Disturbance: Pulse from 0 to 2 and back to 0 at t=10 File: tunepidantiwindup.mdl
0.1
y
0
-0.4
u/10
-0.5
0 5 10 15 20 25 30 35 40 45 50
11
10/16/2017
0.1
0
y
-0.1
-0.2
-0.3
u/10
-0.4
-0.5
0 5 10 15 20 25 30 35 40 45 50
Bumpless transfer
• We want a “soft” transition when the
controller is switched between “manual” (1)
and “auto” (2)
– or back from auto to manual
– or when controller is retuned
• Simple solution: reset u0 as you switch, so that
u1(t) = u2(t).
12
10/16/2017
Effect of sampling
• All real controllers are digital, based on sampling ¢t
• ¢t = sampling time (typical 1 sec. in process control, but could be MUCH faster)
• Max sampling time (Shannon): ¢t < ¿c/2, but preferably much smaller (¿c = closed-loop response time)
• With continuous methods: Approximate sampling time as effective delay µ ¼ ¢t /2
• Strange things can happen if ¢t is too large:
¢t =0.02
t-Δt t
k-1 k
(Backward Euler)
This is Sigurd’s recommendation
= “Alt. 3” (see next page)
13
10/16/2017
Velocity form
Alt. 2
Alt. 1
ek-2 = e(t-2Δt) ?
? This is a major
Alt. 3
disadvantage
(Sigurd’s with bias as extra state, better than Alt. 1 and Alt. 2) of Alt. 2
14
10/16/2017
15