Vous êtes sur la page 1sur 144

PID controllers and tuning

Prof. Cesar de Prada


Dpt. Systems Engineering and Automatic Control
University of Valladolid, Spain
prada@autom.uva.es
http://www.isa.cie.uva.es/~prada/
Outline
• PID controller
• Types of PID controllers
• Tuning criteria
• Ziegler-Nichols methods
• Minimization of the error methods
• Frequency domain methods
• Automatic tuning
Control loop

v DV

w u y
Controller Process
SP MV CV
The PID controller

e( t ) = w( t ) − y( t )
⎛ 1 de ⎞
u( t ) = K p ⎜ e( t ) + ∫ e( τ )dτ + Td ⎟
⎝ Ti dt ⎠

z Signal based controller, no explicit process


knowledge is incorporated
z 3 tuning parameters Kp, Ti, Td
z Many different implementations
Normalised I/O signals
Actuator
w u y
Controller Process
4-20 mA
4-20 mA Transmitter

4-20 mA from
the transmitter
Loop
SP 45
PV 45.5 4-20 mA to the controller
actuator

M
V
38
Two options
Kp % / %
w u
e mA
+
- R Process
%
Ing. % Ing.

% mA

w e u mA
+
- R Process
Ing. %
Ing.
Ing. mA
Kp % / Ing.
Conversion formulas y,w
20 mA 100 %

mA
%
4 mA
0%
y0 y yM y0 y yM

16 100
Span=yM - y0 mA = (y − y0 ) + 4 %= ( y − y0 )
span span
100
%= (mA − 4)
16
Conversion formulas u
20 mA
Actuator
mA u Valve
mA opening in
% %
4 mA u Valve
u% opening in
0% 100 % % %

16
mA = %+4
100
Units
Actuator
W(s) U(s) Y(s)
+
- R(s) Gp(s)
% %
100/span
%
100/span

Input and output regulator signals usually are expressed in


terms of % of transmitter and actuator respectively

Conversion factors in the controller should correspond to the


calibration of the instruments
Loop analysis
Actuator Transmitter
w % u
+
- R Gp
% %
100/span
100/span

%
u
+
- R Ga Gp G t
% % %

%
Dynamics of trasnmitter and actuator must be included if they are
relevant
Análisis del lazo (1)
w % u
+
- R Ga Gp G t
% %
100/span

%
G a G pG t R 100 G a G pG t R 100
Y(s)% = W (s)% Y(s) = W (s)
1 + G a G pG t R span 1 + G a G p G t R span

Ga Ing’/%
Gp Ing/Ing’ La salida es la variable
medida, no la controlada
Gt %/Ing
R %/%
Loop analysis (2)
Ing u
w +
- R(s) Ga Gp
% Ing
Ing
Gx

GaGpR
Y(s) = W (s)
1 + G a G pG x R The process output is
the controlled
Ga Ing’/%
variable
Gp Ing/Ing’
Gx has gain 1 and
Gx adimensional
incorporates the
R % / Ing transmitter dynamics
Flow control loop

w FC
u

a q h

Pump Flowmeter Valve

Flowmeter: 0-50 m3/h 4-20mA


Model
d mv
= A ( Δ p 0 + Δ p b ) − A Δ p v − AfL ρ v 2 − Ah ρ g
dt
1
Δ p v = 2 2 ρ q 2 q = Av
a Cv

d Δq d Δa
τ + Δ q = K 1Δ ( Δ p 0 ) + K 2 Δ a τv + Δa = K v Δu
dt dt

u
a q h

Δpb Δpv
Δp0
Block diagram
ΔP0 K1 100
(τs + 1) 50
Kp % /%
W % u Q
K p (Ti s + 1) Kv K 2 100
2 +
- (τ vs + 1) (τs + 1) 50 +
Ti s
% %
100/span

Transmitter dynamics is not considered


The PID controller

e( t ) = w( t ) − y( t )
⎛ 1 de ⎞
u( t ) = K p ⎜ e( t ) + ∫ e( τ )dτ + Td ⎟
⎝ Ti dt ⎠

z Signal based controller, no explicit process


knowledge is incorporated
z 3 tuning parameters Kp, Ti, Td
z Many different implementations
Digital Control
u(kT)

Computer D/A Process

y(kT)
A/D
T sampling period T

T should be chosen according to the process dynamics, as well as


considering numerical problems in integration and differentiation.
Integration: T≅ 0.1 ...0.3 Ti Differenciation. T≅ 0.2 ...0.6 Td / N
Accuracy in the measurement depends also on the D/A converter
Higher precision in the internal computations than the one of D/A
Discretizing PID controllers
⎛ 1
t
de ⎞
u ( t ) = K p ⎜⎜ e( t ) + ∫ e( τ)dτ + Td ⎟⎟ Rectangular approximation
⎝ Ti 0 dt ⎠
⎛ 1 t e( t ) − e( t − T ) ⎞
u ( t ) ≈ K p ⎜ e( t ) + ∑ e(iT )T + Td ⎟
⎝ Ti i =1 T ⎠
⎛ 1 t −T e ( t − T ) − e ( t − 2T ) ⎞
u ( t − T ) ≈ K p ⎜ e( t − T ) + ∑ e(iT )T + Td ⎟
⎝ Ti i =1 T ⎠
⎛ T e ( t ) − 2e ( t − T ) + e ( t − 2T ) ⎞
u ( t ) − u( t − T ) = K p ⎜ e( t ) − e( t − T ) + e( t ) + Td ⎟
⎝ Ti T ⎠
u ( t ) = u( t − T ) + g 0e( t ) + g1e( t − T ) + g 2 e( t − 2T )
⎛ T T ⎞
g 0 = K p ⎜1 + + d ⎟ g1 = K p ⎛⎜ − 1 − d ⎞⎟ g 2 = K p d
2T T
⎝ Ti T ⎠ ⎝ T ⎠ T
Digital PID
e(t) = w(t) − y(t)
u(t) = u(t − 1) + g0 e(t) + g1e(t − 1) + g2 e(t − 2)

z Many formulas for discretization


z Microprocesor based controller with many
auxiliary functions
z Sampling time T very often fixed in the range
100...200 msg
Implementation
Actuator
w e ⎛ 1 ⎞ u y
+
-
u = K p ⎜ e + ∫ ⎟⎟
⎜ edt Process
⎝ Ti ⎠
y
PI Controller

u ( kT) = u (( k − 1)T) + g 0 e( kT) + g1e(( k − 1)T) Discrete formulation

Microprocessor AO Process
u(kT)

y(kT)
AI
T sampling period T
Implementation
PI Controller
Actuator
w e ⎛ 1 ⎞ u y
+
-
u = K p ⎜⎜ e + ∫ edt ⎟⎟ Process
⎝ Ti ⎠
y

Transmitter
Loop
controller Panel
mounting,
PLC,…
Implementation (DCS)

Operation

4 – 20 mA

Field
Architectures

HART I/O DeviceNet/Profibus

AS-i
H1
Implementation
The PID algorithm is
implemented as software
in the DCS controller
Control
modules
modules

4 – 20 mA Input
/output
modules

Control wardrobe
Control room

Operation
(SCADA)
4 – 20 mA

Field Configuration
(Engineering station)
Operation

Typical
PID face

Typical
operator
screen
Configuration

Forms with
configuration
parameters
Java – Regula / Configuration
• A control system is a set of interconnected
loops
Incomplete Reactant
loops TT
Temp
FC FT
T
Reactor
Coolant
LT
AT AC Comp.

LC Product
Java – Regula / Configuration
• For each loop one should specify:
– Which are its inputs and outputs (w, y, u)
– How the loop is connected to other loops
(cascade, single loop,…)
– Its parameters (Kp, Ti, Td, span, constraints,…)

Referencia Procesador nT Accionador Proceso Salida


digital físico

Captador
Sensor
Java – Regula / Control loop
Referencia
Corrección override

Variable auxiliar
Tratamiento Regla de Control manual
conmutación
de la
Referencia
Corrección feedforward Señal alternativa
Ref1

Error Tratamiento E0 Algoritmo Iu Ue Tratamiento Tratamiento U


del de de la de la
Error Control salida salida

Vfil
Variable controlada

Otros lazos Tratamiento


de
Ajustes Alarmas
Tarjeta E/S
Configuration file
PID parameters
• Kp gain / Proportional term
– % span control / % span controlled variable
– Proportional band PB=100/ Kp
• Ti integral time / Integral term
– minutes o sg. (per repetition) (reset time)
– repetitions per min = 1/ Ti
• Td derivative time / Derivative term
– minutes o sg.
Proportional controller P
u ( t ) = K p e ( t ) + bias

e u

t t

An error of x % creates an action of


Kp x % on the actuator

bias = manual reset (CV = SP)


Direct / Reverse Acting
Type of valve should be
LC
taken into account

LT LC LT

Direct acting controller Kp < 0 Reverse acting controller Kp > 0

u(t)=Kp(w-y) if y increases, then u decreases if Kp is


positive
Proportional action

1500 w e u
+
Kp Ampl.
rpm -

30 %
Ing. M

1500
rpm

There is only an equilibrium


u(t)=Kp e(t) + 30 point with zero error
Proportional action
bias
e +
u Kp w
-

y e(t) = w – y
LT
u(t)=Kp e(t) + bias
Integral action
Kp
Ti ∫ edτ
w e u
1500 +
Kp Ampl.
-
rpm

Ing. M

1500
rpm
adjustable
bias
Kp
∫ edτ
PI
Ti

e +
u Kp w
-

y e(t) = w – y
LT
u(t)=Kp e(t) + bias
Integral action (automatic reset)
w y w
y

t t

u u
Kp
t Ti ∫ edτ t

A P controller does not get The integral term changes


steady zero error with self- continuously the control
regulated processes signal until the error is zero
Integral action
t
Kp
u ( t) = ∫ e ( τ ) dτ
Kp
Ti ∫ edτ
Ti 0

e Si e=cte. e Kp e
t t

Ti = 1 repetition
The integral action will
Kp Kp
equate the proportional one
Ti ∫ edτ = Ti
et = K p e ⇒ t = Ti
in Ti time units if e is
constant (one repetition)
Derivative action
w e u
+
- Kp Ampl.

e = w-y de
KpTd M
dt

The derivative term will smooth sharp changes in the


control signal due to fast changes in the error
e=w-y
Derivative action
w y w
y
e(t) = w(t) − y(t)
⎛ 1 de ⎞
u(t) = K p ⎜⎜ e(t) + ∫ e(τ)dτ + Td ⎟⎟
t ⎝ Ti dt ⎠
t
u u

t
t
A P controller tuned with
high gain in order to get a If e decreases very fast, the
fast process response can derivative term will decrease u,
generate too strong u avoiding oscillations
changes and oscillations
Derivative action
de
u ( t ) = K p Td PD
dt
Kp e

e Si e= a t e Kp Td a
t t

Td

If e changes linearly, the derivative term will equate the


proportional one after Td time units
The derivative action has no influence in the steady state
Derivative action
de
u ( t ) = K p Td
dt
Kp e

e Si e= a t e Kp Td a
t t

Td
After Td time units,
de
derivative and K p Td = K p Td a = K p at ⇒ t = Td
dt
proportional terms will be
equal if e= a.t.
Derivative action
Derivative action
w
y y
w

t t
de
u u ( t ) = K p Td u
dt
t t

Sharp changes in w Noisy process signals lead


cause big changes in u at to fast changing control
the time of change actions u
Ideal PID (non interactive)
t
1 de ( t )
u ( t) = K p ( e( t) +
Ti ∫0 e ( τ ) dτ + Td dt ) e(t) = w(t) - y(t)

Ti s + 1 + Ti Td s 2
U(s) = K p E ( s)
Ti s
I
+ u
e
w + P
-
y D
It is not physically implementable
Very sensitive to noises
Real zeros for Ti > 4Td
Real PID (non interactive)
⎡ 1
t
de f ⎤
u ( t ) = K p ⎢ e ( t ) + ∫ e ( τ ) d τ + Td ⎥
⎣ Ti 0 d t ⎦
Td d e f 1
+ e f = e ( t ) filter in the error E f (s) = E (s)
N dt Td
s +1
N
⎡ 1 sT d ⎤
U(s) = K p ⎢1 + + ⎥ E (s)
⎣ Ts i 1 + sT d N ⎦

Physically implementable
Incorporates a filter in the derivative term
At high frequencies the maximum gain of the D term is Kp N
N : Maximum derivative gain. Typically N=10.
Effect of Filters
Non interactive PID
U( s) =
[
K p 0.1Ti Td s 2 + (Ti + 11 ] E(s)
. Td ) s + 1
Ti s (1 + 0.1Td s)
Position algorithm
E U
PID Proceso

Speed algorithm: formulated in terms of the changes of u


Fits very well with incremental actuators such as
step motors, pulse driven actuators,…
PID (derivative action on y)
t
1 dy f ( t )
u ( t ) = K p ( e( t) + ∫ e( τ ) dτ − Td ) Honeywell type B
Ti 0 dt
dy f ( t )
0.1Td + y f ( t) = y( t)
dt
I
+ u
e
w + P
-
y -D

Used in the DCS


It avoids sharp changes in u when a step change is
given to w e = w -y
PID modified proportional action
⎡ 1
t
d yf ⎤
u ( t ) = K p ⎢ (βw ( t ) − y( t )) +
⎣ Ti ∫0 e( τ ) dτ − Td d t ⎥⎦
The factor β allows to have a certain independence when tuning
The controller against load or set point changes

βI
+ u
e
w I + Kp
-
y -D-1
PID modified proportional action
⎡ 1
t
dy f ⎤
with β = 0 u ( t ) = K p ⎢(− y( t )) + ∫ e(τ)dτ − Td ⎥
⎣ Ti 0 d t ⎦

Honeywell type C

+ u
e
w I + Kp
-
y -D-1
Series or Interactive PID
1 1 + Tdss
U(s) = K ps (1 + )( ) E(s)
Tiss 1 + 01. Tdss

I
w
+ e u
+ + P
-
y D
Series or Interactive PID
1 1 + Tdss
U(s) = K ps (1 + )( ) E(s)
Tiss 1 + 01. Tdss

•Used in the old analog or loop controllers


•Equivalence tables between the parameters of series
and parallel PID types

F=1+Tds/Tis Kp= Kps F; Ti= Tis F; Td = Tds / F

Fs =0.5+(0.25-Td /Ti)0.5 Kps= Kp Fs; Tis = Ti Fs; Td s = Td / Fs


Full parallel PID
t
1 de(t ) e(t) = w(t) - y(t)
Tip ∫0
u(t ) = K pp e(t ) + e( τ)dτ + Tdp
dt
K pp Tip s + 1 + Tip Tdps 2
U(s) = E(s)
Tip s
I
K pp = K p +
u
e P
Kp
w +
1
= -
Tip Ti
y D
Tdp = K p Td
Non linear PID
The gain is modified, so that the action of the controller
is stronger when the error is big and very smooth or
zero when the error is small or there are noises, etc

⎡ 1
t
dy f ⎤
u ( t ) = K pf ( e) ⎢e( t ) + ∫ e( τ)dτ − Td ⎥
⎣ Ti 0 d t ⎦
f ( e) function of the error, e.g. :
f ( e) = α + (1 − α )e with, for instance, α = 0.1
Non linear PID
f(e) Non linear function of the error
Dead zone around e=0
High gain for big |e|
e
F(e) u
PID

There are no changes in u when e is small, (e.g. noises)


Increases the control actions if e is big
Saturation in the instruments

ω
q

4-20 mA

All actuators and transmitters have a limited range of


operation, with its signals been constrained to it (0 - 100 %)
Reset wind-up
PID Process
t
1
u(t) = Kp (e(t) + ∫ e(τ)dτ)
Ti 0

Delay in the actuation of the controller output that appears


when the value of the integral term exceed the allowable
range of the manipulated variable.
The implementation of the so called anti wind-up systems,
avoid the appearance of this phenomenon.
Reset wind-up
Due to the
integral time PID Process

100%
t
1
u u(t) = Kp (e(t) + ∫ e(τ)dτ)
Ti 0

without anti reset


w wind-up

y with anti reset


wind-up
Anti-reset wind up
1
t Key action: Stop the
1. u(t) = Kp (e(t) + ∫ e(τ)dτ) integration if the integral
Ti 0
term exceeds the output
range Actuator range
e v u
Kp +

- +
Kp/Ti + 1/s
ew
2. Tracking: If v >u,
then ew corrects the 1/ Tt
integral term until v = u Tt traking time constant
Anti-reset windup

Kp=4
Ti=1
auto/man transfers

+
auto u
e
w PID
-
y manual

In a auto/man mode transfer u can suffer from strong changes


The controller should operate with smooth auto/man and
man/auto transfers (bumpless)
Changing the value of a parameter should be made without
strong output changes
Bumpless transfers
Smooth man >> auto transfer
1/(1+Tis)
+ auto u
e
w PD +
-
y manual
1
U (s) = U(s) + K p (1 + Td s) E(s)
1 + Ti s
1 + Ti s
U (s) = K p (1 + Td s) E(s) theoretical series PID
Ti s
1
auto = manual + PD auto follows the manual value
1 + Ti s
Man follows the
Bumpless transfers
auto value in +
1/ Tr
automatic mode -
w 1/ Tr + 1/s

PD man
auto u
1/ Ti + 1/s +
e

Auto follows - +
the value man
in manual mode 1/ Tr
ew
PID tuning
• Selection of the PID
parameters in order to obtain
an adequate closed loop
behaviour
• Kp, Ti, Td
• Other parameters: N,Tr, β, T,,
constraints, ...
• Several methods + process
knowledge
• Very important for an
adequate operation of the
factory
Control Pyramid
Operation and control
Economic in a process factory
optimization
are organized in a set
of interacting layers
Advanced
control MPC that provide different
functionalities
PID control / DCS

Field Instrumentation

Process
Control Pyramid
Economic Optimization

SP Temp SP Conc.
u1
u2 MPC
FC

FT

TT AT
Reactant
FC

FT

Reactor
Coolant

Product
Control Hierarchy
Nivel 3 In order to implement solutions at
Optimizació n
Interes econó mico
one level, the lower ones must
operate properly
Nivel 2
Control Avanzado
PID tuning is also important
Nivel 1 because implementing
Control Convencional
PID, DCS
advanced control requires
the correct functioning of
nivel 0
the conventional PID
Instrumentació n controllers
de Campo
When using PID control?
z PID controllers work well with most of the single input
single output (SISO) control problems (flow, pressure,
speed, ...)
z Nevertheless, the PID may not be a good option when
dealing with difficult dynamics or very demanding
specifications:
» Significant delay unstable systems
» Non minimum phase minimum output variance

u t t
Tuning criteria
9Select the type of controller P, PI, PID, PD,
type B, C.. or other controller (DMC, IMC,...)
9Tuning respect to set point or disturbance
changes (w or v)
9Different control aims
9Do not forget the manipulated variable
9Robustness against changes in the process or
the operating point
Controller types
• PID is the right choice in slow processes without
a significant noise, such as temperature,
concentration and, in some cases pressure.
• PI is the preferred choice most of the times
• P is used in processes with an integrator o where a
zero steady state error is not important (e.g.
internal loops in cascades).
• If the process have a significant delay use a Smith
Predictor. Use MPC in multivariable, constraint or
economic important process units.
Tuning: SP or disturbances?
v
w u y
+ R G
-
Proceso

GR 1
y = w + v
1 + GR 1 + GR
If the PID is tuned to obtain a good response against
disturbances, then R is fixed and the dynamical response
with respect to SP is also fixed. And viceversa.
PID: a single degree of freedom
Disturbance / SP

Change
in SP

Disturbance
50 → 52
PID Tuning methods
• Trial and error methods
• Experiment based methods
– Perform an experiment in order to estimate certain
dynamic characteristics of the process
– Compute the tuning parameters using tables or formulas
as a function of the estimated dynamical characteristics
of the process
• Model based analytical methods
• Automatic tuning methods
Trial and Error
w w
y y

1 Increase Kp 2 Increase Td
Start from low Kp, and without integral or
derivative actions
w
y Increase Kp until a nice CV shape response is
obtained without using excessive MV. Do not
consider the steady state error
Increase a bit Td and Kp in order to improve
the response
3 Decrease Ti
Decrease Ti until the steady state error is
cancelled in a sensible time
Ziegler-Nichols methods
•Tuning criterion: ¼ damping against disturbances (QDR)
•Empirically developed for series PID (1942)
•Two methods: Open and closed loop
•Can be applied when 0.15 < d /τ < 0.6 in monotonous
processes
•Provide good starting values that can be fine tuned

y
1
1/4 w
Open and closed loop methods
Closed loop experiment

Controller Process

Open loop experiment

Process
Closed loop Ziegler-Nichols
method
+ u y
w e Kc Process
-
y

Kp is increased
Kc critical gain T until the
T oscillation period stability limit
is reached
Closed loop Ziegler-Nichols
tuning table
Type Gain Kp Integral Derivative
time time
P 0.5 Kc
PI 0.45 Kc T/1.2
Parallel 0.75 Kc T/1.6 T/10
PID
Series PID 0.6 Kc T/2 T/8

Kc critical gain T oscillation period


Ti and Td in the same units as T
Step test Identification
Tangent of maximum slope
y Resting value

Δy
t Κ= Δy/Δu
d τ
− ds
u Ke
Δu
τs + 1
t

Adequate for Ziegler-Nichols


Step test Identification
y
τ = 1.5 (t2 - t1)
0.632Δy d = t2 - τ
Δy
0.283Δy
t Κ= Δy/Δu
t1 t2
− ds
u Ke
Δu
τs + 1
t

Adequate for noisy systems


Open loop Ziegler-Nichols tuning
table
Type Gain Kp Integral Derivative
time time
P τ / (K d)
PI 0.9τ /(K d) 3.33 d
Series PID 1.2τ /(K d) 2 d 0.5 d

K process gain , d delay , τ time constant


Ti and Td in the same units as d
Notice that Ti = 4 Td
When applied to digital controllers, increase d by half a sampling period
Integral of the error minimization

w e u y
PID G(s) +

y
w
min
K p , Ti , Td
∫ f ( e( t ))dt
Numerical minimization
error = f ( Kp , Ti, Td )
Integral of the error minimization
d
w e u K e − ds y
PID +
τs + 1

y
min
K p , Ti , Td
∫ e( t ) dt MIAE


2
min e ( t ) dt MISE
K p , Ti , Td
w
min
K p , Ti , Td
∫ e( t ) tdt MITA E
error = f ( Kp , Ti, Td )
Lopez et al. tuning table
•Developed for Non interactive (parallel) PID (1967)
b
•For disturbance rejection ⎛ d⎞
K p K = a⎜ ⎟
•Tuning criteria: ⎝ τ⎠
Integral of the error minimization:
τ
b
⎛ d⎞
MIAE |e| = a⎜ ⎟
MISE e 2 Ti ⎝ τ⎠
MITAE |e|t b
Td ⎛ ⎞
d
•Based on First order plus delay model = a⎜ ⎟
τ ⎝ τ⎠
•The tables provide the a and b parameters of
the formulas
•Can be applied to monotonous processes with
d/τ<1
Lopez et al. tuning table
Parallel PI controllers
b
⎛ d⎞
Criteria Proportional Integral Derivative
K p K = a⎜ ⎟
⎝ τ⎠
MIAE a=0.984 a=0.608
τ
b
b=-0.986 b=-0.707 ⎛ d⎞
= a⎜ ⎟
MISE a=1.305 a=0.492
Ti ⎝ τ⎠
b=-0.959 b=-0.739
MITAE a=0.859 a=0.674 b
Td ⎛ d⎞
b=-0.977 b=-0.68 = a⎜ ⎟
τ ⎝ τ⎠
K in the same units as Kp
Disturbance rejection tuning
Can be used with monotonous processes with d / τ < 1
When applied to digital controllers, increase d by half a sampling period
Lopez et al. tuning table
Parallel PID controllers
b
⎛ d⎞
Criteria Proportional Integral Derivative K p K = a⎜ ⎟
⎝ τ⎠
MIAE a=1.435 a=0.878 a=0.482
τ
b
b=-0.921 b=-0.749 b=1.137 ⎛ d⎞
= a⎜ ⎟
MISE a=1.495 a=1.101 a=0.560 Ti ⎝ τ⎠
b=-0.945 b=-0.771 b=1.006
b
MITAE a=1.357 a=0.842 a=0.381 Td ⎛ d⎞
b=-0.947 b=-0.738 b=0.995 = a⎜ ⎟
τ ⎝ τ⎠
K in the same units as Kp
Disturbance rejection tuning
Can be used with monotonous processes with d / τ < 1
When applied to digital controllers, increase d by half a sampling period
Integral of the error minimization

w e u K e − ds y
PID +
τs + 1

y
w
min
K p , Ti , Td
∫ e( t ) dt MIAE


2
min e ( t ) dt MISE
K p , Ti , Td

min
K p , Ti , Td
∫ e( t ) tdt MITA E
error = f ( Kp , Ti, Td )
Rovira et al. tuning table
•For non interactive (parallel) PI, PID (1969) b
⎛ d⎞
•For SP following K p K = a⎜ ⎟
⎝ τ⎠
•Tuning criteria:
Minimize the integral of the error: τ ⎛ d⎞
= a⎜ ⎟ + b
MIAE |e| Ti ⎝ τ⎠
MITAE |e|t b
Td ⎛ d⎞
•Based on First order plus delay model = a⎜ ⎟
τ ⎝ τ⎠
•The tables provide the a and b parameters of
the formulas
•Can be applied to monotonous processes with
d/τ<1
Rovira et al. tuning table
Parallel PI
Criteria Proportional Integral Derivative
b
⎛ d⎞
MIAE a=0.758 a=-0.323 K p K = a⎜ ⎟
b=-0.861 b=1.020 ⎝ τ⎠
MITAE a=0.586 a=-0.165 τ ⎛ d⎞
b=-0.916 b=1.030 = a⎜ ⎟ + b
Parallel PID Ti ⎝ τ⎠
b
Td ⎛ d⎞
MIAE a=1.086 a=-0.130 a=0.348 = a⎜ ⎟
b=-0.869 b=0.740 b=0.914 τ ⎝ τ⎠
MITAE a=0.965 a=-0.147 a=0.308
b=-0.855 b=0.796 b=0.929
K in the same units as Kp
Set point following tuning
Can be used with monotonous processes with d / τ < 1
When applied to digital controllers, increase d by half a sampling period
λ Tuning
Type Kp Ti λ recommended
λ>0.2τ always
PI processes 2 λ
2λ > 1.7
with integrator Kλ d
PI 4τ + d d λ
τ+ > 1.7
4 Kλ 4 d

w y λ Desired closed
1
loop time constant
λs + 1

Some rules recommend values of λ higher than the


open loop time constant
Rivera-Morari IMC
Type Kp Ti Td λ recommended
λ>0.2τ always
PI τ τ λ
> 1.7
Kλ d
Improved 2τ + d τ+
d λ
PI > 1.7
2Kλ 2 d
PID 2τ + d d τd λ
τ+ > 0.25
2 K (λ + d ) 2 2τ + d d

w 1 y λ Desired closed
λs + 1 loop time constant
Model:
− 0 . 46 e − 0 .87 s
0 . 96 s + 1

K p = − 1 .7 ,
T i = 1 . 17

Lambda tuning
λ = 1.5
Direct synthesis
w u y
+
- R G

GR
Y(s) = W (s) M(s) = Desired closed
1 + GR loop TF

GR M (s)
M (s) = R (s) =
1 + GR G (s)(1 − M (s))
Direct synthesis of PID controllers
Methodology:
•Start from a low order G(s)
•Choose the desired M(s) as a low order TF
•Compute R(s) and identify the corresponding
PID parameters
1
R (s) =
M (s)
= λs + 1 =
s
=
1
G (s)(1 − M (s)) K (1 − 1 ) K (λs + 1 − 1) Kλ
s λs + 1
1 K P controller
M (s) = G (s) =
λs + 1 s with K = 1/Kλ
p
Direct synthesis of PID controllers
1 K
If: M (s) = G (s) =
λs + 1 τs + 1

1
M (s) λs + 1 τs + 1 τs + 1 τ τs + 1
R (s) = = = = =
G (s)(1 − M (s)) K
(1 −
1
) K ( λ s + 1 − 1) K λ s Kλ τs
τs + 1 λs + 1

K p (Ti s + 1) PI controller with


PI =
Ti s Kp = τ/Kλ Ti = τ
Direct synthesis of PID
controllers
1 K
If: M (s) = G (s) =
λs + 1 ( τ1s + 1)(τ 2 s + 1)
1
M (s) λs + 1 (τ1s + 1)(τ 2 s + 1)
R (s) = = = =
G (s)(1 − M (s)) K
(1 −
1
) K (λs + 1 − 1)
(τ1s + 1)(τ 2 s + 1) λs + 1
(τ1s + 1)(τ 2 s + 1) (τ1 + τ 2 ) (τ1τ 2 s 2 + (τ1 + τ 2 )s + 1)
= =
Kλs Kλ ( τ1 + τ 2 )s

K p (Ti Td s 2 + Ti s + 1) PID controller with


PID ideal =
Ti s Kp = (τ1+ τ2)/Kλ
Ti = τ1+ τ2 Td = τ1τ2
Direct synthesis of PID
controllers
1 Kω 2n
If: M (s) = G (s) = 2
λs + 1 s + 2δω n s + ω 2n
1
M (s) λ s + 1 s 2 + 2δω n s + ω 2n
R (s) = = = =
G (s)(1 − M (s)) Kω n2
1 Kω n (λs + 1 − 1)
2
(1 − )
s 2 + 2δω n s + ω 2n λs + 1
s 2 + 2δω n s + ω 2n s 2 / ω 2n + (2δ / ω n )s + 1
= = =
Kω n λs
2
Kλs
2δ (2δ / ω n )(1 / 2δω n )s 2 + (2δ / ω n )s + 1
=
ω n Kλ (2δ / ω n )s
PID controller with:
K p (Ti Td s 2 + Ti s + 1) 2δ 2δ 1
PID ideal = Kp = Ti = Td =
Ti s ω n Kλ ωn 2δω n
Process/model cancellation
w u y
M (s)
+
-
G (s)(1 − M (s))
Gp

M
Gp
G (1 − M ) G pM G pM
CLTF = = =
1+ Gp
M G (1 − M ) + G p M G + (G p − G )M
G (1 − M )

If, due to the model errors, there is no cancellation


between Gp and G, then the unstable process poles
appear in the closed loop TF !

R (s) =
M (s) Non-minimum phase systems
G (s)(1 − M (s)) give unstable controllers!
Invited Lectures
• 18th May
• Prof. Robin de Keyser, Ghent University,
Belgium
• Design of PID controllers in the frequency
domain
• Automatic tuners
Phase margin

-1 O
Nyquist Diagram
φ
Phase
margin
R(jω)G(jω)
ωf

ωf highest frequency at which R ( jωf )G( jωf ) = 1


φ angle at which arg( R ( jωf )G( jωf ) = − π + φ
Phase margin

w u y
R(s)G(s)

y
The phase margin φ is related to the
overshoot and stability
The frequency ωf is related to the
t speed of response
Design with the phase margin

Compute R(s) in order to obtain


a phase margin of G(jω)R(jω)
-1 O equal to the desired φ at the
desired frequency ωf
φ
ωf G(jω)

G(jω)R(jω) w u y
R(s) G(s)
PID design with phase margin
specifications

-1 O

φ
ωf
G ( jω f ) R ( jω f ) = 1
arg[G ( jω f )R ( jω f )] = −π + φ
G(jω)R(jω)
⎡ 1 Td jω ⎤
R ( jω) = K p ⎢1 + + ⎥
⎣ Ti jω 1 + 0.1Td jω ⎦
PID design with phase margin
specifications
G ( jω f ) R ( jω f ) = 1
arg[G ( jω f )R ( jω f )] = −π + φ
⎡ 1 Td jω ⎤
1 Td jω f 1 R ( jω) = K p ⎢1 + + ⎥
Kp 1+ + = ⎣ T j ω 1 + 0. 1T j ω ⎦
Ti jω f 1 + 0.1Td jω f G ( jω f )
i d

⎡ Td jω f ⎤
⎥ = − π + φ − arg[G ( jω f )]
1
arg ⎢1 + +
⎣ Ti jω f 1 + 0.1Td jω f ⎦
Td = αTi con α = 0......0.25

•Two equations and three unknowns: Kp , Ti , Td


• ωf and φ should be specified
•The solution only exists for a range of values
•Only a point of the Nyquist diagram is required!
PI design with PM specifications
1 1
Kp 1+ =
Ti jω f G ( jω f )
⎡ 1 ⎤
arg ⎢1 + ⎥ = − π + φ − arg[G ( jω f )]
⎣ Ti jω f ⎦

arg ⎢1 +
1 ⎤
⎥ = arg

⎢1 − j
1 ⎤
⎥= θ = π − φ + arg[G ( jω f )]
⎣ Ti j ω f ⎦ ⎣ T ω
i f ⎦
1
= − arctg
1
= −θ Ti =
Ti ω f ω f tg θ
⎛ 1 ⎞
2
cos θ
1+
1
= 1 + ⎜⎜ ⎟⎟ = Kp =
Ti jω f ⎝ Ti ω f ⎠ G ( jω f )
= 1 + tg 2 θ = sec θ
PD design with PM specifications
Td jω f 1
Kp 1+ =
1 + 0.1Td jω f G ( jω f )
⎡ Td jω f ⎤
arg ⎢1 + ⎥ = − π + φ − arg[G ( jω f )]
⎣ 1 + 0.1Td jω f ⎦

−1
⎡ ⎛ Td ω f ⎞
2 ⎤

K p = G ( jω f ) 1 + ⎜⎜ ⎟⎟ ⎥
⎢ ⎝ 1 + 0.1Td ω f ⎠ ⎥
⎣ ⎦
− 1 + 1 − 0.44 tg θ
Td =
0.22ω f tg θ
θ = π − φ − arg(G ( jω f ))
Controller design with phase margin
specifications
y

time

The overshoot decreases with φ


Larger values of ωf give faster responses and more
active control signals
Controller design with phase margin
specifications
The fulfilment of the equations:
G ( j ω f ) R ( jω f ) = 1
arg[G ( jω f )R ( jω f )] = − π + φ
Does not guarantee the closed loop stability!

Notice that the PM is


GR defined as a function of
-1
the highest frequency
φ satisfying |GR| = 1, but
several solutions are
possible
Gain Margin
1
MG =
R ( jωg )G( jωg )
arg( R ( jωg )G( jωg )) = − π
-1
ωg
R(jω)G(jω) MG = maximum factor by
which one can increment
the gain before the closed
loop system becames
w u y unstable
R(s)G(s)
Robustness measurement
Controller design using the GM
Compute R(s) in order to obtain
a given gain margin M at a
-1 O frequency ωg
ωg

G(jω)

G(jω)R(jω)
w u y
R(s) G(s)
Controller design using the GM
1
G ( jω g ) R ( jω g ) =
Mg
[ ]
arg G ( jω g )R ( jω g ) = − π

⎡ 1 Td jω ⎤
R ( jω) = K p ⎢1 + + ⎥
⎣ Ti j ω 1 + 0 . 1Td j ω ⎦

Same design problems as with the PM


Controller design with the PM and
the GM

O 1
-1 G ( jω g ) R ( jω g ) =
ωg Mg
[ ]
arg G ( jω g )R ( jω g ) = − π
φ G(jω)
ωf G( jωf )R ( jωf ) = 1
arg[G( jωf )R ( jωf )] = −π + φ

G(jω)R(jω) ⎡ 1 Td jω ⎤
R ( jω) = K p ⎢1 + + ⎥
⎣ Ti jω 1 + 0.1 Td jω ⎦
Four transfer functions
v

w u y
+ R G +
-
Process

GR 1
y = w + v
1 + GR 1 + GR
Swy Svy
R R
u= w− v
1+ GR 1+ GR
Swu Svu
Control efforts
GR R
S uw = =G = G S uw
1 + GR 1 + GR
GR ( jω) R ( jω)
20 log − 20 log G ( jω) = 20 log
1 + GR ( jω) 1 + GR ( jω)

20log| . | GR
1 + GR
logω

A large bandwith
implies large and G Control efforts
active control efforts
Disturbance rejection
|Svy(jω)| en dB
1
Svy = = ω
1 + GR
1
=
1 + G( jω)R( jω)
if R has integralaction
In a certain range of
if ω → 0 then Svy → 0 frequencies the controller
if ω → ∞ then Svy → 1 can worsen the disturbance
rejection.
It is important to minimize
the maximum|Svy(jω)|
Modulus margin
-1 O − 1 + NM = OM = G( jω)R ( jω)
N NM = 1 + GR = S−vy1

Modulus margin = min |NM|


M
−1
min |NM| = ( max S vy ( jω ) )
−1
Nyquist diagram = S vy ( jω ) ∞

A larger modulus margin improves the disturbance rejection


Controller design with the modulus
margin
max min 1 + G ( jω)R ( jω)
K p , Ti , Td ω

⎡ 1 Td jω ⎤
R ( jω) = K p ⎢1 + + ⎥
⎣ Ti j ω 1 + 0 . 1Td j ω ⎦

Max min optimization oriented to


disturbance rejection
Robustness
v

w u y
+ R G +
-
Proceso

GR 1
y = w + v
1 + GR 1 + GR
How the closed loop dynamics changes when the
process parameters varies?
∂T
Sensibility T = G ∂T T=
GR
∂ G T ∂G 1 + GR
G
Robust design
v

w u y
+ R y=
GR
w+
1
G + v
- 1 + GR 1 + GR
Process = Tw + Sv

G ∂ ⎡ GR ⎤ G (1 + GR ) (1 + GR )R − GRR 1 + GR R 1
= = = = S vy
T ∂G ⎢⎣1 + GR ⎥⎦ GR (1 + GR ) 2 R (1 + GR ) 2 (1 + GR )

G ∂ ⎡ 1 ⎤ G (1 + GR ) (− R ) − GR
⎢ ⎥ = = = −T
S ∂G ⎣1 + GR ⎦ 1 (1 + GR ) 2
(1 + GR )

Sensibility function Svy = sensibility with respect to changes in G


It is important to minimize the errors in the range of frequencies
where the sensibility respect to w or v is higher
Automatic tuning methods
Most of the commercial controllers incorporate some methods
for automatic tuning (most of them autotuning)
Only in a few cases we can found real adaptive control

Autotuning: The tuning procedure starts under operator demand


Adaptive control: The automatic tuner continuously identifies
the process dynamics and readjust the controller parameters if
there is any change
Automatic tuning methods

• Step response
• Relay’s method
• Closed loop response identification (Exact)
• Adaptive control
• Gain scheduling
Step response
When the autotuning function is activated, the controller is
turned into manual mode, then, it generates a step in order
to identify a first order plus delay model from which the
controller parameters are obtained using tuning tables.

e u
PID Process
SIPART (Siemens)
Pre-tuning:
EXACT, Electromax
System analysis with a non linear
block
u
w y
+
- R N G

N: descriptive function: linear approximation of the


non-linear element: relay, saturation, hysteresis, etc.

Characteristic equation: 1+GRN = 0


Descriptive function
+
=
Fourier analysis +

How to compute the frequency response of a non-linear+...


element:
1 Feed the system with a sinusoidal signal of frequency ω
2 Compute the first harmonic of the system output
3 compute the gain and phase shift with respect to the first
harmonic
System analysis with a non linear
block
1+GRN = 0
GR = -1/N -1/N (relay)
Kc
In the Nyquist
diagram wc
analysis, the oscilations
-1/N plot plays
the same role as GR(jω)
the -1 point in
linear systems
Stable
The relay method
When the autotuning function is activated, there is a
switching from the PID to a relay controller that creates
controlled oscillations in the process which are used to
identify some of its dynamic characteristics

e u
PID Process

ECA40 (Satt)
DPR9000 (Fisher)
Astrom, Hagglund 1984
The relay method
T oscillation period
A amplitude of the first harmonic
y
T
w
A
t d
e
Process
-d u
u

t
Other options: relay with hysteresis or
additional loops are added in order to force
the generation of oscillations
The relay method
N relay descriptive
1+GN=0
function
y
T
Kc
A
t wc -1/N

4d
Kc = The oscillations allow to
πA identify a point of the
2π Nyquist diagram
ωc = G(jω)
T
Then the controller is tuning with the phase
margin method
The Exact method
EXact Adaptive Controller Tuning (Foxboro)
9Continuous closed loop tuning
9If the error exceeds a range, then a process identification
procedure based on pattern recognition is started
9The controller computes the new tuning in real time using
modified Ziegler-Nichols tables plus some rules
9The desired dynamics is specified in terms of overshoot and
damping
e
PID Process
Pretuning
with the step
method
Change in w
Exact activation e
y

w NB

y Wmax Disturbance

w
The procedure is activated automatically if the error is outside
the error band NB and the second pick appears before Wmax
sg. after the first one
If no second pick appears before Wmax, the process is
considered a overdamped one
Exact
y
T
E1 E3
w
E2
When the tuning procedure is activated, the exact measure thee
picks E1, E2, E3 as well as its times of ocurrence and uses them
to estimate a process model with:
E3 − E2 E
damping = overshoot = 2
E1 − E 2 E1
Or an overdamped process model
Then modified Ziegler-Nichols tuning rules are applied
Adaptive Control
Estimated Model

Adjustment Identification
New tuning

PID Process

External excitation for identification or conditional activation


The adjustment is activated with a larger temporal scale
Controller supervision / Stability
Adaptive PID
Electromax
Firstloop (First Control)
Identification of a two pole model
PID tuning by pole assignment

Novatune (ABB)
Recursive identification
Tuning by minimum variance control

Wittenmark (1979) Cameron-Seborg (1983)


Radke-Isermann (1987) Vega/Prada (1987)
Planned gain
Adjustment
table New tuning

w
PID Process

The controller parameters are adjusted using a pre-


computed table function of some operating condition:
e.g. the set point value
Kp Gain Scheduling
-1.32

-0.5

130 ºC 145 ºC
SP
Systems with delay

w u y
+
- R Ge-ds

If the delay is higher than the process time constant, the system
is difficult to tune.
The Smith predictor is a controller that improves the time
response of this type of processes. It needs to know the model
Ge-ds
Delays: Smith Predictor

w u y
R Ge-ds

Gm(1-e-ds)

y = Ge −ds u = Ge −ds R [w − y − G m (1 −e −ds )u ] =


= Ge −ds R [w − Ge −ds u − G m (1 −e −ds )u ]
si G = G m y = Ge −ds R [w − Gu ]
Smith Predictor
y =e −ds GR [w − Gu ]

u y
w e-ds
R G

Equivalent diagram

R can be tuned as if there were no delay


Smith Predictor
Kp = 0.4
Ti = 5

with
Smith
predictor

Kp = 1.2
Ti = 5
− 0.46e − 0.87s
0.96s + 1
K p = −1.32, Ti = 0.96 Smith Predictor
Tuning in DCS
There are
applications
to help in the
automatic or
manual tuning
in the DCS

Vous aimerez peut-être aussi