Automatic Control – Chapter 4
TRANSFER FUNCTION
Tran Anh Tu – Department of Aeronautics
tran-anh.tu@usth.edu.vn
CONTENTS
01 02 03
Introduction Transfer function Practice with
Matlab / Simulink
2
CONTENTS
01 02 03
Introduction Transfer function Practice with
Matlab / Simulink
3
GETTING STARTED
Previously, you have learnt to model a system using differential equations
𝑀𝑥ሷ + 𝑏𝑥ሶ + 𝑘𝑥 − 𝐹 = 0 𝑀1 𝑥ሷ 1 + 𝜇𝑀1 𝑔𝑥ሶ 1 + 𝑘(𝑥1 − 𝑥2 ) − 𝐹 = 0
𝑀2 𝑥ሷ 2 + 𝜇𝑀2 𝑔𝑥ሶ 2 − 𝑘(𝑥1 − 𝑥2 ) = 0
4
BUT…
How to solve them?
System of second-order DEs Fourth-order DE
𝑀1 𝑥ሷ 1 + 𝜇𝑀1 𝑔𝑥ሶ 1 + 𝑘 𝑥1 − 𝑥2 − 𝐹 = 0 𝑑 4 𝑤(𝑥)
𝐸𝐼 = 𝑞(𝑥)
𝑑𝑥 4
𝑀2 𝑥ሷ 2 + 𝜇𝑀2 𝑔𝑥ሶ 2 − 𝑘(𝑥1 − 𝑥2 ) = 0
(Euler-Bernoulli beam equation)
5
BUT…
High-ordered differential equations are very difficult
to solve, analyze or manipulate
6
HOW TO OVERCOME THIS?
• To avoid complex differential equation, we need other "simpler"
ways to represent the mathematical model
• Two most popular other representations:
o Transfer function
o State space representation
7
MATHEMATICAL MODEL REPRESENTATION
Two most popular representations
Transfer function State-space representation
• Represent model in s-domain • Represent model in time domain
• Classical control theory • Modern control theory
8
MATHEMATICAL MODEL REPRESENTATION
Two most popular representations
Transfer function State-space representation
• Represent model in s-domain • Represent model in time domain
• Classical control theory • Modern control theory
9
CONTENTS
01 02 03
Introduction Transfer function Practice with
Matlab / Simulink
10
ROADMAP TO TRANSFER FUNCTION
FREQUENCY DOMAIN &
FOURIER TRANSFORM TRANSFER FUNCTION
LINEAR TIME-INVARIANT S-DOMAIN & LAPLACE
SYSTEM TRANSFORM
11
ROADMAP TO TRANSFER FUNCTION
FREQUENCY DOMAIN &
FOURIER TRANSFORM TRANSFER FUNCTION
LINEAR TIME-INVARIANT S-DOMAIN & LAPLACE
SYSTEM TRANSFORM
12
LTI SYSTEM – INTRODUCTION
You have a juice making machine which produces juice from fruit
1 orange
100 ml orange juice
(Note: For this example, we assume that the machine runs smoothly all the time)
13
LTI SYSTEM – INTRODUCTION
If you put in 3 oranges, you get 300 ml of orange juice
3 oranges 300 ml orange juice
➢ The machine is said to have homogeneity property
14
HOMOGENEITY
If you scale the input by a, the output will also be scaled by a
h(ax) = a*h(x)
15
LTI SYSTEM – INTRODUCTION
If you put in orange and watermelon, you get the mixture of both fruits!
➢ The machine is said to have superposition property
16
SUPERPOSITION
If you sum multiple separate inputs together, the response will be
the summed outputs of each individual inputs
ℎ 𝑥1 + ℎ 𝑥2 = ℎ(𝑥1 + 𝑥2 )
17
LINEARITY
A system having two properties homogeneity and superposition
is defined as linear system
18
LTI SYSTEM – INTRODUCTION
Regardless of time, the machine always behave the same
➢ The machine is said to have time-invariant property
19
TIME-INVARIANT
If we shift the input by a fixed time T, the output is also
shifted by that fixed time T
y 𝑡 − 𝑇 = ℎ(𝑥(𝑡 − 𝑇))
20
LTI SYSTEM
A system which has linearity and time-invariant property
21
LTI SYSTEM
However, no real physical system in the world is LTI system
So why bother?
22
"Linear systems are important,
because we can solve them"
Richard Feynman, legendary physicist
LTI SYSTEM
• A wide range of real models can be approximated very accurately
using LTI model
• Linearization is popular method in handling non-linear model
24
CHECKPOINT
Which of the following systems are LTI?
Input Output
1 x mx
2 x x2
3 x mx + b
4 θ mglsinθ
5 θ≈0 mglsinθ
6 f(t) df(t) / dt
25
ROADMAP TO TRANSFER FUNCTION
FREQUENCY DOMAIN &
FOURIER TRANSFORM TRANSFER FUNCTION
LINEAR TIME-INVARIANT S-DOMAIN & LAPLACE
SYSTEM TRANSFORM
26
TIME DOMAIN
Analysis of function with respect to time
Function of distance as the man walks
27
TIME DOMAIN
Analysis of function with respect to time
Function of basketball height during a shoot
28
TIME DOMAIN
• Time domain is convenient, because we are familiar with it
• But this is not always the case…
Hitting a mass on a spring with a hammer, assume no energy loss
29
TIME DOMAIN
It's not possible to fully graph this function in time domain
30
TIME DOMAIN
This signal is very difficult to analyze in time domain
31
ALTERNATIVE SOLUTION
To deal with complex sinusoidal signal, we should move out of time domain
32
ALTERNATIVE SOLUTION
This system can be fully characterized
by 3 parameters
• Frequency of the bouncing
• Amplitude of the bouncing
• Phase shift corresponding to the
starting position of the mass
33
ALTERNATIVE SOLUTION
𝑥 = 𝐴𝑐𝑜𝑠(𝜔𝑡 + 𝜙)
• 𝜔= 𝑘 Τ𝑀
• 𝜙 = 𝜋/2
• 𝐴 = 1/ 𝑘𝑀
34
FREQUENCY DOMAIN
If we plot the amplitude and phase with respect to frequency,
the graph looks much simpler
35
FREQUENCY DOMAIN
𝜋 3𝜋
𝑓 𝑡 = 5𝑐𝑜𝑠 2𝑡 + + 2𝑐𝑜𝑠 4.5𝑡 − + 4𝑐𝑜𝑠(3𝑡 + 𝜋)
3 2
36
FREQUENCY DOMAIN
In many case, the input signal is not sinusoidal
Sawtooth function
37
FREQUENCY DOMAIN
• It could still be represented in
frequency domain by converting
the function into infinite number
of sinusoidals, each at different
frequency, amplitude and phase
38
FREQUENCY DOMAIN
(https://youtu.be/r18Gi8lSkfM)
39
FOURIER TRANSFORM
• The transformation from time
domain to frequency domain can be
done using Fourier Transform
∞
𝐹 𝜔 = න 𝑓(𝑡)𝑒 −𝑗𝜔𝑡 𝑑𝑡
−∞
Visual explanation of formula:
• 3Blue1Brown
Josheph Fourier (1768 – 1830) • Eugene Khutoryansky
40
FOURIER TRANSFORM
• We can go back from frequency
domain to time domain using
Inverse Fourier Transform
1 ∞
𝑓 𝑡 = න 𝐹(𝜔)𝑒 𝑗𝜔𝑡 𝑑𝜔
2𝜋 −∞
41
FOURIER TRANSFORM
Note: The frequency domain plot may looks more complicated,
but the analyse and manipulate process are simpler
42
ROADMAP TO TRANSFER FUNCTION
FREQUENCY DOMAIN &
FOURIER TRANSFORM TRANSFER FUNCTION
LINEAR TIME-INVARIANT S-DOMAIN & LAPLACE
SYSTEM TRANSFORM
43
LAPLACE'S IDEA
• Laplace takes the idea of Fourier further:
Decompose time domain signal into both
sinusoidal and exponential function!
• Define s = σ + jω
• Consider est
Pierre-Simon Laplace (1749 – 1827)
44
LAPLACE'S IDEA
𝒆𝒔𝒕 = 𝒆𝝈𝒕 𝒆𝒋𝝎𝒕
• 𝑒 𝜎𝑡 is exponential function that change with σ
• 𝑒 𝑗𝜔𝑡 = cos 𝜔𝑡 + 𝑗𝑠𝑖𝑛 𝜔𝑡 → sinusoidal function
45
WHY IS LAPLACE'S IDEA IMPORTANT?
• A damped harmonic oscillation signal is a combination of sinusoidal
and decay function
SPRING & DAMPER
46
WHY IS LAPLACE'S IDEA IMPORTANT?
➢ By having one mathematical variable that captures both behaviours,
the analysis process would be simplified a lot
SPRING & DAMPER
47
S-DOMAIN AND S-PLANE
48
LAPLACE TRANSFORM
• The transformation from time
domain to s-domain
∞
𝐹 𝑠 = න 𝑓(𝑡)𝑒 −𝑠𝑡 𝑑𝑡
0
Visual explanation of formula:
• Zach Star
• Eugene Khutoryansky
49
LAPLACE TRANSFORM
∞
𝐹 𝑠 = න 𝑓(𝑡)𝑒 −𝑠𝑡 𝑑𝑡
0
• Laplace Transform exists only if the
integral converges
• Region in s-plane in which Laplace
Transform exists is called the Region of
Convergence (ROC)
50
LAPLACE TRANSFORM
• Example: 𝑓(𝑡) = 𝑒 −𝑎𝑡
∞
𝐹 𝑠 = න 𝑒 −𝑎𝑡 𝑒 −𝑠𝑡 𝑑𝑡
0
𝑒 − 𝑠+𝑎 𝑡 ∞ 1
𝐹 𝑠 = ቤ =
− 𝑠+𝑎 0 𝑠+𝑎
(Region of converge: σ + a > 0)
51
LAPLACE TRANSFORM TABLE
No. f(t) F(s) No. f(t) F(s)
𝑎
1 δ(t) 1 7 sin 𝑎𝑡
𝑠 2 + 𝑎2
1 𝑠
2 1 8 cos 𝑎𝑡
𝑠 𝑠 2 + 𝑎2
1 2𝑎𝑠
3 𝑡 9 𝑡 sin 𝑎𝑡
𝑠2 𝑠 2 + 𝑎2 2
𝑛! 𝑠 2 − 𝑎2
4 𝑡𝑛 10 𝑡 cos 𝑎𝑡
𝑠 𝑛+1 𝑠 2 + 𝑎2 2
1 𝑏
5 𝑒 𝑎𝑡 11 𝑒 𝑎𝑡 sin 𝑏𝑡
𝑠−𝑎 (𝑠 − 𝑎)2 + 𝑏2
𝑛! 𝑠−𝑎
6 𝑡 𝑛 𝑒 𝑎𝑡 12 𝑒 𝑎𝑡 cos 𝑏𝑡
(𝑠 − 𝑎)𝑛+1 (𝑠 − 𝑎)2 + 𝑏2
52
LAPLACE TRANSFORM THEOREM
53
LAPLACE TRANSFORM THEOREM
The differentiation and integration theorem are powerful,
since they help to convert differential equation into algebraic equation
𝑑2 𝑦 𝑑𝑦
2
+ 12 + 32𝑦 = 32
𝑑𝑡 𝑑𝑡
2
32
𝑠 𝑌(𝑠) + 12𝑠𝑌(𝑠) + 32𝑌(𝑠) =
𝑠
54
INVERSE LAPLACE TRANSFORM
• The transformation from s-domain
to time domain
1 𝜎+𝑗∞ 𝑠𝑡
𝑓 𝑡 = න 𝑒 𝐹(𝑠)𝑑𝑠
2𝜋𝑗 𝜎−𝑗∞
• Use table in practice!
55
EXAMPLE
1. Find the Laplace Transform of 𝑓 𝑡 = 𝑒 −3𝑡 sin(2𝑡)
2. Find the Inverse Laplace Transform of
4𝑠
F 𝑠 = 4
𝑠 + 2𝑠 2 + 1
56
EXERCISES
1. Find the Laplace transform of 𝑓 𝑡 = 𝑡 2 𝑒 −3𝑡
2. Find the Laplace transform of 𝑓 𝑡 = 4 sin 2𝜋𝑡 − 2cos(𝜋𝑡)
3. Find the inverse Laplace transform of 1/(s+5)2
4. Find the inverse Laplace transform of 3/(s2 + 6s + 12)
57
ILT OF COMPLICATED SYSTEM
• To find the inverse Laplace 𝑠 3 + 2𝑠 2 + 6𝑠 + 7
𝐹 𝑠 =
𝑠2 + 𝑠 + 5
transform of complicated
function, we convert it to a
2
sum of simpler terms 𝐹 𝑠 =𝑠+1+ 2
𝑠 +𝑠+5
• The result is called Partial-
Fraction Expansion 𝑓1 𝑡 =
𝑑δ(𝑡)
+ δ(𝑡) + ℒ −1
2
𝑑𝑡 𝑠2 + 𝑠 + 5
58
PARTIAL FRACTION EXPANSION
Case 1: Roots of Denominator F(s) are real and distinct
2
𝐹 𝑠 =
(𝑠 + 1)(𝑠 + 2)
𝐾1 𝐾2
𝐹 𝑠 = +
𝑠+1 𝑠+2
𝑓 𝑡 = 𝐾1 𝑒 −𝑡 + 𝐾2 𝑒 −2𝑡
59
PARTIAL FRACTION EXPANSION
Case 2: Roots of Denominator F(s) are real and repeated
2
𝐹 𝑠 = 2
(𝑠 + 1) 𝑠 + 2
𝐾1 𝐾2 𝐾3
𝐹 𝑠 = + + 2
𝑠+1 𝑠+2 𝑠+2
𝑓 𝑡 = 𝐾1 𝑒 −𝑡 + 𝐾2 𝑒 −2𝑡 + 𝐾3 𝑡𝑒 −2𝑡
60
PARTIAL FRACTION EXPANSION
Case 3: Roots of Denominator F(s) are complex and imaginary
3
𝐹 𝑠 =
𝑠(𝑠 2 + 2𝑠 + 5)
𝐾1 𝐾2 𝑠 + 𝐾3
𝐹 𝑠 = + 2
𝑠 𝑠 + 2𝑠 + 5
𝐾3 − 𝐾2
𝑓 𝑡 = 𝐾1 + 𝐾2 𝑒 −𝑡 cos 2𝑡 + sin(2𝑡)
2𝐾2
61
EXERCISES
Using Partial Fraction Expansion, find the Inverse Laplace Transform of
following functions:
12
1. 𝐹 𝑠 = 3
𝑠 + 5𝑠 2 + 6𝑠
8
2. 𝐹 𝑠 = 3
𝑠 − 4𝑠 2 + 4𝑠
4
3. 𝐹 𝑠 = 3
𝑠 + 2𝑠 2 + 2𝑠
62
ROADMAP TO TRANSFER FUNCTION
FREQUENCY DOMAIN &
FOURIER TRANSFORM TRANSFER FUNCTION
LINEAR TIME-INVARIANT S-DOMAIN & LAPLACE
SYSTEM TRANSFORM
63
COMMON DEFINITION
For an LTI system, with single input – single output,
initial condition being zero:
Laplace Transform of output
Transfer function =
Laplace Transform of input
Y(s)
X(s) System Y(s) TF =
X(s)
TF
64
EXAMPLE
Let's go back to the car suspension system example
Output (response): position (x(t))
Input: Force
𝑀𝑥(𝑡)
ሷ + 𝑏𝑥(𝑡)
ሶ + 𝑘𝑥(𝑡) − 𝐹 = 0
65
EXAMPLE
Determine the Laplace transform of the system model
f(t) F(s)
F F(s)
𝑀𝑥(𝑡)
ሷ + 𝑏𝑥(𝑡)
ሶ + 𝑘𝑥(𝑡) − 𝐹 = 0
x(t) X(s)
𝑥(𝑡)
ሶ sX(s) – x(0) 𝑀𝑠 2 𝑋(𝑠) + 𝑏𝑠𝑋(𝑠) + 𝑘𝑋(𝑠) − 𝐹(𝑠) = 0
𝑥(𝑡)
ሷ s2X(s) – sx(0) – x(0) (initial condition = 0)
66
EXAMPLE
Find the transfer function of model
𝑀𝑠 2 𝑋(𝑠) + 𝑏𝑠𝑋(𝑠) + 𝑘𝑋(𝑠) − 𝐹(𝑠) = 0
𝑀𝑠 2 + 𝑏𝑠 + 𝑘 𝑋(𝑠) = 𝐹(𝑠)
𝑋(𝑠) 1
𝐺(𝑠) = =
𝐹(𝑠) 𝑀𝑠 2 + 𝑏𝑠 + 𝑘
This function well captures the
dynamic behaviour of the system
67
GENERAL FORM OF TRANSFER FUNCTION
• First form (polynomial):
𝑎0 𝑠 𝑚 + 𝑎1 𝑠 𝑚−1 + ⋯ + 𝑎𝑚−1 𝑠 + 𝑎𝑚
𝐺(𝑠) =
𝑏0 𝑠 𝑛 + 𝑏1 𝑠 𝑛−1 + ⋯ + 𝑏𝑛−1 𝑠 + 𝑏𝑛
• Second form (zero – pole – gain):
𝑠 − 𝑧1 𝑠 − 𝑧2 … (𝑠 − 𝑧𝑚 )
𝐺(𝑠) = 𝐾
𝑠 − 𝑝1 𝑠 − 𝑝2 … (𝑠 − 𝑝𝑛 )
where
• m, n: order of polynomials
• z: zeros of the system
• p: poles of the system
68
POLES AND ZEROS
𝑠(𝑠 + 3)
Give the transfer function 𝐺 𝑠 = 2
𝑠 + 2𝑠 + 5
• Zeros: Values that make numerator equals 0
o s = 0, s = -3
• Poles: Values that make denominator equals 0
o s = -1 + 2j, s = -1 – 2j
3D pole-zero plot
69
POLES AND ZEROS
𝑠(𝑠 + 3)
Give the transfer function 𝐺 𝑠 = 2
𝑠 + 2𝑠 + 5
• Zeros: Values that make numerator equals 0
o s = 0, s = -3
• Poles: Values that make denominator equals 0
o s = -1 + 2j, s = -1 – 2j
2D pole-zero plot
70
CHECKPOINT
Determine the zeros and poles of the following transfer functions
𝑠−1
1. 𝐹 𝑠 =
𝑠+3
𝑠2 + 1
2. 𝐹 𝑠 = 2
𝑠 − 4𝑠 + 4
10
3. 𝐹 𝑠 =
𝑠(𝑠 + 2)
71
CONTENTS
01 02 03
Introduction Transfer function Practice with
Matlab / Simulink
72
MATLAB PRACTICE
Use Matlab to determine:
1. Laplace Transform
2. Partial Fraction Expansion
3. Inverse Laplace Transform
4. Transfer Function
73
SIMULINK PRACTICE
Modeling the transfer function of car suspension system in Simulink
1
𝐻(𝑠) =
𝑀𝑠 2 + 𝑏𝑠 + 𝑘
74
SIMULINK PRACTICE
Follow Tutorial 4.1 to build the model in Simulink
75