0% found this document useful (0 votes)
12 views83 pages

Controller Tuning

Uploaded by

Vijayalaxmi J
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views83 pages

Controller Tuning

Uploaded by

Vijayalaxmi J
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 83

CL 329: Process Control

Week 10
Sayantan Dutta

Controller tuning techniques


Learning Objectives

• Criteria to evaluate controller performance


• Controller tuning based on process and instrumentation
kinetics.
Recap: a feedback control loop

Closed-loop transfer
function

Gd GpGcGf
ȳ(s) = ¯
d(s) + ȳsp(s)
1 + GpGcGf Gm 1 + GpGcGf Gm
Recap: Control parameters have no physical constrains.
Design of process parameters
have practical constrains (i.e.
physical, economic,
thermodynamic)

Control parameters stay


on the computer. There
is no such constaint.

What should be the control parameters ?


Recap: What should not be the control parameters ?

We can’t let the system become unstable.

When does a system become unstable ?

The transfer function has poles with positive real parts.

We can do Routh-Hurtwitz criterion to see for which


controller parameters system is unstable
What’s the best choice in the “allowed” region ?

Allowed

τl
Forbidden
Kc = 100; τl = 0.1

kc
Revisit: Practice problem done in class
exp(−tds)
Gp(s) =
(s + 1)(2s + 1)

P-only controller with gain kc


Approximate with Pade approximation
What limit does td introduce in the choice of kc for stability ?
How do you interpret the effect of time delay?
9 3 2
6 6+ t
+
2 d
t
4 d
kc > − 1,kc < 1 + , kc <
td 3
2td + 4 td2
Revisit: Practice problem done in class
exp(−tds)
Gp(s) =
(s + 1)(2s + 1)

6 6+ 9
t
2 d
+ 3 2
t
4 d
5
6 + 2 td 6
4
6 + 12 td
kc > − 1,kc < 1 + , kc < =1+ =1+ −
td 2td +
3 2
t
4 d
3 2
2td + 4 td td 3 2
2td + 4 td
What should be the control parameters ?
What do we want out of the control system ?

•Come to the desired level of operation as soon as possible.


•Come to the desired level of operation as accurately as possible.
• Keep the maximum deviation as small as possible.
•Come to the desired level of operation and stay close to it as
soon as possible.
Let’s think about servo problem for first order process
P-only controller PI controller PI controller
Smaller τl higher τl

t t
Fast Faster No overshoot
But necessary offset But high overshoot Very slow
Different Criterions

•Smaller offset
•Quick Response
• Low Overshoot
•Fewer oscillations
Single (few) point based criterion
We need some quantitative metric to compare all the responses

ysp(t)

We need to optimize such that the deviation from the set point is minimal.
What should be the objective function for optimization ?
Lowest Offset

Lowest offset
| ysp − yss(t) |
ysp(t)
The only criterion for P-only controller
Does’t take care of dynamics
All PI controller becomes equal

We need to optimize such that the deviation from the set point is minimal.
What should be the objective function for optimization ?
We need some quantitative metric to compare all the responses

Quickest Rise time

Favours responses with oscillation


ysp(t)
Discounts the overdamped responses

We need to optimize such that the deviation from the set point is minimal.
What should be the objective function for optimization ?
We need some quantitative metric to compare all the responses

Smallest overshoot

Favours slow responsed


ysp(t)
Encourages the overdamped responses

We need to optimize such that the deviation from the set point is minimal.
What should be the objective function for optimization ?
One quarter decay ratio

High ζ, slow response.


ysp(t)
Small ζ, too much oscillation y(t)
x(t)
Is there a optimum ζ ?
y(t2) − y(∞)
( 1 − ζ2 ) 4
2πζ 1
= exp − =
y(tp) − y(∞)
t
ζ = 0.2155

No rigorous proof. Engineer’s


experience!!
Trajectory based criterion
We need some quantitative metric to compare all the responses

Integral of squared error (ISE)


∫0
2
[ysp − y(t)] dt ysp(t)

Small persistant fluctuations (errors)


are weighted less.

We need to optimize such that the deviation from the set point is minimum.
What should be the objective function for optimization ?
We need some quantitative metric to compare all the responses

Integral of absolute error (IAE)


∫0
| ysp − y(t) | dt ysp(t)

Penalises persistent small errors.

We need to optimize such that the deviation from the set point is minimum.
What should be the objective function for optimization ?
We need some quantitative metric to compare all the responses
Integral of time weighted
absolute error (ITAE)

∫0
t | ysp − y(t) | dt ysp(t)

Penalises long term errors.

We need to optimize such that the deviation from the set point is minimum.
What should be the objective function for optimization ?
Practice problem
Practice problem

Could we use ISE here ?


However in reality

• Processes are higher order.

• Controller Design space is multidimensional (i.e. Kc, τl, τD). So, it becomes a
multi-dimensional optimization problem.

• Often the process models are unknown.


Coding Assignment
Coding Assignment

Same problem as quiz 1.


3
Except yA = keq xA
Coding Assignment
• Please follow the step-by-step instruction. It’s not about getting the plots
anyway. It’s about getting to the plots in a specific way.

• If you are not a regular coder, please look through the Matlab examples we
discussed in the class.

• MATLAB is highly recommended. If you must use python, the alternative to


ode45 is scipy.integrate.RK45. We won’t be accepting any other language. If you
are a C/C++ speaker, Matlab will be very easy to adapt.

• Please don’t cheat and use generative AI. 2 weeks, 3 students, <100 lines of
codes.

• If we catch malpractice, we will award zero to the whole group.


Logistics of the course.

• I heard most of you prefer the quiz grade to be the best of 2. Let me know if
that’s not the case.

• I planned for the second quiz to be on 4th of November. But I heard that there is
a conflict. What are the alternatives ? How about evenings of 5th, 6th or 7th
November (5:30-6:30) ? Any preference ?

• If you would like to come for the office hour this week, please come after 5 pm.
• Any other comment ?
Lecture 2
Recap: Control parameters have no physical constrains.
Design of process parameters
have practical constrains (i.e.
physical, economic,
thermodynamic)

Control parameters stay


on the computer. There
is no such constaint.

What should be the control parameters ?


What should be the control parameters ?
Different Criterions

•Smaller offset
•Quick Response
• Low Overshoot
•Fewer oscillations
Different quantitative Criterions

•Integral Absolute error (IAE)


• Integral Squared Error (ISE)
•Integral Time-averaged Absolute Error (ITAE)
•One quarter decay ratio.
However in reality

• Processes are higher order.

• Controller Design space is multidimensional (i.e. Kc, τl, τD). So, it becomes a
multi-dimensional optimization problem.

• Often the process models are unknown.


What are the rules used in controller design ?
Process Reaction curve

What is the best controller parameter for a given process


and instrumentation parameter ?
Process Reaction curve

ȳm(s)
GPRC(s) = Gf (s)Gm(s)Gp(s) =
c̄(s)

Let’s remove the controller and see what’s given to us


This is all the other transfer functions together.
What does it physically mean ?
Process Reaction curve

ȳm(s)
GPRC(s) = Gf (s)Gm(s)Gp(s) =
c̄(s)

What does it physically mean ?


If you turn the knob of the final control element (eg.
valve) what will happen to the measured output ?
Process Reaction curve

ȳm(s)
GPRC(s) = Gf (s)Gm(s)Gp(s) =
c̄(s)

This is generally a couple of first order and time delay


process in series.
Higher order Gp are also generally first order processes in series.
A generic form for process reaction curve

ȳm(s)
GPRC(s) = Gf (s)Gm(s)Gp(s) =
c̄(s)
K exp(−tds)
GPRC(s) =
τs + 1

First order plus time delay (FOPTD) model.


Expressing PRC to the generic from

k
Gp =
(s + 1)(4s + 1)
kf
Gm = exp(−3s) Gf =
2s + 1

You may use Taylor Series or Skogestad’s half rule

When the models are known


Expressing PRC to the generic from

ȳm(s)
GPRC(s) = Gf (s)Gm(s)Gp(s) =
c̄(s)
When the models are unknown
How do you find it?
Expressing PRC to the generic from

ȳm(s)
GPRC(s) = Gf (s)Gm(s)Gp(s) =
c̄(s)
When the models are unknown
How do you find it?
By doing experiments!! Literally by turning the knob (i.e. giving a
step input) and measuring the output.
Expressing PRC to the generic from

y(t) Ideal
scenario

t
When the models are unknown
By doing experiments!! Literally by turning the knob (i.e. giving a
step input) and measuring the output.
Expressing PRC to the generic from

Ideal Real
y(t)
response response

t t
When the models are unknown
How do we find K, τ, td?
Expressing PRC to the generic from

Ideal Real
y(t)
response response

t t
When the models are unknown
How do we find K, τ, td?
In 2024, we would answer “by fitting in a computer”
Expressing PRC to the generic from

Ideal Real
y(t)
response response

t t
When the models are unknown
How do we find K, τ, td?
In 2024, we would answer “by fitting in a computer”
Expressing PRC to the generic from

Ideal Real
y(t)
response response

t t
In 2024, we would answer “by fitting in a computer”
However the tuning techniques are there from 1940s and before
At that time
What is common between these two graphs ?

How do we find
Ideal Real K, τ, td?
y(t)
response response c(t) = AH(t)

t t ȳm(s) K exp(−tds)
GPRC(s) = =
1. Start from 0 and saturates at a value. c̄(s) τs + 1
2. Slope is zero initially and finally. It’s non-monotonic in the mean time with a maximum.
We need to find the parameters by comparing features

Ideal
y(t) Real
response
response

t
t
How do we find K, τ, td?
ȳm(s) K exp(−tds)
c(t) = AH(t) GPRC(s) = = y(t) = AK[1 − exp( − (t − td)s/τ)]H(t − td)
c̄(s) τs + 1
We need to find the parameters by comparing features
How do we find K, τ, td?

Ideal
y(t) Real
response
response

t
t
y(t) = AK[1 − exp( − (t − td)s/τ)]H(t − td)

B
Saturation (maximum) value B = AK ⟹ K =
A
We need to find the parameters by comparing features
How do we find K, τ, td?

B
τ= Ideal
y(t) S Real
response
response
AK
S=
τ
t
t
y(t) = AK[1 − exp( − (t − td)s/τ)]H(t − td)
Maximum slope occurs when first order process takes over the time-delay process
Slope is maximum. Double derivative is zero. Inflexion point.
Easy to find from numerically calculating the difference of consecutive points.
We need to find the parameters by comparing features
How do we find K, τ, td?

B
τ= Ideal
y(t) S Real
response
response
AK
S=
τ
t
t
y(t) = AK[1 − exp( − (t − td)s/τ)]H(t − td)
We find td by finding the point where the tangent at inflection point hits the time axis
y′m
Inflection point: {t′, y′m} slope=S td = t′ −

s



Let’s take an example
Approximating the PRC parameters

k1 k2
Gp(s) = Gf (s) = Gm(s) = 1
τ1s + 1 τ2s + 1

Approximate the PRC as FOPTD process using Taylor series and Skogestad’s half rule
τ1 > τ2
Approximating the PRC parameters

k1 k2
Gp(s) = Gf (s) = Gm(s) = 1
τ1s + 1 τ2s + 1

Approximate the PRC as FOPTD process using Taylor series and Skogestad’s half rule
τ1 > τ2
Taylor Series
k1k2 exp(−τ2s) K = k1k2; τ = τ1; td = τ2
GPRC(s) ∼
(τ1s + 1)

Skogestad’s half rule


k1k2 exp(−0.5τ2s) K = k1k2; τ = τ1 + 0.5τ2; td = 0.5τ2
GPRC(s) ∼
(τ1 + 0.5τ2)s + 1
Approximating the PRC parameters

k1 k2
Gp(s) = Gf (s) = Gm(s) = 1
τ1s + 1 τ2s + 1

Approximate the PRC as FOPTD process using Taylor series and Skogestad’s half rule
τ1 > τ2
Now consider you don’t know the model before hand. You find the dynamic response by
experiment (we derived in week 6). Estimate the parameters.

k1k2
Gprc(s) =
(τ1s + 1)(τ2s + 1)

c(t) = AH(t)
Approximating the PRC parameters

k1 k2
Gp(s) = Gf (s) = Gm(s) = 1
τ1s + 1 τ2s + 1

Approximate the PRC as FOPTD process using Taylor series and Skogestad’s half rule
τ1 > τ2
Now consider you don’t know the model before hand. You find the dynamic response by
experiment (we derived in week 6). Estimate the parameters.

k1k2
[ ]
p2 exp(p1t) − p1 exp(p2t)
Gprc(s) = ym(t) = Ak1k2 1 −
(τ1s + 1)(τ2s + 1) p2 − p1

c(t) = AH(t) 1 1
p1 = − p2 = −
τ1 τ2
Approximating the PRC parameters

[ ]
p2 exp(p1t) − p1 exp(p2t) −1 −1
ym(t) = Ak1k2 1 − p1 = p2 =
p2 − p1 τ1 τ2
B
Saturation (maximum) value B = Ak1k2 ⟹ K = = k1k2
A
Inflection point
[ ]
2
d y p2 exp(p1t′) − p1 exp(p2t′)
y′m = Ak1k2 1 −
= 0 p2 − p1
dt 2
d

[ ]
[exp(p2t) − exp(p1t)] = 0 exp(p1t′) − exp(p2t′)
dt S = Ak1k2 −p1p2
p2 − p1
p2 exp(p2t) − p1 exp(p1t) = 0

[ ]
−1
p1 exp(p1t′) − exp(p2t′)
exp[(p2 − p1)t] =
p2 τ = −p1p2
p2 − p1
ln(p1 /p2) τ1τ2 ln(τ1 /τ2)
t′ = = y′m
p2 − p1 τ1 − τ2 td = t′ −
s










Comparison from different methods

τ1 τ2 τ τ td td
In ection In ection
Taylor Skogestad Taylor Skogestad
Point Point

1.2 1 1.2 1.7 2.98 1 0.5 0.3079

5 1 5 5.5 7.4767 1 0.5 0.5351

10 1 10 10.5 12.5155 1 0.5 0.6429


fl
fl
How do we find controller parameters after this ?

Emperical Tuning techniques


Cohen-Coon Technique
If,
Cohen-Coon Technique
If,

• Gain reduces as you increase more


and more process
• Parameter(s) become undefined for
a zero time delay process.
https://asmedigitalcollection.asme.org/ uidsengineering/article/75/5/827/1145041/
Theoretical-Consideration-of-Retarded-Control
fl
Lecture 3
What should be the control parameters ?
Different Criterions

•Smaller offset
•Quick Response
• Low Overshoot
•Fewer oscillations
Different quantitative Criterions

•Integral Absolute error (IAE)


• Integral Squared Error (ISE)
•Integral Time-averaged Absolute Error (ITAE)
•One quarter decay ratio.
However in reality

• Processes are higher order.

• Controller Design space is multidimensional (i.e. Kc, τl, τD). So, it becomes a
multi-dimensional optimization problem.

• Often the process models are unknown.


What is common between these two graphs ?

How do we find
Ideal Real K, τ, td?
y(t)
response response c(t) = AH(t)

t t ȳm(s) K exp(−tds)
GPRC(s) = =
1. Start from 0 and saturates at a value. c̄(s) τs + 1
2. Slope is zero initially and finally. It’s non-monotonic in the mean time with a maximum.
Cohen-Coon Technique
If,
Ziegler-Nichols open loop Technique

PI

PID
Ziegler-Nichols open loop Technique
If,

KC τl τd
τ
P Based on one-
td
quarter
0.9τ td
PI decay ratio
td 0.3

PID 1.2τ 2td 0.5td


td
Direct synthesis method
Direct synthesis method
Gd GpGcGf
ȳ(s) = ¯
d(s) + ȳsp(s)
1 + GpGcGf Gm 1 + GpGcGf Gm

So far, we were looking at the forward problem. Given a functional form of Gc(s), what’s the
response of ȳ(s)?

We may ask the inverse question too!! Given a ȳ(s), what’s the required Gc(s)?
Direct synthesis method
Gd GpGcGf
ȳ(s) = ¯
d(s) + ȳsp(s)
1 + GpGcGf Gm 1 + GpGcGf Gm

Can we design an ideal feedback controller ? (i.e. ȳ(s) = ȳsp(s))


kp
Gp = Gf = Gm = 1
τps + 1
Direct synthesis method
Gd GpGcGf
ȳ(s) = ¯
d(s) + ȳsp(s)
1 + GpGcGf Gm 1 + GpGcGf Gm

Can we design an ideal feedback controller ? (i.e. ȳ(s) = ȳsp(s))


kp
Gp = Gf = Gm = 1
τps + 1
GpGc
=1 Gc = ∞
1 + GpGc

It’s physically (mathematically) impossible to design a feedback controller without any delay.
Direct synthesis method
Gd GpGcGf
ȳ(s) = ¯
d(s) + ȳsp(s)
1 + GpGcGf Gm 1 + GpGcGf Gm

Also it’s impossible to design controller with arbritary Gc

There is no numerical definition of inverse Laplace transform.

It has to be ratio of polynomials and pure exponentials.


Practice problem
10
Gp =
(12s + 1)(3s + 1)

Gf = Gm = 1

ȳsp(s)
You want to design a controller that gives you ȳ(s) =
5s + 1
Is It physically realizable ?
Practice problem
10
Gp =
(12s + 1)(3s + 1)

Gf = Gm = 1
ȳsp(s)
You want to design a controller that gives you ȳ(s) =
5s + 1
1 (12s + 1)(3s + 1)
GpGc 1 Gc = =
= 5sGp 50s
1 + GpGc 5s + 1 36 3 1
= s+ +
50 10 50s
1 + GpGc = (1 + 5s)GpGc
PID controller with Kc = 0.3,τl = 15,τd = 2.4
More practice problems
IV.36, IV. 42, IV.43, IV.49

From Stephanopoulos textbook


We will also discuss frequency response on Thursday 10/10.

You might also like