Controller Tuning
Controller Tuning
Week 10
Sayantan Dutta
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)
Allowed
τl
Forbidden
Kc = 100; τl = 0.1
kc
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 ?
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
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
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
∫0
2
[ysp − y(t)] dt ysp(t)
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
∫0
| ysp − y(t) | dt ysp(t)
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)
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
• Controller Design space is multidimensional (i.e. Kc, τl, τD). So, it becomes a
multi-dimensional optimization problem.
• If you are not a regular coder, please look through the Matlab examples we
discussed in the class.
• Please don’t cheat and use generative AI. 2 weeks, 3 students, <100 lines of
codes.
• 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)
•Smaller offset
•Quick Response
• Low Overshoot
•Fewer oscillations
Different quantitative Criterions
• Controller Design space is multidimensional (i.e. Kc, τl, τD). So, it becomes a
multi-dimensional optimization problem.
ȳm(s)
GPRC(s) = Gf (s)Gm(s)Gp(s) =
c̄(s)
ȳm(s)
GPRC(s) = Gf (s)Gm(s)Gp(s) =
c̄(s)
ȳm(s)
GPRC(s) = Gf (s)Gm(s)Gp(s) =
c̄(s)
ȳm(s)
GPRC(s) = Gf (s)Gm(s)Gp(s) =
c̄(s)
K exp(−tds)
GPRC(s) =
τs + 1
k
Gp =
(s + 1)(4s + 1)
kf
Gm = exp(−3s) Gf =
2s + 1
ȳ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)
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
•Smaller offset
•Quick Response
• Low Overshoot
•Fewer oscillations
Different quantitative Criterions
• Controller Design space is multidimensional (i.e. Kc, τl, τD). So, it becomes a
multi-dimensional optimization problem.
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
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
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
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