Vous êtes sur la page 1sur 242

Industrial Control

Behzad Samadi
Department of Electrical Engineering
Amirkabir University of Technology

Winter 2009
Tehran, Iran

Behzad Samadi (Amirkabir University) Industrial Control 1 / 95


Feedback Control Loop

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

Behzad Samadi (Amirkabir University) Industrial Control 3 / 95


On-Off Control
One of the simplest control laws:

umax if e > 0
u=
umin if e < 0
Disadvantage: persistent oscillation of the process variable
1
P= e −2s , umax = 2, umin = 0
10s + 1

Behzad Samadi (Amirkabir University) Industrial Control 3 / 95


On-Off Control
One of the simplest control laws:

umax if e > 0
u=
umin if e < 0
Disadvantage: persistent oscillation of the process variable
1
P= e −2s , umax = 2, umin = 0
10s + 1

Behzad Samadi (Amirkabir University) Industrial Control 3 / 95


On-Off Control
One of the simplest control laws:

umax if e > 0
u=
umin if e < 0
Disadvantage: persistent oscillation of the process variable
1
P= e −2s , umax = 2, umin = 0
10s + 1

Behzad Samadi (Amirkabir University) Industrial Control 3 / 95


On-Off Control

a) Ideal on-off controller


b) Modified with a dead zone
c) Modified with hysteresys
[Visioli, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 4 / 95


PID Control

1 Proportional action
2 Integral action
3 Derivative action
[Visioli, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 5 / 95


Proportional Action

Proportional control action:

u(t) = Kp e(t) = Kp (r (t) − y (t)),

[Visioli, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 6 / 95


Proportional Action

Proportional control action:

u(t) = Kp e(t) = Kp (r (t) − y (t)),

Kp : proportional gain

[Visioli, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 6 / 95


Proportional Action

Proportional control action:

u(t) = Kp e(t) = Kp (r (t) − y (t)),

Kp : proportional gain
Controller transfer function:

C (s) = Kp

[Visioli, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 6 / 95


Proportional Action

Proportional control action:

u(t) = Kp e(t) = Kp (r (t) − y (t)),

Kp : proportional gain
Controller transfer function:

C (s) = Kp

Advantage: small control signal for a small error signal

[Visioli, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 6 / 95


Proportional Action

Proportional control action:

u(t) = Kp e(t) = Kp (r (t) − y (t)),

Kp : proportional gain
Controller transfer function:

C (s) = Kp

Advantage: small control signal for a small error signal


Disadvantage: steady state error
[Visioli, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 6 / 95


Proportional Action

Steady state error occurs even if the process presents an integrating


dynamics, in case a constant load disturbance occurs.

[Visioli, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 7 / 95


Proportional Action

Steady state error occurs even if the process presents an integrating


dynamics, in case a constant load disturbance occurs.
Adding a bias (or reset) term:

u(t) = Kp e + ub

The value of ub can be fixed or can be adjusted manually until the


steady state error is zero.
[Visioli, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 7 / 95


Proportional Action

Proportional Band (PB):

100%
PB =
Kp

[Astrom and Hagglund, 1995]

Behzad Samadi (Amirkabir University) Industrial Control 8 / 95


Integral Action

Integral control action:


Z t
u(t) = Ki e(τ )dτ,
0

[Visioli, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 9 / 95


Integral Action

Integral control action:


Z t
u(t) = Ki e(τ )dτ,
0

Ki : integral gain

[Visioli, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 9 / 95


Integral Action

Integral control action:


Z t
u(t) = Ki e(τ )dτ,
0

Ki : integral gain
Controller transfer function:
Ki
C (s) =
s

[Visioli, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 9 / 95


Integral Action

Integral control action:


Z t
u(t) = Ki e(τ )dτ,
0

Ki : integral gain
Controller transfer function:
Ki
C (s) =
s
Advantage: zero steady state error

[Visioli, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 9 / 95


Integral Action

Integral control action:


Z t
u(t) = Ki e(τ )dτ,
0

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]

Behzad Samadi (Amirkabir University) Industrial Control 9 / 95


PI Controller

Proportional Integrator Controller:


Transfer function:
1
C (s) = Kp (1 + )
Ti s

[Visioli, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 10 / 95


PI Controller

Proportional Integrator Controller:


Transfer function:
1
C (s) = Kp (1 + )
Ti s

Integral action is able to set automatically the value of ub .

[Visioli, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 10 / 95


PI Controller

Proportional Integrator Controller:


Transfer function:
1
C (s) = Kp (1 + )
Ti s

Integral action is able to set automatically the value of ub .


The integral action is also called automatic reset.
[Visioli, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 10 / 95


Derivative Action

Derivative control action:


de(t)
u(t) = Kd ,
dt

[Visioli, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 11 / 95


Derivative Action

Derivative control action:


de(t)
u(t) = Kd ,
dt
Kd : derivative gain

[Visioli, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 11 / 95


Derivative Action

Derivative control action:


de(t)
u(t) = Kd ,
dt
Kd : derivative gain
Controller transfer function:

C (s) = Kd s

[Visioli, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 11 / 95


Derivative Action

Derivative control action:


de(t)
u(t) = Kd ,
dt
Kd : derivative gain
Controller transfer function:

C (s) = Kd s

Advantage: Derivative action is an instance of predictive control.

[Visioli, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 11 / 95


Derivative Action

Derivative control action:


de(t)
u(t) = Kd ,
dt
Kd : derivative gain
Controller transfer function:

C (s) = Kd s

Advantage: Derivative action is an instance of predictive control.


Disadvantage: Sensitive to the measurement noise in the manipulated
variable
[Visioli, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 11 / 95


Derivative Action

Derivative action is an instance of predictive control.

[Visioli, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 12 / 95


Derivative Action

Derivative action is an instance of predictive control.


Taylor series expansion of the control error at time Td ahead:

de(t)
e(t + Td ) ≈ e(t) + Td
dt

[Visioli, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 12 / 95


Derivative Action

Derivative action is an instance of predictive control.


Taylor series expansion of the control error at time Td ahead:

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]

Behzad Samadi (Amirkabir University) Industrial Control 12 / 95


Derivative Action

Derivative action is an instance of predictive control.


Taylor series expansion of the control error at time Td ahead:

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

Derivative action is also called anticipatory control, or rate action, or


pre-act.
[Visioli, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 12 / 95


PID Controller

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

Behzad Samadi (Amirkabir University) Industrial Control 13 / 95


PID Controller

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]

Behzad Samadi (Amirkabir University) Industrial Control 14 / 95


PID Controller

Transfer function:
Ki
C (s) = Kp + + Kd s
s

[Li et al., 2006]

Behzad Samadi (Amirkabir University) Industrial Control 15 / 95


PID Controller

Implementation methods:
Pneumatic
Hydraulic
Electronic
Digital

Behzad Samadi (Amirkabir University) Industrial Control 16 / 95


PID Controller

Structures of PID controllers:


Ideal or noninteracting form:
 
1
Ci (s) = Kp 1 + + Td s
Ti s

[Visioli, 2006] and [Astrom and Hagglund, 1995]

Behzad Samadi (Amirkabir University) Industrial Control 17 / 95


PID Controller

Structures of PID controllers:


Ideal or noninteracting form:
 
1
Ci (s) = Kp 1 + + Td s
Ti s

Series or interacting from:


 
0 1 0
Cs (s) = Kp 1 + 0 (1 + Td s)
Ti s

[Visioli, 2006] and [Astrom and Hagglund, 1995]

Behzad Samadi (Amirkabir University) Industrial Control 17 / 95


PID Controller

Structures of PID controllers:


Ideal or noninteracting form:
 
1
Ci (s) = Kp 1 + + Td s
Ti s

Series or interacting from:


 
0 1 0
Cs (s) = Kp 1 + 0 (1 + Td s)
Ti s

Parallel form:
Ki
Ci (s) = Kp + + Kd s
s

[Visioli, 2006] and [Astrom and Hagglund, 1995]

Behzad Samadi (Amirkabir University) Industrial Control 17 / 95


PID Controller

Structures of PID controllers:

[Astrom and Hagglund, 1995]

Behzad Samadi (Amirkabir University) Industrial Control 18 / 95


PID Controller

Structures of PID controllers:


Series to ideal form conversion:
0 0
0 Ti + Td
Kp =Kp 0
Ti
0
Ti =Ti + Td 0
0 0
Ti Td
Td = 0 0
Ti + Td

Behzad Samadi (Amirkabir University) Industrial Control 19 / 95


PID Controller

Structures of PID controllers:


Ideal to series form conversion: Only if Ti ≥ 4Td
s !
0 Kp Td
Kp = 1+ 1−4
2 Ti
s !
0 Ti Td
Ti = 1+ 1−4
2 Ti
s !
0 Ti Td
Td = 1− 1−4
2 Ti

[Visioli, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 20 / 95


PID Controller

Alternative series form:


1
Cs (s) = Kp (1 + )(α + Td s)
αTi s
Ideal to alternative series form conversion: Only if Ti ≥ 4Td
q
1 ± 1 − 4 TTdi
α= >0
2
[Li et al., 2006]

Behzad Samadi (Amirkabir University) Industrial Control 21 / 95


PID Controller

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]

Behzad Samadi (Amirkabir University) Industrial Control 22 / 95


Problems with the Derivative Action

Noise:
n(t) = A sin(ωt)

[Visioli, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 23 / 95


Problems with the Derivative Action

Noise:
n(t) = A sin(ωt)
Derivative action:
u(t) = Aω cos(ωt)

[Visioli, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 23 / 95


Problems with the Derivative Action

Noise:
n(t) = A sin(ωt)
Derivative action:
u(t) = Aω cos(ωt)
u(t) is large for high frequencies.

[Visioli, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 23 / 95


Problems with the Derivative Action

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]

Behzad Samadi (Amirkabir University) Industrial Control 23 / 95


Modified Derivative Action
Modified ideal form:
!
1 Td s
Ci1a (s) = Kp 1+ + Td
Ti s N s +1

[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

Modified series form:


 
  0
0 1 T
 d0 s + 1
Cs (s) = Kp 1 + 0 
Ti s Td
s +1 N

[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

Modified series form:


 
  0
0 1 T
 d0 s + 1
Cs (s) = Kp 1 + 0 
Ti s Td
s +1 N
N generally assumes a value between 1 and 33, although in the
majority of the practical cases its setting falls between 8 and 16 (Ang
et al., 2005).
[Visioli,Samadi
Behzad 2006] (Amirkabir University) Industrial Control 24 / 95
Modified Derivative Action
Alternative modified ideal form:
 
1 1
Ci2a (s) = Kp 1 + + Td s
Ti s Tf s + 1

[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

If Td ≤ T and KKp TTd > 1, then


|C (jω)P(jω)| ≥ 1

[Visioli, 2006]
Behzad Samadi (Amirkabir University) Industrial Control 27 / 95
Frequency Response

Burns, 2001

Behzad Samadi (Amirkabir University) Industrial Control 28 / 95


Derivative Action

Consider the following process:


2 −0.2s
P(s) = e
s +1
controlled by a PID controller in series form with Kp = 1 and Ti = 1.

Behzad Samadi (Amirkabir University) Industrial Control 29 / 95


Derivative Action

Consider the following process:


2 −0.2s
P(s) = e
s +1
controlled by a PID controller in series form with Kp = 1 and Ti = 1.
If Td = 0.01, GM=12.3dB, PM=68.2 deg.

Behzad Samadi (Amirkabir University) Industrial Control 29 / 95


Derivative Action

Consider the following process:


2 −0.2s
P(s) = e
s +1
controlled by a PID controller in series form with Kp = 1 and Ti = 1.
If Td = 0.01, GM=12.3dB, PM=68.2 deg.
If Td = 0.05, GM=13.2dB, PM=72.7 deg.

Behzad Samadi (Amirkabir University) Industrial Control 29 / 95


Derivative Action

Consider the following process:


2 −0.2s
P(s) = e
s +1
controlled by a PID controller in series form with Kp = 1 and Ti = 1.
If Td = 0.01, GM=12.3dB, PM=68.2 deg.
If Td = 0.05, GM=13.2dB, PM=72.7 deg.
If Td = 0.5, the system stability is lost!

Behzad Samadi (Amirkabir University) Industrial Control 29 / 95


Derivative Action

Consider the following process:


2 −0.2s
P(s) = e
s +1
controlled by a PID controller in series form with Kp = 1 and Ti = 1.
If Td = 0.01, GM=12.3dB, PM=68.2 deg.
If Td = 0.05, GM=13.2dB, PM=72.7 deg.
If Td = 0.5, the system stability is lost!

Behzad Samadi (Amirkabir University) Industrial Control 29 / 95


Derivative Action

Consider the following process:


2 −0.2s
P(s) = e
s +1
controlled by a PID controller in series form with Kp = 1 and Ti = 1.
If Td = 0.01, GM=12.3dB, PM=68.2 deg.
If Td = 0.05, GM=13.2dB, PM=72.7 deg.
If Td = 0.5, the system stability is lost!
In summary:
Sensitive to noise
Hard to tune (4 parameters)
[Visioli, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 29 / 95


Integral Windup

Behzad Samadi (Amirkabir University) Industrial Control 30 / 95


Integral Windup

Solid:
process output,
Dashed:
process input,
Dotted:
integral term

[Visioli, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 30 / 95


Conditional Integration

The integral term is limited to a predefined value.

[Visioli, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 31 / 95


Conditional Integration

The integral term is limited to a predefined value.


The integration is stopped when the error is greater than a predefined
threshold, namely, when the process variable value is far from the
setpoint value.

[Visioli, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 31 / 95


Conditional Integration

The integral term is limited to a predefined value.


The integration is stopped when the error is greater than a predefined
threshold, namely, when the process variable value is far from the
setpoint value.
The integration is stopped when the control variable saturates, i.e.,
0
when u 6= u.

[Visioli, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 31 / 95


Conditional Integration

The integral term is limited to a predefined value.


The integration is stopped when the error is greater than a predefined
threshold, namely, when the process variable value is far from the
setpoint value.
The integration is stopped when the control variable saturates, i.e.,
0
when u 6= u.
The integration is stopped when the control variable saturates and
the control error and the control variable have the same sign (i.e.,
when ue > 0).
[Visioli, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 31 / 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:

Limiting the controller output:

[Visioli, 2006]
Behzad Samadi (Amirkabir University) Industrial Control 32 / 95
Anti-windup for Automatic Reset Configuration

Automatic reset:

Limiting the controller output:

Limiting the integrator output:

[Visioli, 2006]
Behzad Samadi (Amirkabir University) Industrial Control 32 / 95
Back-calculation

Integrator input:
Kp 1 0
ei = e + (u − u)
Ti Tt

Behzad Samadi (Amirkabir University) Industrial Control 33 / 95


Back-calculation

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

Behzad Samadi (Amirkabir University) Industrial Control 33 / 95


Back-calculation

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

Behzad Samadi (Amirkabir University) Industrial Control 33 / 95


Back-calculation

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]

Behzad Samadi (Amirkabir University) Industrial Control 34 / 95


Back-calculation

Integrator input:
Kp 1 0
ei = e + (u − u)
Ti Tt
Bohn and Atherton, 1995 suggest Tt = Ti .

[Visioli, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 34 / 95


Back-calculation

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]

Behzad Samadi (Amirkabir University) Industrial Control 34 / 95


PID with Tracking Input

SP: Setpoint, MV: Manipulated Variable, TR: Tracking Input


[Astrom and Hagglund, 1995]
Behzad Samadi (Amirkabir University) Industrial Control 35 / 95
Bumpless Transfer

Bumpless Transfer between Manual (M) and Automatic (A)

A is to track M in this case.


[Visioli, 2006]

Behzad Samadi (Amirkabir University) Industrial Control 36 / 95


Bumpless Transfer

Bumpless Transfer between Manual (M) and Automatic (A)

Behzad Samadi (Amirkabir University) Industrial Control 37 / 95


Bumpless Transfer

Bumpless Transfer between Manual (M) and Automatic (A)

Incremental manual input


[Astrom and Hagglund, 1995]

Behzad Samadi (Amirkabir University) Industrial Control 37 / 95


Bumpless Transfer
Manual Control Module:

[Astrom and Hagglund, 1995]

Behzad Samadi (Amirkabir University) Industrial Control 38 / 95


Bumpless Transfer

PID with Manual Switch:

[Astrom and Hagglund, 1995]

Behzad Samadi (Amirkabir University) Industrial Control 39 / 95


PID Controller Design

In process industries, more than 97% of the regulatory controllers are


of the PID type.

[Yu, 2007]

Behzad Samadi (Amirkabir University) Industrial Control 40 / 95


PID Controller Design

In process industries, more than 97% of the regulatory controllers are


of the PID type.
Most loops are actually under PI control (as a result of the large
number of flow loops).

[Yu, 2007]

Behzad Samadi (Amirkabir University) Industrial Control 40 / 95


PID Controller Design

In process industries, more than 97% of the regulatory controllers are


of the PID type.
Most loops are actually under PI control (as a result of the large
number of flow loops).
Pulp and paper industry over 2000 loops:

[Yu, 2007]

Behzad Samadi (Amirkabir University) Industrial Control 40 / 95


PID Controller Design

In process industries, more than 97% of the regulatory controllers are


of the PID type.
Most loops are actually under PI control (as a result of the large
number of flow loops).
Pulp and paper industry over 2000 loops:
Only 20% of loops worked well (i.e. less variability in the automatic
mode over the manual mode).

[Yu, 2007]

Behzad Samadi (Amirkabir University) Industrial Control 40 / 95


PID Controller Design

In process industries, more than 97% of the regulatory controllers are


of the PID type.
Most loops are actually under PI control (as a result of the large
number of flow loops).
Pulp and paper industry over 2000 loops:
Only 20% of loops worked well (i.e. less variability in the automatic
mode over the manual mode).
30% gave poor performance due to poor controller tuning.

[Yu, 2007]

Behzad Samadi (Amirkabir University) Industrial Control 40 / 95


PID Controller Design

In process industries, more than 97% of the regulatory controllers are


of the PID type.
Most loops are actually under PI control (as a result of the large
number of flow loops).
Pulp and paper industry over 2000 loops:
Only 20% of loops worked well (i.e. less variability in the automatic
mode over the manual mode).
30% gave poor performance due to poor controller tuning.
30% gave poor performance due to control valve problems (e.g. control
valve stick-slip, dead band, backlash).

[Yu, 2007]

Behzad Samadi (Amirkabir University) Industrial Control 40 / 95


PID Controller Design

In process industries, more than 97% of the regulatory controllers are


of the PID type.
Most loops are actually under PI control (as a result of the large
number of flow loops).
Pulp and paper industry over 2000 loops:
Only 20% of loops worked well (i.e. less variability in the automatic
mode over the manual mode).
30% gave poor performance due to poor controller tuning.
30% gave poor performance due to control valve problems (e.g. control
valve stick-slip, dead band, backlash).
20% gave poor performance due to process and/or control system
design problems.
[Yu, 2007]

Behzad Samadi (Amirkabir University) Industrial Control 40 / 95


PID Controller Design
Process industries:

[Yu, 2007]

Behzad Samadi (Amirkabir University) Industrial Control 41 / 95


PID Controller Design
Process industries:
30% of loops operated on manual mode.

[Yu, 2007]

Behzad Samadi (Amirkabir University) Industrial Control 41 / 95


PID Controller Design
Process industries:
30% of loops operated on manual mode.
20% of controllers used factory tuning.

[Yu, 2007]

Behzad Samadi (Amirkabir University) Industrial Control 41 / 95


PID Controller Design
Process industries:
30% of loops operated on manual mode.
20% of controllers used factory tuning.
30% gave poor performance due to sensor and control valve problems.

[Yu, 2007]

Behzad Samadi (Amirkabir University) Industrial Control 41 / 95


PID Controller Design
Process industries:
30% of loops operated on manual mode.
20% of controllers used factory tuning.
30% gave poor performance due to sensor and control valve problems.
Chemical process industry:

[Yu, 2007]

Behzad Samadi (Amirkabir University) Industrial Control 41 / 95


PID Controller Design
Process industries:
30% of loops operated on manual mode.
20% of controllers used factory tuning.
30% gave poor performance due to sensor and control valve problems.
Chemical process industry:
Half of the control valves needed to be fixed (results of the Fisher diagnostic
valve package).

[Yu, 2007]

Behzad Samadi (Amirkabir University) Industrial Control 41 / 95


PID Controller Design
Process industries:
30% of loops operated on manual mode.
20% of controllers used factory tuning.
30% gave poor performance due to sensor and control valve problems.
Chemical process industry:
Half of the control valves needed to be fixed (results of the Fisher diagnostic
valve package).
Most poor tuning was due to control valve problems.

[Yu, 2007]

Behzad Samadi (Amirkabir University) Industrial Control 41 / 95


PID Controller Design
Process industries:
30% of loops operated on manual mode.
20% of controllers used factory tuning.
30% gave poor performance due to sensor and control valve problems.
Chemical process industry:
Half of the control valves needed to be fixed (results of the Fisher diagnostic
valve package).
Most poor tuning was due to control valve problems.
Refining, chemicals, and pulp and paper industries over 26,000 controllers:

[Yu, 2007]

Behzad Samadi (Amirkabir University) Industrial Control 41 / 95


PID Controller Design
Process industries:
30% of loops operated on manual mode.
20% of controllers used factory tuning.
30% gave poor performance due to sensor and control valve problems.
Chemical process industry:
Half of the control valves needed to be fixed (results of the Fisher diagnostic
valve package).
Most poor tuning was due to control valve problems.
Refining, chemicals, and pulp and paper industries over 26,000 controllers:
Only 32% of loops were classified as excellent or acceptable.

[Yu, 2007]

Behzad Samadi (Amirkabir University) Industrial Control 41 / 95


PID Controller Design
Process industries:
30% of loops operated on manual mode.
20% of controllers used factory tuning.
30% gave poor performance due to sensor and control valve problems.
Chemical process industry:
Half of the control valves needed to be fixed (results of the Fisher diagnostic
valve package).
Most poor tuning was due to control valve problems.
Refining, chemicals, and pulp and paper industries over 26,000 controllers:
Only 32% of loops were classified as excellent or acceptable.
32% of controllers were classified as fair or poor, which indicates
unacceptably sluggish or oscillatory responses.

[Yu, 2007]

Behzad Samadi (Amirkabir University) Industrial Control 41 / 95


PID Controller Design
Process industries:
30% of loops operated on manual mode.
20% of controllers used factory tuning.
30% gave poor performance due to sensor and control valve problems.
Chemical process industry:
Half of the control valves needed to be fixed (results of the Fisher diagnostic
valve package).
Most poor tuning was due to control valve problems.
Refining, chemicals, and pulp and paper industries over 26,000 controllers:
Only 32% of loops were classified as excellent or acceptable.
32% of controllers were classified as fair or poor, which indicates
unacceptably sluggish or oscillatory responses.
36% of controllers were on open- loop, which implies that the controllers
were either in manual or virtually saturated.

[Yu, 2007]

Behzad Samadi (Amirkabir University) Industrial Control 41 / 95


PID Controller Design
Process industries:
30% of loops operated on manual mode.
20% of controllers used factory tuning.
30% gave poor performance due to sensor and control valve problems.
Chemical process industry:
Half of the control valves needed to be fixed (results of the Fisher diagnostic
valve package).
Most poor tuning was due to control valve problems.
Refining, chemicals, and pulp and paper industries over 26,000 controllers:
Only 32% of loops were classified as excellent or acceptable.
32% of controllers were classified as fair or poor, which indicates
unacceptably sluggish or oscillatory responses.
36% of controllers were on open- loop, which implies that the controllers
were either in manual or virtually saturated.
PID algorithms are used in vast majority of applications (97%). For the rare
cases of complex dynamics or significant dead time, other algorithms are
used.
[Yu, 2007]

Behzad Samadi (Amirkabir University) Industrial Control 41 / 95


PID Controller Design

Ziegler-Nichols PID Tuning Method:


Ziegler-Nichols closed-loop tuning method
Ziegler-Nichols open-loop tuning method

Ziegler, Nichols, “Optimum settings for automatic controllers”, Trans.


ASME, 64, pp. 759-768, 1942
[Woolf, 2007]

Behzad Samadi (Amirkabir University) Industrial Control 42 / 95


PID Controller Design
Ziegler-Nichols closed-loop tuning method:
1 Remove integral and derivative action.

Behzad Samadi (Amirkabir University) Industrial Control 43 / 95


PID Controller Design
Ziegler-Nichols closed-loop tuning method:
1 Remove integral and derivative action.

2 Create a small disturbance in the loop by changing the set point.

Adjust the proportional, increasing and/or decreasing, the gain until


the oscillations have constant amplitude.

Behzad Samadi (Amirkabir University) Industrial Control 43 / 95


PID Controller Design
Ziegler-Nichols closed-loop tuning method:
1 Remove integral and derivative action.

2 Create a small disturbance in the loop by changing the set point.

Adjust the proportional, increasing and/or decreasing, the gain until


the oscillations have constant amplitude.
3 Record the gain value (K ) and period of oscillation (P ).
u u

Behzad Samadi (Amirkabir University) Industrial Control 43 / 95


PID Controller Design
Ziegler-Nichols closed-loop tuning method:
1 Remove integral and derivative action.

2 Create a small disturbance in the loop by changing the set point.

Adjust the proportional, increasing and/or decreasing, the gain until


the oscillations have constant amplitude.
3 Record the gain value (K ) and period of oscillation (P ).
u u

Behzad Samadi (Amirkabir University) Industrial Control 43 / 95


PID Controller Design
Ziegler-Nichols closed-loop tuning method:
1 Remove integral and derivative action.

2 Create a small disturbance in the loop by changing the set point.

Adjust the proportional, increasing and/or decreasing, the gain until


the oscillations have constant amplitude.
3 Record the gain value (K ) and period of oscillation (P ).
u u

[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

Ziegler-Nichols closed-loop tuning method (ultimate cycle method):

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]

Behzad Samadi (Amirkabir University) Industrial Control 45 / 95


PID Controller Design

Ziegler-Nichols closed-loop tuning method:


Advantages:

[Woolf, 2007]

Behzad Samadi (Amirkabir University) Industrial Control 46 / 95


PID Controller Design

Ziegler-Nichols closed-loop tuning method:


Advantages:
Easy experiment; only need to change the P controller

[Woolf, 2007]

Behzad Samadi (Amirkabir University) Industrial Control 46 / 95


PID Controller Design

Ziegler-Nichols closed-loop tuning method:


Advantages:
Easy experiment; only need to change the P controller
Includes dynamics of whole process, which gives a more accurate
picture of how the system is behaving

[Woolf, 2007]

Behzad Samadi (Amirkabir University) Industrial Control 46 / 95


PID Controller Design

Ziegler-Nichols closed-loop tuning method:


Advantages:
Easy experiment; only need to change the P controller
Includes dynamics of whole process, which gives a more accurate
picture of how the system is behaving
Disadvantages:

[Woolf, 2007]

Behzad Samadi (Amirkabir University) Industrial Control 46 / 95


PID Controller Design

Ziegler-Nichols closed-loop tuning method:


Advantages:
Easy experiment; only need to change the P controller
Includes dynamics of whole process, which gives a more accurate
picture of how the system is behaving
Disadvantages:
Experiment can be time consuming

[Woolf, 2007]

Behzad Samadi (Amirkabir University) Industrial Control 46 / 95


PID Controller Design

Ziegler-Nichols closed-loop tuning method:


Advantages:
Easy experiment; only need to change the P controller
Includes dynamics of whole process, which gives a more accurate
picture of how the system is behaving
Disadvantages:
Experiment can be time consuming
Can venture into unstable regions while testing the P controller, which
could cause the system to become out of control

[Woolf, 2007]

Behzad Samadi (Amirkabir University) Industrial Control 46 / 95


PID Controller Design

Ziegler-Nichols closed-loop tuning method:


Advantages:
Easy experiment; only need to change the P controller
Includes dynamics of whole process, which gives a more accurate
picture of how the system is behaving
Disadvantages:
Experiment can be time consuming
Can venture into unstable regions while testing the P controller, which
could cause the system to become out of control
It does not hold for I , D and PD controllers.
[Woolf, 2007]

Behzad Samadi (Amirkabir University) Industrial Control 46 / 95


PID Controller Design
Process Reaction Curve:

P: the size of the step disturbance in the setpoint


L: the time taken from the moment the disturbance was introduced
to the first sign of change in the output signal
∆Cp : the change in output signal in response to the initial step
disturbance
T : the time taken for this change to occur
[Woolf, 2007]
Behzad Samadi (Amirkabir University) Industrial Control 47 / 95
PID Controller Design

Process Reaction Curve:

∆Cp
N= T : reaction rate
[Woolf, 2007]

Behzad Samadi (Amirkabir University) Industrial Control 48 / 95


PID Controller Design

Ziegler-Nichols open-loop tuning method (process reaction method):

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]

Behzad Samadi (Amirkabir University) Industrial Control 49 / 95


PID Controller Design

Ziegler-Nichols open-loop tuning method:


Advantages:

[Woolf, 2007]

Behzad Samadi (Amirkabir University) Industrial Control 50 / 95


PID Controller Design

Ziegler-Nichols open-loop tuning method:


Advantages:
Quick and easier to use than other methods

[Woolf, 2007]

Behzad Samadi (Amirkabir University) Industrial Control 50 / 95


PID Controller Design

Ziegler-Nichols open-loop tuning method:


Advantages:
Quick and easier to use than other methods
It is a robust and popular method

[Woolf, 2007]

Behzad Samadi (Amirkabir University) Industrial Control 50 / 95


PID Controller Design

Ziegler-Nichols open-loop tuning method:


Advantages:
Quick and easier to use than other methods
It is a robust and popular method
Of these two techniques, the Process Reaction Method is the easiest
and least disruptive to implement

[Woolf, 2007]

Behzad Samadi (Amirkabir University) Industrial Control 50 / 95


PID Controller Design

Ziegler-Nichols open-loop tuning method:


Advantages:
Quick and easier to use than other methods
It is a robust and popular method
Of these two techniques, the Process Reaction Method is the easiest
and least disruptive to implement
Disadvantages:

[Woolf, 2007]

Behzad Samadi (Amirkabir University) Industrial Control 50 / 95


PID Controller Design

Ziegler-Nichols open-loop tuning method:


Advantages:
Quick and easier to use than other methods
It is a robust and popular method
Of these two techniques, the Process Reaction Method is the easiest
and least disruptive to implement
Disadvantages:
It depends upon purely proportional measurement to estimate I and D
controllers.

[Woolf, 2007]

Behzad Samadi (Amirkabir University) Industrial Control 50 / 95


PID Controller Design

Ziegler-Nichols open-loop tuning method:


Advantages:
Quick and easier to use than other methods
It is a robust and popular method
Of these two techniques, the Process Reaction Method is the easiest
and least disruptive to implement
Disadvantages:
It depends upon purely proportional measurement to estimate I and D
controllers.
Approximations for the Kc , Ti , and Td values might not be entirely
accurate for different systems.

[Woolf, 2007]

Behzad Samadi (Amirkabir University) Industrial Control 50 / 95


PID Controller Design

Ziegler-Nichols open-loop tuning method:


Advantages:
Quick and easier to use than other methods
It is a robust and popular method
Of these two techniques, the Process Reaction Method is the easiest
and least disruptive to implement
Disadvantages:
It depends upon purely proportional measurement to estimate I and D
controllers.
Approximations for the Kc , Ti , and Td values might not be entirely
accurate for different systems.
It does not hold for I , D and PD controllers.
[Woolf, 2007]

Behzad Samadi (Amirkabir University) Industrial Control 50 / 95


PID Controller Design

Summary:
Ziegler-Nichols closed-loop tuning method: Gain margin of 2
Ziegler-Nichols open-loop tuning method: Decay ratio of 0.25

Behzad Samadi (Amirkabir University) Industrial Control 51 / 95


PID Controller Design

Ziegler-Nichols closed-loop tuning methods:

Ke −Ds
G (s) =
τs + 1

[Yu, 2007]

Behzad Samadi (Amirkabir University) Industrial Control 52 / 95


PID Controller Design
Ziegler-Nichols closed-loop tuning methods:
Ke −td s
G (s) =
τs + 1
td
Quarter decay ration for 0 < τ < 1 [O’Dwyer, 2002]

[Chau, 2002]
Behzad Samadi (Amirkabir University) Industrial Control 53 / 95
PID Controller Design

Quantities to characterize the error:


Maximum error: max e(t)

[Astrom and Hagglund, 1995]

Behzad Samadi (Amirkabir University) Industrial Control 54 / 95


PID Controller Design

Quantities to characterize the error:


Maximum error: max e(t)
R∞
Integrated Absolute Error: IAE = 0 |e(t)|dt

[Astrom and Hagglund, 1995]

Behzad Samadi (Amirkabir University) Industrial Control 54 / 95


PID Controller Design

Quantities to characterize the error:


Maximum error: max e(t)
R∞
Integrated Absolute Error: IAE = 0 |e(t)|dt
R∞
Integrated Error for non-oscillatory processes: IE = 0 e(t)dt

[Astrom and Hagglund, 1995]

Behzad Samadi (Amirkabir University) Industrial Control 54 / 95


PID Controller Design

Quantities to characterize the error:


Maximum error: max e(t)
R∞
Integrated Absolute Error: IAE = 0 |e(t)|dt
R∞
Integrated Error for non-oscillatory processes: IE = 0 e(t)dt
R∞
Integrated Squared Error: ISE = 0 e 2 (t)dt

[Astrom and Hagglund, 1995]

Behzad Samadi (Amirkabir University) Industrial Control 54 / 95


PID Controller Design

Quantities to characterize the error:


Maximum error: max e(t)
R∞
Integrated Absolute Error: IAE = 0 |e(t)|dt
R∞
Integrated Error for non-oscillatory processes: IE = 0 e(t)dt
R∞
Integrated Squared Error: ISE = 0 e 2 (t)dt
R∞
Integrated Time Absolute Error: ITAE = 0 t|e(t)|dt

[Astrom and Hagglund, 1995]

Behzad Samadi (Amirkabir University) Industrial Control 54 / 95


PID Controller Design

Quantities to characterize the error:


Maximum error: max e(t)
R∞
Integrated Absolute Error: IAE = 0 |e(t)|dt
R∞
Integrated Error for non-oscillatory processes: IE = 0 e(t)dt
R∞
Integrated Squared Error: ISE = 0 e 2 (t)dt
R∞
Integrated Time Absolute Error: ITAE = 0 t|e(t)|dt
R∞
Integrated Time Error: ITE = 0 te(t)dt

[Astrom and Hagglund, 1995]

Behzad Samadi (Amirkabir University) Industrial Control 54 / 95


PID Controller Design

Quantities to characterize the error:


Maximum error: max e(t)
R∞
Integrated Absolute Error: IAE = 0 |e(t)|dt
R∞
Integrated Error for non-oscillatory processes: IE = 0 e(t)dt
R∞
Integrated Squared Error: ISE = 0 e 2 (t)dt
R∞
Integrated Time Absolute Error: ITAE = 0 t|e(t)|dt
R∞
Integrated Time Error: ITE = 0 te(t)dt
R∞
Integrated Time Squared Error: ITSE = 0 te 2 (t)dt

[Astrom and Hagglund, 1995]

Behzad Samadi (Amirkabir University) Industrial Control 54 / 95


PID Controller Design

Quantities to characterize the error:


Maximum error: max e(t)
R∞
Integrated Absolute Error: IAE = 0 |e(t)|dt
R∞
Integrated Error for non-oscillatory processes: IE = 0 e(t)dt
R∞
Integrated Squared Error: ISE = 0 e 2 (t)dt
R∞
Integrated Time Absolute Error: ITAE = 0 t|e(t)|dt
R∞
Integrated Time Error: ITE = 0 te(t)dt
R∞
Integrated Time Squared Error: ITSE = 0 te 2 (t)dt
R∞
Integrated Squared Time Error: ISTE = 0 t 2 e 2 (t)dt
[Astrom and Hagglund, 1995]

Behzad Samadi (Amirkabir University) Industrial Control 54 / 95


PID Controller Design
ITAE optimization:
Ke −td s
G (s) =
τs + 1

[Chau, 2002]

Behzad Samadi (Amirkabir University) Industrial Control 55 / 95


PID Controller Design
Ciancone and Marlin Tuning:

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]

Behzad Samadi (Amirkabir University) Industrial Control 56 / 95


PID Controller Design
Ciancone and Marlin PI Tuning:

[Chau, 2002]

Behzad Samadi (Amirkabir University) Industrial Control 57 / 95


PID Controller Design
Ciancone and Marlin PID Tuning:

[Chau, 2002]

Behzad Samadi (Amirkabir University) Industrial Control 58 / 95


PID Controller Design

Direct Synthesis:

We have:
C Gc Gp
=
R 1 + Gc Gp
Therefore:
1 C /R
Gc =
Gp 1 − C /R
[Chau, 2002]

Behzad Samadi (Amirkabir University) Industrial Control 59 / 95


PID Controller Design

Direct Synthesis:
 
C 1 1 1
= ⇒ Gc =
R τc s + 1 Gp τc s

Behzad Samadi (Amirkabir University) Industrial Control 60 / 95


PID Controller Design

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]

Behzad Samadi (Amirkabir University) Industrial Control 60 / 95


PID Controller Design
Direct Synthesis:
For delayed systems:

e −θs e −θs
 
C 1
= ⇒ Gc =
R τc s + 1 Gp (τc s + 1) − e −θs

Behzad Samadi (Amirkabir University) Industrial Control 61 / 95


PID Controller Design
Direct Synthesis:
For delayed systems:

e −θs e −θs
 
C 1
= ⇒ Gc =
R τc s + 1 Gp (τc s + 1) − e −θs

Considering e −θs ≈ 1 − θs:

e −θs
 
1
Gc ≈
Gp (τc + θ)s

Behzad Samadi (Amirkabir University) Industrial Control 61 / 95


PID Controller Design
Direct Synthesis:
For delayed systems:

e −θs e −θs
 
C 1
= ⇒ Gc =
R τc s + 1 Gp (τc s + 1) − e −θs

Considering e −θs ≈ 1 − θs:

e −θs
 
1
Gc ≈
Gp (τc + θ)s

Behzad Samadi (Amirkabir University) Industrial Control 61 / 95


PID Controller Design
Direct Synthesis:
For delayed systems:

e −θs e −θs
 
C 1
= ⇒ Gc =
R τc s + 1 Gp (τc s + 1) − e −θs

Considering e −θs ≈ 1 − θ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

Behzad Samadi (Amirkabir University) Industrial Control 62 / 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

Behzad Samadi (Amirkabir University) Industrial Control 62 / 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ζ)

Behzad Samadi (Amirkabir University) Industrial Control 62 / 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ζ)

Assuming τ2 > τ1 and τ = 2ζτ2


 
τ1 1
Gc = 1+
4Kp ζ 2 τ2 τ1 s
[Chau, 2002]

Behzad Samadi (Amirkabir University) Industrial Control 62 / 95


PID Controller Design
Internal Model Control: Assume that we have an approximate model G̃p of
the process Gp
Open loop:

Gc = G̃p−1

Behzad Samadi (Amirkabir University) Industrial Control 63 / 95


PID Controller Design
Internal Model Control: Assume that we have an approximate model G̃p of
the process Gp
Open loop:

Gc = G̃p−1
Closed loop:

Behzad Samadi (Amirkabir University) Industrial Control 63 / 95


PID Controller Design
Internal Model Control:

P = Gc? (R − C + C̃ )
= Gc? (R − C + G̃p P)

Behzad Samadi (Amirkabir University) Industrial Control 64 / 95


PID Controller Design
Internal Model Control:

P = Gc? (R − C + C̃ )
= Gc? (R − C + G̃p P)

Therefore:
Gc?
P= (R−C )
1 − Gc? G̃p

Behzad Samadi (Amirkabir University) Industrial Control 64 / 95


PID Controller Design
Internal Model Control:

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 )

How to choose Gc? :


G̃p = G̃p+ G̃p−
G̃p+ contains all positive zeros if any.

[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 )

How to choose Gc? :


G̃p = G̃p+ G̃p−
G̃p+ contains all positive zeros if any.
The design is based on G̃p− only:
 r
? 1 1
Gc =
G̃p− τc s + 1
r = 1, 2
[Chau, 2002]
Behzad Samadi (Amirkabir University) Industrial Control 65 / 95
PID Controller Design

Padé Approximation of Delays:


Nd (s)
e −td s ≈ Dd (s)

http://mathworld.wolfram.com/PadeApproximant.html

Behzad Samadi (Amirkabir University) Industrial Control 66 / 95


PID Controller Design

Padé Approximation of Delays:


Nd (s)
e −td s ≈ Dd (s)
Gd1/0 (s) = 1 − td s

http://mathworld.wolfram.com/PadeApproximant.html

Behzad Samadi (Amirkabir University) Industrial Control 66 / 95


PID Controller Design

Padé Approximation of Delays:


Nd (s)
e −td s ≈ Dd (s)
Gd1/0 (s) = 1 − td s
1
Gd0/1 (s) = 1+td s

http://mathworld.wolfram.com/PadeApproximant.html

Behzad Samadi (Amirkabir University) Industrial Control 66 / 95


PID Controller Design

Padé Approximation of Delays:


Nd (s)
e −td s ≈ Dd (s)
Gd1/0 (s) = 1 − td s
1
Gd0/1 (s) = 1+td s
td
− s+1
Gd1/1 (s) = td
2

2
s+1

http://mathworld.wolfram.com/PadeApproximant.html

Behzad Samadi (Amirkabir University) Industrial Control 66 / 95


PID Controller Design

Padé Approximation of Delays:


Nd (s)
e −td s ≈ Dd (s)
Gd1/0 (s) = 1 − td s
1
Gd0/1 (s) = 1+td s
td
− s+1
Gd1/1 (s) = td
2

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

Behzad Samadi (Amirkabir University) Industrial Control 66 / 95


PID Controller Design

Internal Model Control:

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

Behzad Samadi (Amirkabir University) Industrial Control 67 / 95


PID Controller Design

Internal Model Control:

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]

Behzad Samadi (Amirkabir University) Industrial Control 67 / 95


PID Controller Design

Internal Model Control:

Example:

−1 1 (τp s + 1)( t2d s + 1) 1


Gc? = G̃p− =
τc s + 1 Kp τc s + 1

Gc? 1
Gc = = Kp (1 + + Td s)
1 − Gc? G̃p Ti s

Behzad Samadi (Amirkabir University) Industrial Control 68 / 95


PID Controller Design

Internal Model Control:

Example:

−1 1 (τp s + 1)( t2d s + 1) 1


Gc? = G̃p− =
τc s + 1 Kp τc s + 1

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]

Behzad Samadi (Amirkabir University) Industrial Control 68 / 95


PID Controller Design

[Chau, 2002]
Behzad Samadi (Amirkabir University) Industrial Control 69 / 95
PID Controller Design

Skogestad PID Tuning Method:


S. Skogestad, “Probably the best simple PID tuning rules in the
world” Presented at AIChE Annual meeting, Reno, NV, USA, 04-09
Nov. 2001, Paper no. 276h
[Skogestad, 2001]

Behzad Samadi (Amirkabir University) Industrial Control 70 / 95


PID Controller Design

Skogestad PID Tuning Method:

e −θs
g (s) = k
(τ1 s + 1)(τ2 s + 1)
[Skogestad, 2001]

Behzad Samadi (Amirkabir University) Industrial Control 71 / 95


PID Controller Design

Skogestad Internal Model Control (SIMC):


 
y 1
= e −θt
ys desired τc s + 1

Behzad Samadi (Amirkabir University) Industrial Control 72 / 95


PID Controller Design

Skogestad Internal Model Control (SIMC):


 
y 1
= e −θt
ys desired τc s + 1

(τ1 s + 1)(τ2 s + 1) 1
c(s) =
k (τc + θ)s

Behzad Samadi (Amirkabir University) Industrial Control 72 / 95


PID Controller Design

Skogestad Internal Model Control (SIMC):


 
y 1
= e −θt
ys desired τc s + 1

(τ1 s + 1)(τ2 s + 1) 1
c(s) =
k (τc + θ)s
1
c(s) = Kc (1 + )(τD s + 1)
τI s

Behzad Samadi (Amirkabir University) Industrial Control 72 / 95


PID Controller Design

Skogestad Internal Model Control (SIMC):


 
y 1
= e −θt
ys desired τc s + 1

(τ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]

Behzad Samadi (Amirkabir University) Industrial Control 72 / 95


PID Controller Design
Skogestad Internal Model Control (SIMC):
Tuning Rule
1 τ1
Kc = , τI = τ1 , τD = τ2
k τc + θ

Effective cancellation of the first order dynamics by τI = τ1

[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 + θ

Effective cancellation of the first order dynamics by τI = τ1


For processes with large τ1 , this choice results in a long settling time
for disturbance response.

[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 + θ

Effective cancellation of the first order dynamics by τI = τ1


For processes with large τ1 , this choice results in a long settling time
for disturbance response.
−θs
Consider: g (s) = k τe1 s+1 ≈ τk1 s for large τ1 . With a PI controller
c(s) = Kc (1 + τ1I s ), the poles of the closed loop system can be
obtained from the following equation:
τI 2
0 s + τI s + 1 = 0
k Kc
0 k
with k = τ1
[Skogestad, 2001]
Behzad Samadi (Amirkabir University) Industrial Control 73 / 95
PID Controller Design

Skogestad Internal Model Control (SIMC):


Comparing to s 2 + 2ζω0 s + ω 2 :
s
k 0 Kc 1p 0
ω0 = , ζ= k Kc τI
τI 2

[Skogestad, 2001]

Behzad Samadi (Amirkabir University) Industrial Control 74 / 95


PID Controller Design

Skogestad Internal Model Control (SIMC):


Comparing to s 2 + 2ζω0 s + ω 2 :
s
k 0 Kc 1p 0
ω0 = , ζ= k Kc τI
τI 2

To avoid slow oscillations, consider: ζ ≥ 1

[Skogestad, 2001]

Behzad Samadi (Amirkabir University) Industrial Control 74 / 95


PID Controller Design

Skogestad Internal Model Control (SIMC):


Comparing to s 2 + 2ζω0 s + ω 2 :
s
k 0 Kc 1p 0
ω0 = , ζ= k Kc τI
τI 2

To avoid slow oscillations, consider: ζ ≥ 1

4
τI ≥ 0
k Kc

[Skogestad, 2001]

Behzad Samadi (Amirkabir University) Industrial Control 74 / 95


PID Controller Design

Skogestad Internal Model Control (SIMC):


Disturbance rejection: Assuming input disturbance (gd (s) = g (s))

|g (jω)|
|y (jω)| = d ≤ ymax
|1 + g (jω)c(jω)|

[Skogestad, 2001]

Behzad Samadi (Amirkabir University) Industrial Control 75 / 95


PID Controller Design

Skogestad Internal Model Control (SIMC):


Disturbance rejection: Assuming input disturbance (gd (s) = g (s))

|g (jω)|
|y (jω)| = d ≤ ymax
|1 + g (jω)c(jω)|

Assuming |gc| >> 1 at low frequencies:

d
|c(jω)| >
ymax

[Skogestad, 2001]

Behzad Samadi (Amirkabir University) Industrial Control 75 / 95


PID Controller Design

Skogestad Internal Model Control (SIMC):


Disturbance rejection: Assuming input disturbance (gd (s) = g (s))

|g (jω)|
|y (jω)| = d ≤ ymax
|1 + g (jω)c(jω)|

Assuming |gc| >> 1 at low frequencies:

d
|c(jω)| >
ymax

For P, PI and PID: c(jω) ≥ Kc

[Skogestad, 2001]

Behzad Samadi (Amirkabir University) Industrial Control 75 / 95


PID Controller Design

Skogestad Internal Model Control (SIMC):


Disturbance rejection: Assuming input disturbance (gd (s) = g (s))

|g (jω)|
|y (jω)| = d ≤ ymax
|1 + g (jω)c(jω)|

Assuming |gc| >> 1 at low frequencies:

d
|c(jω)| >
ymax

For P, PI and PID: c(jω) ≥ Kc

d
Kc ≥
ymax

[Skogestad, 2001]

Behzad Samadi (Amirkabir University) Industrial Control 75 / 95


PID Controller Design
Skogestad Internal Model Control (SIMC):
Skogestad Internal Model Control (SIMC)

1 τ1 1 1
Kc = = 0
k τc + θ k τc + θ
4
τI = min{τ1 , 0 } = min{τ1 , 4(τc + θ)}
k Kc
τD = τ2

Tuning for fast response with good robustness


τc = θ
Tuning for slow response with acceptable disturbance rejection
d
Kc ≥
ymax
[Skogestad, 2001]
Behzad Samadi (Amirkabir University) Industrial Control 76 / 95
PID Controller Design

Rules of thumb:

[McMillan, 2001]

Behzad Samadi (Amirkabir University) Industrial Control 77 / 95


Digital Control

Ts : sampling time

[Astrom and Wittenmark, 1996]


Behzad Samadi (Amirkabir University) Industrial Control 78 / 95
Digital Control

Ts : sampling time
Analog to Digital (A-D) conversion:
y (tk ) = y (kTs )

[Astrom and Wittenmark, 1996]


Behzad Samadi (Amirkabir University) Industrial Control 78 / 95
Digital Control

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

[Astrom and Wittenmark, 1996]


Behzad Samadi (Amirkabir University) Industrial Control 78 / 95
Digital Control

Difference equation:

x((k + 1)Ts ) = ax(kTs ) + bu(kTs )

[Astrom and Wittenmark, 1996]

Behzad Samadi (Amirkabir University) Industrial Control 79 / 95


Digital Control

Difference equation:

x((k + 1)Ts ) = ax(kTs ) + bu(kTs )

Discrete time:
x[k + 1] = ax[k] + bu[k]

[Astrom and Wittenmark, 1996]

Behzad Samadi (Amirkabir University) Industrial Control 79 / 95


Digital Control

Difference equation:

x((k + 1)Ts ) = ax(kTs ) + bu(kTs )

Discrete time:
x[k + 1] = ax[k] + bu[k]
Z -transform:
X (z) b
zX (z) = aX (z) + bU(z) ⇒ =
U(z) z −a

[Astrom and Wittenmark, 1996]

Behzad Samadi (Amirkabir University) Industrial Control 79 / 95


Digital Control
Approximating Continuous-Time Controllers:
Euler’s method (forward difference):

z −1
z = e Ts s ≈ 1 + Ts s ⇒ s ≈
Ts
x(t + Ts ) − x(t)
ẋ(t) ≈
Ts

[Astrom and Wittenmark, 1996]


Behzad Samadi (Amirkabir University) Industrial Control 80 / 95
Digital Control
Approximating Continuous-Time Controllers:
Euler’s method (forward difference):

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

[Astrom and Wittenmark, 1996]


Behzad Samadi (Amirkabir University) Industrial Control 80 / 95
Digital Control

Approximating Continuous-Time Controllers:


Tustin’s approximation:

1 + sTs /2 2 z −1
z = e Ts s ≈ ⇒s≈
1 − sTs /2 Ts z + 1

It is also called trapezoidal method or bilinear transformation.


[Astrom and Wittenmark, 1996]

Behzad Samadi (Amirkabir University) Industrial Control 81 / 95


Digital Control

Approximating Continuous-Time Controllers:

Stability: Images of the left side of the s-plane


[Astrom and Wittenmark, 1996]

Behzad Samadi (Amirkabir University) Industrial Control 82 / 95


Digital Control

Approximating Continuous-Time Controllers:


Forward
Re(s) < 0 −−−−−−→ Re(z) < 1
Difference

[Astrom and Wittenmark, 1996]

Behzad Samadi (Amirkabir University) Industrial Control 83 / 95


Digital Control

Approximating Continuous-Time Controllers:


Forward
Re(s) < 0 −−−−−−→ Re(z) < 1
Difference
Forward
Stable system in s domain −−−−−−→ Stable or unstable system in z
Difference
domain

[Astrom and Wittenmark, 1996]

Behzad Samadi (Amirkabir University) Industrial Control 83 / 95


Digital Control

Approximating Continuous-Time Controllers:


Forward
Re(s) < 0 −−−−−−→ Re(z) < 1
Difference
Forward
Stable system in s domain −−−−−−→ Stable or unstable system in z
Difference
domain
Backward
Re(s) < 0 −−−−−−→ (Re(z) − 12 )2 + Im(z)2 < 1
4
Difference

[Astrom and Wittenmark, 1996]

Behzad Samadi (Amirkabir University) Industrial Control 83 / 95


Digital Control

Approximating Continuous-Time Controllers:


Forward
Re(s) < 0 −−−−−−→ Re(z) < 1
Difference
Forward
Stable system in s domain −−−−−−→ Stable or unstable system in z
Difference
domain
Backward
Re(s) < 0 −−−−−−→ (Re(z) − 12 )2 + Im(z)2 < 1
4
Difference
Backward
Stable or unstable system in s domain −−−−−−→ Stable system in z
Difference
domain

[Astrom and Wittenmark, 1996]

Behzad Samadi (Amirkabir University) Industrial Control 83 / 95


Digital Control

Approximating Continuous-Time Controllers:


Forward
Re(s) < 0 −−−−−−→ Re(z) < 1
Difference
Forward
Stable system in s domain −−−−−−→ Stable or unstable system in z
Difference
domain
Backward
Re(s) < 0 −−−−−−→ (Re(z) − 12 )2 + Im(z)2 < 1
4
Difference
Backward
Stable or unstable system in s domain −−−−−−→ Stable system in z
Difference
domain
Tustin
Re(s) < 0 −−−−−−−−→ |z| < 1
Approximation

[Astrom and Wittenmark, 1996]

Behzad Samadi (Amirkabir University) Industrial Control 83 / 95


Digital Control

Approximating Continuous-Time Controllers:


Forward
Re(s) < 0 −−−−−−→ Re(z) < 1
Difference
Forward
Stable system in s domain −−−−−−→ Stable or unstable system in z
Difference
domain
Backward
Re(s) < 0 −−−−−−→ (Re(z) − 12 )2 + Im(z)2 < 1
4
Difference
Backward
Stable or unstable system in s domain −−−−−−→ Stable system in z
Difference
domain
Tustin
Re(s) < 0 −−−−−−−−→ |z| < 1
Approximation
Tustin
Stable system in s domain −−−−−−−−→ Stable system in z domain
Approximation
[Astrom and Wittenmark, 1996]

Behzad Samadi (Amirkabir University) Industrial Control 83 / 95


Digital Control
Digital PID:
Proportional: P(t) = Kp e(t)

P[k] = Kp e[k]

[Astrom and Wittenmark, 1996]

Behzad Samadi (Amirkabir University) Industrial Control 84 / 95


Digital Control
Digital PID:
Proportional: P(t) = Kp e(t)

P[k] = Kp e[k]
Kp Rt
Integral: I (t) = Ti 0 e(τ )dτ

KTs
I [k + 1] = I [k] + e[k]
Ti

[Astrom and Wittenmark, 1996]

Behzad Samadi (Amirkabir University) Industrial Control 84 / 95


Digital Control
Digital PID:
Proportional: P(t) = Kp e(t)

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

[Astrom and Wittenmark, 1996]

Behzad Samadi (Amirkabir University) Industrial Control 84 / 95


Digital Control

Typical sampling time:


Type of variable Sampling time (sec)
Flow 1-3
Level 5-10
Pressure 1-5
Temperature 10-20

[Astrom and Wittenmark, 1996]

Behzad Samadi (Amirkabir University) Industrial Control 85 / 95


Digital Control

Typical sampling time:


Type of variable Sampling time (sec)
Flow 1-3
Level 5-10
Pressure 1-5
Temperature 10-20
Rule of thumb for PI controllers:
Ts
≈ 0.1 to 0.3
Ti

[Astrom and Wittenmark, 1996]

Behzad Samadi (Amirkabir University) Industrial Control 85 / 95


Digital Control

Typical sampling time:


Rule of thumb for PID controllers:
NTs
≈ 0.2 to 0.6
Td

[Astrom and Wittenmark, 1996]

Behzad Samadi (Amirkabir University) Industrial Control 86 / 95


Digital Control
Inverse Response: When the initial response of a dynamic system is in a
direction opposite to the final outcome, it is called an inverse response.

[Skogestad, 2001]

Behzad Samadi (Amirkabir University) Industrial Control 87 / 95


Digital Control
Inverse Response: When the initial response of a dynamic system is in a
direction opposite to the final outcome, it is called an inverse response.
Obtaining the effective delay (Half rule):

Effective delay =True delay + inverse response time constant(s)


+ half of the largest neglected time constant
+ all smaller higher order time constants

[Skogestad, 2001]

Behzad Samadi (Amirkabir University) Industrial Control 87 / 95


Digital Control
Inverse Response: When the initial response of a dynamic system is in a
direction opposite to the final outcome, it is called an inverse response.
Obtaining the effective delay (Half rule):

Effective delay =True delay + inverse response time constant(s)


+ half of the largest neglected time constant
+ all smaller higher order time constants

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]

Behzad Samadi (Amirkabir University) Industrial Control 87 / 95


Digital Control

Plant transfer function:


Q
j (−Tj0 s + 1) −td s
G (s) = Q e
j (τi0 s + 1)

First order approximation:

e −θs
Ĝ1 (s) =
τs + 1
X τ20 X Ts
θ =td + Tj0 + + τi0 +
2 2
j j≥3
τ20
τ =τ10 +
2
[Skogestad, 2001]

Behzad Samadi (Amirkabir University) Industrial Control 88 / 95


Digital Control

Second order approximation:

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]

Behzad Samadi (Amirkabir University) Industrial Control 89 / 95


Digital Control

Series form of the PID controller:


1
U(s) = Kp (1 + τi s )(1 + τd s)E (s)

Behzad Samadi (Amirkabir University) Industrial Control 90 / 95


Digital Control

Series form of the PID controller:


1
U(s) = Kp (1 + τi s )(1 + τd s)E (s)
1
U(s) = Kp (1 + τi s )(E (s) + τd sE (s))

Behzad Samadi (Amirkabir University) Industrial Control 90 / 95


Digital Control

Series form of the PID controller:


1
U(s) = Kp (1 + τi s )(1 + τd s)E (s)
1
U(s) = Kp (1 + τi s )(E (s) + τd sE (s))
1
U(s) = Kp (1 + τi s )(E (s) − τd sY (s))

Behzad Samadi (Amirkabir University) Industrial Control 90 / 95


Digital Control

Series form of the PID controller:


1
U(s) = Kp (1 + τi s )(1 + τd s)E (s)
1
U(s) = Kp (1 + τi s )(E (s) + τd sE (s))
1
U(s) = Kp (1 + τi s )(E (s) − τd sY (s))
1
U(s) = Kp (1 + τi s )(R(s) − (1 + τd s)Y (s))

Behzad Samadi (Amirkabir University) Industrial Control 90 / 95


Digital Control

Series form of the PID controller:


1
U(s) = Kp (1 + τi s )(1 + τd s)E (s)
1
U(s) = Kp (1 + τi s )(E (s) + τd sE (s))
1
U(s) = Kp (1 + τi s )(E (s) − τd sY (s))
1
U(s) = Kp (1 + τi s )(R(s) − (1 + τd s)Y (s))
1
U(s) = Kp (1 + τi s )Ed (s)

Behzad Samadi (Amirkabir University) Industrial Control 90 / 95


Digital Control

Series form of the PID controller:

Behzad Samadi (Amirkabir University) Industrial Control 91 / 95


Digital Control

Antiwindup digital PID:

public class SimplePID {


private double u,e,v,y;
private double K,Ti,Td,Beta,Tr,N,h;
private double ad,bd;
private double D,I,yOld;
public SimplePID(double nK, double nTi, double NTd,
double nBeta, double nTr, double nN, double nh) {
updateParameters(nK,nTi,nTd,nBeta,nTr,nN,nh);
}

ARTIST Graduate Course on Embedded Control Systems

Behzad Samadi (Amirkabir University) Industrial Control 92 / 95


Digital Control

Antiwindup digital PID:

public void updateParameters(double nK, double nTi,


double NTd, double nBeta, double nTr, double nN,
double nh) {
K = nK; Ti = nTi; Td = nTd; Beta = nBeta;
Tr = nTr
N = nN;
h = nh;
ad = Td / (Td + N*h);
bd = K*ad*N;
}

ARTIST Graduate Course on Embedded Control Systems

Behzad Samadi (Amirkabir University) Industrial Control 93 / 95


Digital Control

Antiwindup digital PID:

public double calculateOutput(double yref, double newY) {


y = newY;
e = yref - y;
D = ad*D - bd*(y - yOld);
v = K*(Beta*yref - y) + I + D;
return v;
}
public void updateState(double u) {
I = I + (K*h/Ti)*e + (h/Tr)*(u - v);
yOld = y;
}
}

ARTIST Graduate Course on Embedded Control Systems

Behzad Samadi (Amirkabir University) Industrial Control 94 / 95


Digital Control
Antiwindup digital PID:
public class Regul extends Thread {
private SimplePID pid;
public Regul() { pid = new SimplePID(1,10,0,1,10,5,0.1); }
public void run() {
// Other stuff
while (true) {
y = getY();
yref = getYref():
u = pid.calculateOutput(yref,y);
u = limit(u);
setU(u);
pid.updateState(u);
// Timing Code
}}}
ARTIST Graduate Course on Embedded Control Systems
Behzad Samadi (Amirkabir University) Industrial Control 95 / 95
Astrom, K. J. and Hagglund, T. (1995).
PID Controllers: Theory, Design, and Tuning.
Instrument Society of America.
Astrom, K. J. and Wittenmark, B. (1996).
Computer-Controlled Systems: Theory and Design.
Prentice Hall, 3 edition.
Chau, P. C. (2002).
Process Control: A First Course with MATLAB (Cambridge Series in
Chemical Engineering).
Cambridge University Press, 1 edition.
Li, Y., Ang, K. H., and Chong, G. C. Y. (2006).
Pid control system analysis and design.
IEEE Control Syst. Mag., 26(1):32–41.
Love, J. (2007).
Process Automation Handbook: A Guide to Theory and Practice.
Springer, 1 edition.

Behzad Samadi (Amirkabir University) Industrial Control 95 / 95


McMillan, G. K. (2001).
Good Tuning: A Pocket Guide.
The Instrumentation, Systems, and Automation Society (ISA).
O’Dwyer (2002).
Handbook of PI & Pid Controller Tuning Rules.
World Scientific Publishing.
Skogestad, S. (2001).
Probably the best simple pid tuning rules in the world.
In AIChE Annual meeting, Reno, NV, USA.
Visioli, A. (2006).
Practical PID Control (Advances in Industrial Control).
Springer, 1 edition.
Woolf, P., editor (2007).
The Michigan Chemical Process Dynamics and Controls Open Text
Book.
Yu, C.-C. (2007).
Behzad Samadi (Amirkabir University) Industrial Control 95 / 95
Autotuning of PID Controllers: A Relay Feedback Approach.
Springer.

Behzad Samadi (Amirkabir University) Industrial Control 95 / 95

Vous aimerez peut-être aussi