08 - Transfer Function - Examples - 040424
08 - Transfer Function - Examples - 040424
𝑦lj 2 − 𝑦lj 1
𝐾=
𝑢lj 2 − 𝑢lj 1
2
2. Order of a transfer function model
Consider a general n-th order, linear ODE:
𝑑𝑛 𝑦 𝑑𝑦 𝑛−1 𝑑𝑦 𝑑𝑚 𝑢
𝑎𝑛 𝑛 + 𝑎𝑛−1 𝑛−1 + ⋯ 𝑎1 + 𝑎0 𝑦 = 𝑏𝑚 𝑚 +
𝑑𝑡 𝑑𝑡 𝑑𝑡 𝑑𝑡
𝑚−1
𝑑 𝑢 𝑑𝑢
𝑏𝑚−1 𝑚−1 + ⋯ + 𝑏1 + 𝑏0 𝑢
𝑑𝑡 𝑑𝑡
Take Laplace transfer, assuming the initial conditions are all zero.
𝑌 𝑠 σ𝑚
𝑖=0 𝑏𝑖 𝑠
𝑖
𝐺 𝑠 = = 𝑛
𝑈 𝑠 σ𝑖=0 𝑎𝑖 𝑠 𝑖
3
3. Additive property
Suppose that an output is influenced by two inputs and that the transfer functions
are known:
𝑌 𝑠 𝑌 𝑠
= 𝐺1 𝑠 and = 𝐺2 𝑠
𝑈1 𝑠 𝑈2 𝑠
𝑌 𝑠 = 𝐺1 𝑠 𝑈1 𝑠 + 𝐺2 𝑠 𝑈2 𝑠
4
4. Multiplicative property
Suppose that :
𝑌 𝑠 𝑈2 𝑠
= 𝐺2 𝑠 and = 𝐺3 𝑠
𝑈2 𝑠 𝑈3 𝑠
Then, 𝑌 𝑠 = 𝐺2 𝑠 𝑈2 𝑠 𝑎𝑛𝑑 𝑈2 𝑠 = 𝐺3 𝑠 𝑈3 𝑠
𝑌 𝑠 = 𝐺2 𝑠 𝐺3 𝑠 𝑈3 𝑠
5
numerator = 1;
denominator = [2,3,1];
sys = tf(numerator,denominator);
yyaxis left
plot(step(sys));
yyaxis right
plot(impulse(sys));
6
numerator = 0.1;
denominator = [1,0.02]; %define the first order transfer function
sys = tf(numerator,denominator); % transfer function
step (sys) % plotting step response
impulse (sys) % plotting impulse response
ramp(sys); % plotting ramp response
transfer_function =
3s-6
-------
s-1
7
function [y,t]=impresp(num,den,tO,dt,tf )
8
#7. The controller is in the forward path, and the closed-loop transfer function
Error signal
𝐸𝑎 𝑠
+ 𝑠+1 𝑈 𝑠 1
𝑌 𝑠
𝑅 𝑠 𝐺𝑐 𝑠 = 𝐺 𝑠 =
- 𝑠+2 500𝑠2
Reference Controller Process
input
Unity feedback
#8. The controller is in the feedback path, and the closed-loop transfer function
𝐸𝑎 𝑠
+ 1
𝑅 𝑠 𝐺 𝑠 = 𝑌 𝑠
- 500𝑠2
Process
𝑠+1
𝐻 𝑠 =
𝑠+2
Controller
9
Negative feedback control system
𝐻 𝑠
ሜ 𝑇𝑖 0 = 𝑇ሜ𝑖 , 𝑄 0 = 𝑄ሜ
𝑇 0 = 𝑇,
0 = 𝑤𝐶 𝑇ሜ𝑖 − 𝑇ሜ + 𝑄ሜ
dT
V C = wC (Ti − T ) + Q (2-36)
Subtraction:
dt
𝑑𝑇
𝑉𝜌𝐶 = 𝑤𝐶 𝑇𝑖 − 𝑇ሜ𝑖 − 𝑇 − 𝑇ሜ + 𝑄 − 𝑄ሜ
𝑑𝑡
12
𝑑𝑇
𝑉𝜌𝐶 = 𝑤𝐶 𝑇𝑖 − 𝑇ሜ𝑖 − 𝑇 − 𝑇ሜ + 𝑄 − 𝑄ሜ
𝑑𝑡
ሜ 𝑇𝑖 0 = 𝑇ሜ𝑖 , 𝑄 0 = 𝑄ሜ
𝑇 0 = 𝑇,
ሜ
𝑇 ′ ≜ 𝑇 − 𝑇, 𝑇𝑖′ ≜ 𝑇𝑖 − 𝑇ሜ𝑖 , 𝑄′ ≜ 𝑄 − 𝑄ሜ
𝑉𝜌𝐶 𝑠𝑇 ′ 𝑠 − 𝑇 ′ 𝑡 = 0 = 𝑤𝐶 𝑇𝑖′ 𝑠 − 𝑇 ′ 𝑠 − 𝑄′ 𝑠
13
𝑉𝜌𝐶 𝑠𝑇 ′ 𝑠 − 𝑇 ′ 𝑡 = 0 = 𝑤𝐶 𝑇𝑖′ 𝑠 − 𝑇 ′ 𝑠 − 𝑄′ 𝑠
𝑇′ 𝑡 = 0 𝑇 ′ ≜ 𝑇 − 𝑇ሜ
𝑇 ′ 0 = 𝑇 0 − 𝑇ሜ
𝑇 0 = 𝑇ሜ 𝑇′ 0 = 0
𝐾 1
𝑇′ 𝑠 = 𝑄′ 𝑠 + 𝑇𝑖′ 𝑠
𝜏𝑠 + 1 𝜏𝑠 + 1
1 𝑉𝜌
𝐾≜ and 𝜏 ≜
𝑤𝐶 𝑤
14
𝐾 1 1 𝑉𝜌
𝑇′ 𝑠 = 𝑄′ 𝑠 + 𝑇𝑖′ 𝑠 𝐾≜ and 𝜏 ≜
𝜏𝑠 + 1 𝜏𝑠 + 1 𝑤𝐶 𝑤
𝑇′ 𝑠 𝐾 𝑇′ 𝑠 1
= =
𝑄′ 𝑠 𝜏𝑠 + 1 𝑇𝑖′ 𝑠 𝜏𝑠 + 1
15
Linear models which can be transformed into Transfer Function models.
The approximate linear models can be obtained analytically by a “Taylor Series Expansion” of
a nonlinear function.
𝑑𝑦 𝜕𝑓 𝜕𝑓 𝑑𝑦 ′ 𝜕𝑓 ′
𝜕𝑓
= 𝑓 𝑦, 𝑢 𝑓 𝑢, 𝑦 = 𝑓 𝑢,lj 𝑦lj + ′
ቚ𝑠 𝑢 + ቚ𝑠 𝑦 ′ = ቚ𝑠 𝑢 + ቚ𝑠 𝑦 ′
𝑑𝑡 𝜕𝑢 𝜕𝑦 𝑑𝑡 𝜕𝑢 𝜕𝑦
16
𝑑ℎ
Mass balance: 𝐴 = 𝑞𝑖 − 𝑞
𝑑𝑡
Valve relation:
A = area, Cv = constant 𝑞 = 𝐶𝑣 ℎ
𝑑ℎ 1 𝐶𝑣
= 𝑞𝑖 − ℎ = 𝑓(ℎ, 𝑞𝑖 )
𝑑𝑡 𝐴 𝐴
with 𝑦 = ℎ and 𝑢 = 𝑞𝑖 .
17
𝑑ℎ′ 𝜕𝑓 𝜕𝑓
= ℎ′ + 𝑞𝑖′
𝑑𝑡 𝜕ℎ 𝑠
𝜕𝑞𝑖 𝑠
where:
𝜕𝑓 𝐶𝑣 𝜕𝑓 1
=− =
𝜕ℎ 𝑠 2𝐴 ℎሜ 𝜕𝑞𝑖 𝑠
𝐴
𝑑ℎ′ 1 ′ 𝐶𝑣
= 𝑞𝑖 − ℎ′
𝑑𝑡 𝐴 2𝐴 ℎሜ
18
Consider a transfer function:
𝑌(𝑠) 𝑑
=
𝑈(𝑠) 𝑏𝑠 + 𝑐
19
Consider the following transfer function:
_
𝑠
𝑌(𝑠) 3𝑒
G(s)= =
𝑈(𝑠) 10𝑠+1
(c) If U(s)=4/s, what is the value of the output y(t) when t goes to infinity?
_
1−𝑒 𝑠
(d) If U(s)= 𝑠 , the unit rectangular pulse, what is the output when t goes to infinity?
(e) If u(t) = d(t), the unit impulse at t=0, what is the output when t goes to infinity?
(f) If u(t)=5sin2t, what is the value of the output when t goes to infinity?
20
The contents of the stirred-tank heating system shown in below figure are heated
at a constant rate of Q (J/s) using a gas fired heater. The flow rate w(g/s) and
volume V (cm3) are constant, but the heat loss to the surroundings QL(J/s) varies
with the wind velocity v ( cm/s) according t the expressions
U(t)=Ū+bv2(t)
QL=UA(T-Ta)
where Ū, A, b, and Ta are constants. Derive the transfer function between exit
temperature T and wind velocity v. List any additional assumptions that you
make.
21