Automatic Control – Chapter 5
MODELING SYSTEM WITH
TRANSFER FUNCTION
Tran Anh Tu – Department of Aeronautics
[email protected] RECALL: TRANSFER FUNCTION
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
2
RECALL: TRANSFER FUNCTION
Transfer function of a car suspension system
𝑋 𝑠 1
𝐻 𝑠 = =
𝐹 𝑠 𝑀𝑠 2 + 𝑏𝑠 + 𝑘
3
CONTENTS
01 02 03 04
Modeling Modeling Modeling electro- Practice with
mechanical electrical mechanical Matlab /
system system system Simulink
CONTENTS
01 02 03 04
Modeling Modeling Modeling electro- Practice with
mechanical electrical mechanical Matlab /
system system system Simulink
GETTING STARTED
A mechanical system consists of 3
basic types of elements:
1. Inertial element
2. Spring element
3. Damper element
6
MODELING INERTIAL ELEMENT
Element resisting change in state of motion
Translational Rotational
𝑓 = 𝑀𝑥ሷ 𝑇 = 𝐽𝜃ሷ
7
SPRING ELEMENT
• Element design to store energy
• a.k.a. compliant element
Translational spring Torsional spring Diving plank
8
MODELING SPRING ELEMENT
Translational Rotational
𝑓(𝑡) = 𝐾𝑥(𝑡) 𝑇(𝑡) = 𝐾𝜃(𝑡)
9
DAMPER ELEMENT
• Element designed to dissipate energy
• a.k.a. resistive element
Shock absorber Friction between shaft & hub
10
MODELING DAMPER ELEMENT
Translational Rotational
𝑓(𝑡) = 𝑏𝑥(𝑡)
ሶ ሶ
𝑇(𝑡) = 𝑏𝜃(𝑡)
11
EXAMPLE
Find the transfer function between x1 and F, and v1 and F
Procedure:
• Model with differential equations
• Apply Laplace transform and determine transfer function
12
EXAMPLE: TOY TRAIN
• Recall the system of differential equations of the train model
𝑀1 𝑥ሷ 1 + 𝜇𝑀1 𝑔𝑥ሶ1 + 𝑘 𝑥1 − 𝑥2 = 𝐹
𝑀2 𝑥ሷ 2 + 𝜇𝑀2 𝑔𝑥ሶ 2 − 𝑘(𝑥1 − 𝑥2 ) = 0
• Applying Laplace Transform:
𝑀1 𝑠 2 𝑋1 𝑠 + 𝜇𝑀1 𝑔𝑠𝑋1 𝑠 + 𝑘𝑋1 𝑠 − 𝑘𝑋2 (𝑠) = 𝐹(𝑠)
𝑀2 𝑠 2 𝑋2 𝑠 + 𝜇𝑀2 𝑔𝑠𝑋2 𝑠 − 𝑘𝑋1 𝑠 + 𝑘𝑋2 (𝑠) = 0
13
EXAMPLE: TOY TRAIN
• Rearrange to form system of linear equations:
𝑀1 𝑠 2 + 𝜇𝑀1 𝑔𝑠 + 𝑘 𝑋1 𝑠 − 𝑘𝑋2 (𝑠) = 𝐹(𝑠)
−𝑘𝑋1 𝑠 + 𝑀2 𝑠 2 + 𝜇𝑀2 𝑔𝑠 + 𝑘 𝑋2 𝑠 = 0
• Write in simplified form:
𝑎11 𝑋1 𝑠 + 𝑎12 𝑋2 (𝑠) = 𝐹(𝑠)
𝑎21 𝑋1 𝑠 + 𝑎22 𝑋2 𝑠 = 0
𝑋1 (𝑠) 𝐹(𝑠)
𝐴 =
𝑋2 (𝑠) 0
14
EXAMPLE: TOY TRAIN
• To find X1(s)/F(s), solve the system of equations
o Method of substitution
o Elimination
o Cramer's rule
• Using either methods, we get:
Differentiate to find V1/F
𝑋1 (𝑠) 𝑎22 𝑉1 (𝑠) 𝑠𝑋1 (𝑠) 𝑠 ∙ 𝑎22
= = =
𝐹(𝑠) det(𝐴) 𝐹(𝑠) 𝐹(𝑠) det(𝐴)
(In practice, write down the answer in this implicit form, and note down A and a22)
15
EXERCISE 1
Find the transfer function between x2(t) and F(t)
Procedure:
• Model with differential equations and apply Laplace transform
• Determine transfer function using explicit or implicit form
16
EXERCISE 2
Find the transfer function between x2(t) and F(t)
17
CONTENTS
01 02 03 04
Modeling Modeling Modeling electro- Practice with
mechanical electrical mechanical Matlab /
system system system Simulink
GETTING STARTED
Find the relationship between capacitor voltage and input voltage
of the following circuit
19
R, L, C CHARACTERISTICS IN TIME DOMAIN
20
SOLUTION IN TIME DOMAIN
• Applying Kirchoff Voltage Law:
𝑑𝑖 𝑡 1 𝑡
−𝑣 𝑡 + 𝐿 + 𝑅𝑖 𝑡 + න 𝑖 𝜏 𝑑𝜏 = 0
𝑑𝑡 𝐶 0
• Changing variable from current to charge:
𝑑 2 𝑞(𝑡) 𝑑𝑞(𝑡) 1
𝐿 +𝑅 + 𝑞(𝑡) = 𝑣(𝑡)
𝑑𝑡 2 𝑑𝑡 𝐶
• Substituting q(t) = CvC(t):
𝑑 2 𝑣𝐶 (𝑡) 𝑑𝑣𝐶 (𝑡)
𝐿𝐶 + 𝑅𝐶 + 𝑣𝐶 (𝑡) = 𝑣(𝑡)
𝑑𝑡 2 𝑑𝑡
Second-order circuit
21
SOLUTION IN S-DOMAIN
• Taking Laplace Transform:
(𝐿𝐶𝑠 2 + 𝑅𝐶𝑠 + 1)𝑉𝑐 (𝑠) = 𝑉(𝑠)
• Transfer function of the circuit:
𝑉𝑐 (𝑠) 1
𝑇𝐹 = =
𝑉(𝑠) 𝐿𝐶𝑠 2 + 𝑅𝐶𝑠 + 1
1
= 𝐿𝐶
𝑅 1
𝑠2 + 𝑠 +
𝐿 𝐿𝐶
22
MODELING R, L, C IN S-DOMAIN
Differential Laplace
Elements Impedance
equation transform
Resistor (R)
V(t) = i(t)R V(s) = I(s)R Z(s) = R
Inductor (L)
di
V(t) = L V(s) = LsI(s) ZL(s) = Ls
dt
Capacitor (C)
dV 1
i(t) = C I(s) = CsV(s) 𝑍𝐶 (s) =
dt Cs
23
FASTER METHOD IN S-DOMAIN
• Applying Kirchoff Voltage Law:
𝑑𝑖 𝑡 1 𝑡
−𝑣 𝑡 + 𝐿 + 𝑅𝑖 𝑡 + න 𝑖 𝜏 𝑑𝜏 = 0
𝑑𝑡 𝐶 0
• Taking Laplace transform:
1
𝐿𝑠𝐼 𝑠 + 𝑅𝐼 𝑠 + 𝐼 𝑠 = 𝑉 𝑠
𝐶𝑠
1
𝐿𝑠 + 𝑅 + 𝐼(𝑠) = 𝑉 𝑠
𝐶𝑠
24
FASTER METHOD IN S-DOMAIN
• Rewrite:
𝐼(𝑠) 𝐶𝑠
=
𝑉(𝑠) 𝐿𝐶𝑠 2 + 𝑅𝐶𝑠 + 1
• Substitute V(s) = CsI(s):
𝑉𝑐 (𝑠) 1
=
𝑉(𝑠) 𝐿𝐶𝑠 2 + 𝑅𝐶𝑠 + 1
The same result
25
EVEN FASTER METHOD IN S-DOMAIN
• Applying voltage division:
1
𝑉𝐶 (𝑠) 𝑍𝐶 𝐶𝑠
= =
𝑉(𝑠) 𝑅 + 𝑍𝐿 + 𝑍𝐶 𝑅 + 𝐿𝑠 + 1
𝐶𝑠
1
=
𝐿𝐶𝑠 2 + 𝑅𝐶𝑠 + 1
26
NOTE: FREQUENCY DOMAIN VS S-DOMAIN
Impedance in
Differential Impedance in s-
Elements frequency
equation domain
domain
Resistor (R)
V(t) = i(t)R Z=R Z(s) = R
Inductor (L)
di
V(t) = L ZL = jωL ZL(s) = Ls
dt
Capacitor (C) 1
dV 1
i(t) = C 𝑍𝐶 = 𝑍𝐶 (s) =
dt j𝜔C Cs
27
MECHANICAL VS ELECTRICAL SYSTEM
Analogy between electrical and mechanical system
Type of element Mechanical system Electrical system
Inertial Inertia Inductor
Compliant Spring Capacitor
Resistive Damper Resistor
28
EXAMPLE
Find the transfer function TF = I1(s)/V(s) of the following circuit
29
EXAMPLE: CIRCUIT
• Applying Kirchoff Voltage Law and taking Laplace transform:
𝐼1 − 𝐼2
−𝑉 𝑠 + 𝐼1 𝑅 + =0
𝐶𝑠
𝐼2 − 𝐼1
+ 𝐼2 𝐿𝑠 = 0
𝐶𝑠
• Rearrange to create system of linear equations
1 1
𝑅+ 𝐼1 − 𝐼2 = 𝑉(𝑠)
𝐶𝑠 𝐶𝑠
−1 1
𝐼1 + 𝐿𝑠 + 𝐼2 = 0
𝐶𝑠 𝐶𝑠
30
EXAMPLE: CIRCUIT
• Using similar approach as before, determine I1/V(s)
𝐼1 𝑎22
=
𝑉(𝑠) det(𝐴)
where:
1 1
𝑅+ −
∗𝐴 = 𝐶𝑠 𝐶𝑠
−1 1
𝐿𝑠 +
𝐶𝑠 𝐶𝑠
1
∗ 𝑎22 = 𝐿𝑠 +
𝐶𝑠
31
EXERCISE 3
Find the transfer function TF = I2(s)/VS of the following circuit.
32
CONTENTS
01 02 03 04
Modeling Modeling Modeling electro- Practice with
mechanical electrical mechanical Matlab /
system system system Simulink
GETTING STARTED
• Example: Modeling DC motor
• Electrical input (voltage) → mechanical output (rotation angle)
34
GETTING STARTED
Electric motor schematic and block diagram
V(s) System θ(s)
θ(s)
TF =
V(s)
35
MODELING ELECTRIC MOTOR IN TIME DOMAIN
• The torque generated is proportional to
the armature current:
𝑇𝑚 = 𝐾𝑇 𝑖(𝑡)
o KT: motor torque constant
• The motor back-emf is proportional to
the angular velocity of the shaft:
𝑑𝜃
𝑒 = 𝐾𝑒
𝑑𝑡
o Ke: back-emf constant
36
MODELING ELECTRIC MOTOR IN TIME DOMAIN
• Relationship between torque and angle:
𝑑2 𝜃 𝑑𝜃
𝑇 =𝐽 2 +𝑏
𝑑𝑡 𝑑𝑡
• Relationship in armature circuit
𝑑𝑖
𝑉 = 𝑅𝑖 + 𝐿 + 𝑒
𝑑𝑡
37
MODELING ELECTRIC MOTOR IN S-DOMAIN
No. Relationship Time domain s-domain
1 Torque vs current 𝑇 = 𝐾𝑇 𝑖(𝑡) 𝑇(𝑠) = 𝐾𝑇 𝐼 (𝑠)
𝑑𝜃
2 Back-emf vs speed 𝑒 = 𝐾𝑒 𝐸(𝑠) = 𝐾𝑒 𝑠𝜃(𝑠)
𝑑𝑡
3 Torque vs angle 𝑑2 𝜃 𝑑𝜃 𝑇(𝑠) = (𝐽𝑠 2 + 𝑏𝑠)𝜃(𝑠)
𝑇 =𝐽 2 +𝑏
𝑑𝑡 𝑑𝑡
𝑑𝑖
4 Armature circuit 𝑉 = 𝑅𝑖 + 𝐿 + 𝑒 𝑉(𝑠) = 𝑅𝐼(𝑠) + 𝐿𝑠𝐼(𝑠) + 𝐸(𝑠)
𝑑𝑡
38
FIND THE TRANSFER FUNCTION
• Substitute Eq (1) and (3) to (4):
𝑇 𝑠
𝑉 𝑠 = 𝑅 + 𝐿𝑠 + 𝐾𝑒 𝑠𝜃 𝑠 (5)
𝐾𝑇
• Substitute Eq (2) to (5):
𝑅 + 𝐿𝑠 𝐽𝑠 2 + 𝑏𝑠 𝜃(𝑠)
𝑉(𝑠) = + 𝐾𝑒 𝑠𝜃(𝑠) (6)
𝐾𝑇
39
FIND THE TRANSFER FUNCTION
• Rewrite equation (6):
𝑅 + 𝐿𝑠 𝐽𝑠 2 + 𝑏𝑠
𝑉(𝑠) = + 𝐾𝑒 𝑠 𝜃(𝑠)
𝐾𝑇
➢ Transfer function
𝜃(𝑠) 𝐾𝑇
𝑇𝐹 = =
𝑉(𝑠) 𝑠 𝑅 + 𝑠𝐿 𝐽𝑠 + 𝑏 + 𝐾𝑇 𝐾𝑒
40
CONTENTS
01 02 03 04
Modeling Modeling Modeling electro- Practice with
mechanical electrical mechanical Matlab /
system system system Simulink
SIMULINK PRACTICE #1
Model the transfer function between x1 and F, and v1 and F of toy train
Take the value from Tutorial 2.2b
42
SIMULINK PRACTICE #2
Model the transfer function TF = I2(s)/VS of the following circuit.
Take R = 40 Ω, C = 0.01 F, L = 2 H, v(t) = 20sin(5t)
43
SIMULINK PRACTICE #3
Model the transfer function of the DC motor
Take the value from Tutorial 2.3
44