Académique Documents
Professionnel Documents
Culture Documents
Behzad Samadi
Department of Electrical Engineering
Amirkabir University of Technology
Winter 2009
Tehran, Iran
r : reference signal
y : process (controlled) variable
u: manipulated (control) variable
e: control error
d: load disturbance signal
n: measurement noise signal
F : feedforward filter
C : controller
P: plant
[Visioli, 2006]
Behzad Samadi (Amirkabir University) Industrial Control 2 / 95
On-Off Control
One of the simplest control laws:
umax if e > 0
u=
umin if e < 0
1 Proportional action
2 Integral action
3 Derivative action
[Visioli, 2006]
[Visioli, 2006]
Kp : proportional gain
[Visioli, 2006]
Kp : proportional gain
Controller transfer function:
C (s) = Kp
[Visioli, 2006]
Kp : proportional gain
Controller transfer function:
C (s) = Kp
[Visioli, 2006]
Kp : proportional gain
Controller transfer function:
C (s) = Kp
[Visioli, 2006]
u(t) = Kp e + ub
100%
PB =
Kp
[Visioli, 2006]
Ki : integral gain
[Visioli, 2006]
Ki : integral gain
Controller transfer function:
Ki
C (s) =
s
[Visioli, 2006]
Ki : integral gain
Controller transfer function:
Ki
C (s) =
s
Advantage: zero steady state error
[Visioli, 2006]
Ki : integral gain
Controller transfer function:
Ki
C (s) =
s
Advantage: zero steady state error
Disadvantage: integrator windup in the presence of saturation
[Visioli, 2006]
[Visioli, 2006]
[Visioli, 2006]
[Visioli, 2006]
[Visioli, 2006]
C (s) = Kd s
[Visioli, 2006]
C (s) = Kd s
[Visioli, 2006]
C (s) = Kd s
[Visioli, 2006]
de(t)
e(t + Td ) ≈ e(t) + Td
dt
[Visioli, 2006]
de(t)
e(t + Td ) ≈ e(t) + Td
dt
A control law proportional to e(t + Td )
de(t)
u(t) = Kp e(t) + Td
dt
[Visioli, 2006]
de(t)
e(t + Td ) ≈ e(t) + Td
dt
A control law proportional to e(t + Td )
de(t)
u(t) = Kp e(t) + Td
dt
Transfer function:
1
C (s) = Kp 1 + + Td s
Ti s
Time windows:
Proportional action responds to current error.
Integrator action responds to accumulated past error.
Derivative action anticipated future error.
Peter Woolf umich.edu
Transfer function:
Ki
C (s) = Kp + + Kd s
s
Frequency band:
Proportional action: all-band
Integrator action: low pass
Derivative action: high pass
[Li et al., 2006]
Transfer function:
Ki
C (s) = Kp + + Kd s
s
Implementation methods:
Pneumatic
Hydraulic
Electronic
Digital
Parallel form:
Ki
Ci (s) = Kp + + Kd s
s
[Visioli, 2006]
A PID controller has two zeros and one pole at the origin.
Ti > 4Td : two real zeros
Ti = 4Td : two coincident zeros
Ti < 4Td : two complex conjugate zeros
[Visioli, 2006]
Noise:
n(t) = A sin(ωt)
[Visioli, 2006]
Noise:
n(t) = A sin(ωt)
Derivative action:
u(t) = Aω cos(ωt)
[Visioli, 2006]
Noise:
n(t) = A sin(ωt)
Derivative action:
u(t) = Aω cos(ωt)
u(t) is large for high frequencies.
[Visioli, 2006]
Noise:
n(t) = A sin(ωt)
Derivative action:
u(t) = Aω cos(ωt)
u(t) is large for high frequencies.
In practice, a (very) noisy control signal might lead to a damage of
the actuator.
[Visioli, 2006]
[Visioli,Samadi
Behzad 2006] (Amirkabir University) Industrial Control 24 / 95
Modified Derivative Action
Modified ideal form:
!
1 Td s
Ci1a (s) = Kp 1+ + Td
Ti s N s +1
Gerry and Shinskey, 2005:
1 Td s
Ci1b (s) = Kp 1 + +
2
Ti s
Td Td
1+ N s + 0.5 N s
[Visioli,Samadi
Behzad 2006] (Amirkabir University) Industrial Control 24 / 95
Modified Derivative Action
Modified ideal form:
!
1 Td s
Ci1a (s) = Kp 1+ + Td
Ti s N s +1
Gerry and Shinskey, 2005:
1 Td s
Ci1b (s) = Kp 1 + +
2
Ti s
Td Td
1+ N s + 0.5 N s
[Visioli,Samadi
Behzad 2006] (Amirkabir University) Industrial Control 24 / 95
Modified Derivative Action
Modified ideal form:
!
1 Td s
Ci1a (s) = Kp 1+ + Td
Ti s N s +1
Gerry and Shinskey, 2005:
1 Td s
Ci1b (s) = Kp 1 + +
2
Ti s
Td Td
1+ N s + 0.5 N s
[Visioli, 2006]
Behzad Samadi (Amirkabir University) Industrial Control 25 / 95
Modified Derivative Action
Alternative modified ideal form:
1 1
Ci2a (s) = Kp 1 + + Td s
Ti s Tf s + 1
Åström and Hägglund, 2004:
1 1
Ci2b (s) = Kp 1 + + Td s
Ti s (Tf s + 1)2
[Visioli, 2006]
Behzad Samadi (Amirkabir University) Industrial Control 25 / 95
Modified Derivative Action
Alternative modified ideal form:
1 1
Ci2a (s) = Kp 1 + + Td s
Ti s Tf s + 1
Åström and Hägglund, 2004:
1 1
Ci2b (s) = Kp 1 + + Td s
Ti s (Tf s + 1)2
Derivative kick: A spike in the control signal due to an abrupt
(stepwise) change of the set-point signal.
[Visioli, 2006]
Behzad Samadi (Amirkabir University) Industrial Control 25 / 95
Modified Derivative Action
Alternative modified ideal form:
1 1
Ci2a (s) = Kp 1 + + Td s
Ti s Tf s + 1
Åström and Hägglund, 2004:
1 1
Ci2b (s) = Kp 1 + + Td s
Ti s (Tf s + 1)2
Derivative kick: A spike in the control signal due to an abrupt
(stepwise) change of the set-point signal.
If the set-point is constant, the derivative action can be applied only
to the process variable:
dy (t)
u(t) = −Kd
dt
[Visioli, 2006]
Behzad Samadi (Amirkabir University) Industrial Control 25 / 95
Derivative Action
80% of the employed PID controllers have the derivative part
switched-off (Ang et al., 2005).
[Visioli, 2006]
Behzad Samadi (Amirkabir University) Industrial Control 26 / 95
Derivative Action
80% of the employed PID controllers have the derivative part
switched-off (Ang et al., 2005).
Derivative action is the most difficult to tune, why?
[Visioli, 2006]
Behzad Samadi (Amirkabir University) Industrial Control 26 / 95
Derivative Action
80% of the employed PID controllers have the derivative part
switched-off (Ang et al., 2005).
Derivative action is the most difficult to tune, why?
Consider a first-order-plus-dead-time (FOPDT) plant:
K
P(s) = e −Ls
Ts + 1
and a PD controller:
C (s) = Kp (1 + Td s)
[Visioli, 2006]
Behzad Samadi (Amirkabir University) Industrial Control 26 / 95
Derivative Action
80% of the employed PID controllers have the derivative part
switched-off (Ang et al., 2005).
Derivative action is the most difficult to tune, why?
Consider a first-order-plus-dead-time (FOPDT) plant:
K
P(s) = e −Ls
Ts + 1
and a PD controller:
C (s) = Kp (1 + Td s)
Open loop frequency response:
s
1 + Td2 ω 2
|C (jω)P(jω)| = KKp
1 + T 2ω2
[Visioli, 2006]
Behzad Samadi (Amirkabir University) Industrial Control 26 / 95
Derivative Action
Open loop frequency response:
s
1 + Td2 ω 2
Td
KKp ≥ KKp min 1,
1 + T 2ω2 T
[Visioli, 2006]
Behzad Samadi (Amirkabir University) Industrial Control 27 / 95
Derivative Action
Open loop frequency response:
s
1 + Td2 ω 2
Td
KKp ≥ KKp min 1,
1 + T 2ω2 T
Td ≥ T ⇒ min 1, TTd = 1
[Visioli, 2006]
Behzad Samadi (Amirkabir University) Industrial Control 27 / 95
Derivative Action
Open loop frequency response:
s
1 + Td2 ω 2
Td
KKp ≥ KKp min 1,
1 + T 2ω2 T
Td ≥ T ⇒ min 1, TTd = 1
If Td ≥ T and KKp > 1, then
|C (jω)P(jω)| ≥ 1
[Visioli, 2006]
Behzad Samadi (Amirkabir University) Industrial Control 27 / 95
Derivative Action
Open loop frequency response:
s
1 + Td2 ω 2
Td
KKp ≥ KKp min 1,
1 + T 2ω2 T
Td ≥ T ⇒ min 1, TTd = 1
If Td ≥ T and KKp > 1, then
|C (jω)P(jω)| ≥ 1
Td ≤ T ⇒ min 1, TTd = Td
T
[Visioli, 2006]
Behzad Samadi (Amirkabir University) Industrial Control 27 / 95
Derivative Action
Open loop frequency response:
s
1 + Td2 ω 2
Td
KKp ≥ KKp min 1,
1 + T 2ω2 T
Td ≥ T ⇒ min 1, TTd = 1
If Td ≥ T and KKp > 1, then
|C (jω)P(jω)| ≥ 1
Td ≤ T ⇒ min 1, TTd = Td
T
[Visioli, 2006]
Behzad Samadi (Amirkabir University) Industrial Control 27 / 95
Frequency Response
Burns, 2001
Solid:
process output,
Dashed:
process input,
Dotted:
integral term
[Visioli, 2006]
[Visioli, 2006]
[Visioli, 2006]
[Visioli, 2006]
Automatic reset:
[Visioli, 2006]
Behzad Samadi (Amirkabir University) Industrial Control 32 / 95
Anti-windup for Automatic Reset Configuration
Automatic reset:
[Visioli, 2006]
Behzad Samadi (Amirkabir University) Industrial Control 32 / 95
Anti-windup for Automatic Reset Configuration
Automatic reset:
[Visioli, 2006]
Behzad Samadi (Amirkabir University) Industrial Control 32 / 95
Back-calculation
Integrator input:
Kp 1 0
ei = e + (u − u)
Ti Tt
Integrator input:
Kp 1 0
e + (u − u)
ei =
Ti Tt
Tuning rule for Tt (Åström and Hägglund 1995):
p
Tt = Td Ti
Integrator input:
Kp 1 0
e + (u − u)
ei =
Ti Tt
Tuning rule for Tt (Åström and Hägglund 1995):
p
Tt = Td Ti
Integrator input:
Kp 1 0
e + (u − u)
ei =
Ti Tt
Tuning rule for Tt (Åström and Hägglund 1995):
p
Tt = Td Ti
Not useful for a PI controller
[Visioli,Samadi
Behzad 2006] (Amirkabir University) Industrial Control 33 / 95
Back-calculation
Integrator input:
Kp 1 0
ei = e + (u − u)
Ti Tt
[Visioli, 2006]
Integrator input:
Kp 1 0
ei = e + (u − u)
Ti Tt
Bohn and Atherton, 1995 suggest Tt = Ti .
[Visioli, 2006]
Integrator input:
Kp 1 0
ei = e + (u − u)
Ti Tt
Bohn and Atherton, 1995 suggest Tt = Ti .
Conditioning technique (Hanus et al., 1987;Walgama et al., 1991):
0
This is a tracking rule (u tracks u ). In this framework:
Tt = Kp
[Visioli, 2006]
[Yu, 2007]
[Yu, 2007]
[Yu, 2007]
[Yu, 2007]
[Yu, 2007]
[Yu, 2007]
[Yu, 2007]
[Yu, 2007]
[Yu, 2007]
[Yu, 2007]
[Yu, 2007]
[Yu, 2007]
[Yu, 2007]
[Yu, 2007]
[Yu, 2007]
[Yu, 2007]
[Yu, 2007]
[Woolf, 2007]
Behzad Samadi (Amirkabir University) Industrial Control 43 / 95
PID Controller Design
Ziegler-Nichols closed-loop tuning method:
[Love, 2007]
Behzad Samadi (Amirkabir University) Industrial Control 44 / 95
PID Controller Design
1
C (s) = Kp (1 + + Td s)
Ti s
Kp Ti Td
P Controller Ku /2 - -
PI Controller Ku /2.2 Pu /1.2 -
PID Controller Ku /1.7 Pu /2 Pu /8
[Woolf, 2007]
[Woolf, 2007]
[Woolf, 2007]
[Woolf, 2007]
[Woolf, 2007]
[Woolf, 2007]
[Woolf, 2007]
∆Cp
N= T : reaction rate
[Woolf, 2007]
1
C (s) = Kp (1 + + Td s)
Ti s
Kp Ti Td
P Controller K - -
PI Controller 0.9K L/0.3 -
PID Controller 1.2K 2L 0.5L
P
K=
NL
[Woolf, 2007]
[Woolf, 2007]
[Woolf, 2007]
[Woolf, 2007]
[Woolf, 2007]
[Woolf, 2007]
[Woolf, 2007]
[Woolf, 2007]
Summary:
Ziegler-Nichols closed-loop tuning method: Gain margin of 2
Ziegler-Nichols open-loop tuning method: Decay ratio of 0.25
Ke −Ds
G (s) =
τs + 1
[Yu, 2007]
[Chau, 2002]
Behzad Samadi (Amirkabir University) Industrial Control 53 / 95
PID Controller Design
[Chau, 2002]
Ke −td s
G (s) =
τs + 1
td
Fractional dead time: Tf = td +τ
Using Tf , compute µCM and τCM :
Tf 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8
µCM 1.1 1.1 1.8 1.1 1.0 0.8 0.59 0.42 0.32
τCM 0.23 0.23 0.23 0.72 0.72 0.70 0.67 0.60 0.53
Compute the controller gains:
µCM
Kp = , Ti = τCM (td + τ )
K
Minimizing IAE or ISE [Chau, 2002]
[Chau, 2002]
[Chau, 2002]
Direct Synthesis:
We have:
C Gc Gp
=
R 1 + Gc Gp
Therefore:
1 C /R
Gc =
Gp 1 − C /R
[Chau, 2002]
Direct Synthesis:
C 1 1 1
= ⇒ Gc =
R τc s + 1 Gp τc s
Direct Synthesis:
C 1 1 1
= ⇒ Gc =
R τc s + 1 Gp τc s
Example:
Kp τp 1
Gp = ⇒ Gc = 1+
τp s + 1 Kp τc τp s
[Chau, 2002]
e −θs e −θs
C 1
= ⇒ Gc =
R τc s + 1 Gp (τc s + 1) − e −θs
e −θs e −θs
C 1
= ⇒ Gc =
R τc s + 1 Gp (τc s + 1) − e −θs
e −θs
1
Gc ≈
Gp (τc + θ)s
e −θs e −θs
C 1
= ⇒ Gc =
R τc s + 1 Gp (τc s + 1) − e −θs
e −θs
1
Gc ≈
Gp (τc + θ)s
e −θs e −θs
C 1
= ⇒ Gc =
R τc s + 1 Gp (τc s + 1) − e −θs
e −θs
1
Gc ≈
Gp (τc + θ)s
Example:
Kp e −td s
τp 1
Gp = ⇒ Gc = 1+
τp s + 1 Kp (τc + θ) τp s
for θ = td
[Chau, 2002]
Behzad Samadi (Amirkabir University) Industrial Control 61 / 95
PID Controller Design
Direct Synthesis:
Second order underdamped desired response:
C 1 1 1
= 2 2 ⇒ Gc =
R τ s + 2ζτ s + 1 Gp τ 2 s 2 + 2ζτ s
Example:
Kp (τ1 s + 1)(τ2 s + 1)
Gp = ⇒ Gc =
(τ1 s + 1)(τ2 s + 1) Kp τ s(τ s + 2ζ)
Example:
Kp (τ1 s + 1)(τ2 s + 1)
Gp = ⇒ Gc =
(τ1 s + 1)(τ2 s + 1) Kp τ s(τ s + 2ζ)
Gc = G̃p−1
Gc = G̃p−1
Closed loop:
P = Gc? (R − C + C̃ )
= Gc? (R − C + G̃p P)
P = Gc? (R − C + C̃ )
= Gc? (R − C + G̃p P)
Therefore:
Gc?
P= (R−C )
1 − Gc? G̃p
P = Gc (R − C )
P = Gc? (R − C + C̃ ) Therefore:
= Gc? (R − C + G̃p P) Gc?
Gc = 1−Gc? G̃p
Therefore:
Gc?
P= (R−C )
1 − Gc? G̃p
[Chau, Samadi
Behzad 2002] (Amirkabir University) Industrial Control 64 / 95
PID Controller Design
Internal Model Control:
Closed loop transfer function:
" # " #
(1 − Gc? G̃p )GL Gp Gc?
C= L+ R
1 + Gc? (Gp − G̃p ) 1 + Gc? (Gp − G̃p )
[Chau, 2002]
Behzad Samadi (Amirkabir University) Industrial Control 65 / 95
PID Controller Design
Internal Model Control:
Closed loop transfer function:
" # " #
(1 − Gc? G̃p )GL Gp Gc?
C= L+ R
1 + Gc? (Gp − G̃p ) 1 + Gc? (Gp − G̃p )
[Chau, 2002]
Behzad Samadi (Amirkabir University) Industrial Control 65 / 95
PID Controller Design
Internal Model Control:
Closed loop transfer function:
" # " #
(1 − Gc? G̃p )GL Gp Gc?
C= L+ R
1 + Gc? (Gp − G̃p ) 1 + Gc? (Gp − G̃p )
http://mathworld.wolfram.com/PadeApproximant.html
http://mathworld.wolfram.com/PadeApproximant.html
http://mathworld.wolfram.com/PadeApproximant.html
2
s+1
http://mathworld.wolfram.com/PadeApproximant.html
2
s+1
td2 2 td
s −2 s+1
Gd2/2 (s) = 12
t2
d s 2 + td s+1
12 2
http://mathworld.wolfram.com/PadeApproximant.html
Kp e −td s
Example: G̃p = τp s+1
Kp t
d
G̃p ≈ td − s +1
(τp s + 1)( 2 s + 1) 2
Kp e −td s
Example: G̃p = τp s+1
Kp t
d
G̃p ≈ td − s +1
(τp s + 1)( 2 s + 1) 2
Kp
G̃p− =
(τp s + 1)( t2d s + 1)
td
G̃p+ = − s +1
2
[Chau, 2002]
Example:
Gc? 1
Gc = = Kp (1 + + Td s)
1 − Gc? G̃p Ti s
Example:
Gc? 1
Gc = = Kp (1 + + Td s)
1 − Gc? G̃p Ti s
where: p τ
1 2 td + 1 td τp
Kc = τc ; Ti = τp + ; Td = τp
Kp 2 td + 1 2 2 td + 1
[Chau, 2002]
[Chau, 2002]
Behzad Samadi (Amirkabir University) Industrial Control 69 / 95
PID Controller Design
e −θs
g (s) = k
(τ1 s + 1)(τ2 s + 1)
[Skogestad, 2001]
(τ1 s + 1)(τ2 s + 1) 1
c(s) =
k (τc + θ)s
(τ1 s + 1)(τ2 s + 1) 1
c(s) =
k (τc + θ)s
1
c(s) = Kc (1 + )(τD s + 1)
τI s
(τ1 s + 1)(τ2 s + 1) 1
c(s) =
k (τc + θ)s
1
c(s) = Kc (1 + )(τD s + 1)
τI s
Tuning Rule
1 τ1
Kc = , τI = τ1 . τD = τ2
k τc + θ
[Skogestad, 2001]
[Skogestad, 2001]
Behzad Samadi (Amirkabir University) Industrial Control 73 / 95
PID Controller Design
Skogestad Internal Model Control (SIMC):
Tuning Rule
1 τ1
Kc = , τI = τ1 , τD = τ2
k τc + θ
[Skogestad, 2001]
Behzad Samadi (Amirkabir University) Industrial Control 73 / 95
PID Controller Design
Skogestad Internal Model Control (SIMC):
Tuning Rule
1 τ1
Kc = , τI = τ1 , τD = τ2
k τc + θ
[Skogestad, 2001]
[Skogestad, 2001]
4
τI ≥ 0
k Kc
[Skogestad, 2001]
|g (jω)|
|y (jω)| = d ≤ ymax
|1 + g (jω)c(jω)|
[Skogestad, 2001]
|g (jω)|
|y (jω)| = d ≤ ymax
|1 + g (jω)c(jω)|
d
|c(jω)| >
ymax
[Skogestad, 2001]
|g (jω)|
|y (jω)| = d ≤ ymax
|1 + g (jω)c(jω)|
d
|c(jω)| >
ymax
[Skogestad, 2001]
|g (jω)|
|y (jω)| = d ≤ ymax
|1 + g (jω)c(jω)|
d
|c(jω)| >
ymax
d
Kc ≥
ymax
[Skogestad, 2001]
1 τ1 1 1
Kc = = 0
k τc + θ k τc + θ
4
τI = min{τ1 , 0 } = min{τ1 , 4(τc + θ)}
k Kc
τD = τ2
Rules of thumb:
[McMillan, 2001]
Ts : sampling time
Ts : sampling time
Analog to Digital (A-D) conversion:
y (tk ) = y (kTs )
Ts : sampling time
Analog to Digital (A-D) conversion:
y (tk ) = y (kTs )
Digital to Analog (D-A) conversion:
u(t) = u(tk ) for kTs ≤ t < (k + 1)Ts
Difference equation:
Difference equation:
Discrete time:
x[k + 1] = ax[k] + bu[k]
Difference equation:
Discrete time:
x[k + 1] = ax[k] + bu[k]
Z -transform:
X (z) b
zX (z) = aX (z) + bU(z) ⇒ =
U(z) z −a
z −1
z = e Ts s ≈ 1 + Ts s ⇒ s ≈
Ts
x(t + Ts ) − x(t)
ẋ(t) ≈
Ts
z −1
z = e Ts s ≈ 1 + Ts s ⇒ s ≈
Ts
x(t + Ts ) − x(t)
ẋ(t) ≈
Ts
Backward difference:
1 1 − z −1
z = e Ts s ≈ ⇒s≈
1 − Ts s Ts
x(t) − x(t − Ts )
ẋ(t) ≈
Ts
1 + sTs /2 2 z −1
z = e Ts s ≈ ⇒s≈
1 − sTs /2 Ts z + 1
P[k] = Kp e[k]
P[k] = Kp e[k]
Kp Rt
Integral: I (t) = Ti 0 e(τ )dτ
KTs
I [k + 1] = I [k] + e[k]
Ti
P[k] = Kp e[k]
Kp Rt
Integral: I (t) = Ti 0 e(τ )dτ
KTs
I [k + 1] = I [k] + e[k]
Ti
Derivative: Td dD
N dt + D = −Kp Td dy
dt
Td Kp Td N
D[k] = D[k − 1] − (y [k] − y [k − 1])
Td + NTs Td + NTs
[Skogestad, 2001]
[Skogestad, 2001]
Time constant:
1
τ = the largest time constant + the second largest time constant
2
τ1 = the largest time constant,
τ2 = the second largest time constant + 12 the third largest time constant
[Skogestad, 2001]
e −θs
Ĝ1 (s) =
τs + 1
X τ20 X Ts
θ =td + Tj0 + + τi0 +
2 2
j j≥3
τ20
τ =τ10 +
2
[Skogestad, 2001]
e −θs
Ĝ2 (s) =
(τ1 s + 1)(τ2 s + 1)
X τ30 X Ts
θ =td + Tj0 + + τi0 +
2 2
j j≥4
τ1 =τ10
τ30
τ2 =τ20 +
2
[Skogestad, 2001]