Lab 03 Feedback E20180779 Phon Lundy Pov Punleu
Lab 03 Feedback E20180779 Phon Lundy Pov Punleu
Lab 03 Feedback E20180779 Phon Lundy Pov Punleu
Lecture by
CHRIN PHOK
CHUM PHARINO
Prepared by students:
Class of 2021-2022
Contents
1
Experiment No.3: Mathematical Modeling of
Physical System
Objective
𝑑𝑑𝑥𝑥2
= 𝑎𝑎21 𝑥𝑥2 + 𝑎𝑎22 𝑥𝑥2 + 𝑏𝑏2 𝑣𝑣(𝑡𝑡) (2)
𝑑𝑑𝑑𝑑
Where 𝑥𝑥1 . 𝑥𝑥2 are the state variables. If there is single output, the output equation
could take on the following form:
𝑦𝑦 = 𝑐𝑐1 𝑥𝑥1 + 𝑐𝑐2 𝑥𝑥2 + 𝑏𝑏2 𝑣𝑣(𝑡𝑡) (3)
The choice of state variables for a given system is not unique. The requirement in
choosing the state variables is that they be linearly independent and that a minimum
number of them be chosen.
A system is represented in state space and a state vector space by the following
equations:
𝐱𝐱̇ = 𝐀𝐀𝐀𝐀 + 𝐁𝐁𝐁𝐁 (4)
𝐲𝐲 = 𝐂𝐂𝐂𝐂 + 𝐃𝐃𝐃𝐃 (5)
• 𝐀𝐀 is system matrix. , [𝑛𝑛 × 𝑛𝑛] matrix
• 𝐁𝐁 is input matrix. , [𝑛𝑛 × 𝑚𝑚] matrix
• 𝐂𝐂 is output matrix. , [𝑚𝑚 × 𝑛𝑛] matrix
• 𝐃𝐃 is feedforward matrix. , [𝑚𝑚 × 𝑚𝑚] matrix
Note: 𝑛𝑛 is the number of inputs variables, 𝑚𝑚 is the number of output variables.
2
Reference Formula
Video Material:
• How does an Electric Motor Work? (DC Motor):
https://youtu.be/CWulQ1ZSE3c%20
Formula:
1 1 𝑑𝑑𝑑𝑑(𝑡𝑡) 1 1
𝑣𝑣(𝑡𝑡) = � 𝑖𝑖(𝜏𝜏 )𝑑𝑑𝑑𝑑 𝑖𝑖(𝑡𝑡) = 𝐶𝐶 𝑣𝑣(𝑡𝑡) = 𝑞𝑞(𝑡𝑡) 𝐶𝐶𝐶𝐶
Capacitor
𝐶𝐶 0 𝑑𝑑𝑑𝑑 𝐶𝐶 𝐶𝐶𝐶𝐶
1 𝑑𝑑𝑑𝑑(𝑡𝑡) 1
𝑣𝑣(𝑡𝑡) = 𝑅𝑅𝑅𝑅(𝑡𝑡) 𝑖𝑖(𝑡𝑡) = 𝑣𝑣(𝑡𝑡) 𝑣𝑣(𝑡𝑡) = 𝑅𝑅 𝑅𝑅 = 𝐺𝐺
Resistor 𝑅𝑅 𝑑𝑑𝑑𝑑 𝑅𝑅
Note: The following set of symbols and units is used through this book:
𝑣𝑣(𝑡𝑡) = 𝑉𝑉 (𝑉𝑉𝑉𝑉𝑉𝑉𝑉𝑉𝑉𝑉), 𝑖𝑖(𝑡𝑡) = 𝐴𝐴(𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴), 𝑞𝑞(𝑡𝑡) = 𝑄𝑄(𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶), 𝐶𝐶 = 𝐹𝐹 (𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹𝐹),
𝑅𝑅 = Ω(𝑂𝑂ℎ𝑚𝑚𝑚𝑚), 𝐺𝐺 = Ω(𝑀𝑀𝑀𝑀𝑀𝑀), 𝐿𝐿 = 𝐻𝐻(𝐻𝐻𝐻𝐻𝐻𝐻𝐻𝐻𝐻𝐻𝐻𝐻𝐻𝐻).
Impedance
Component Force-velocity Force-displacement
𝒁𝒁𝑴𝑴 (𝒔𝒔) = 𝑭𝑭 (𝒔𝒔)⁄𝑿𝑿(𝒔𝒔)
Spring
x(t) 𝑡𝑡
𝑓𝑓(𝑡𝑡) = 𝐾𝐾 � 𝑣𝑣(𝜏𝜏 )𝑑𝑑𝑑𝑑 𝑓𝑓(𝑡𝑡) = 𝐾𝐾𝐾𝐾(𝑡𝑡) 𝐾𝐾
f(t) 0
K
Viscous damper
x(t)
𝑑𝑑𝑑𝑑(𝑡𝑡)
𝑓𝑓(𝑡𝑡) = 𝑓𝑓𝑣𝑣 𝑣𝑣(𝑡𝑡) 𝑓𝑓(𝑡𝑡) = 𝑓𝑓𝑣𝑣 𝑓𝑓𝑣𝑣 𝑠𝑠
f(t) 𝑑𝑑𝑑𝑑
fv
3
M ass
x(t)
𝑑𝑑𝑑𝑑(𝑡𝑡) 𝑑𝑑2 𝑥𝑥(𝑡𝑡)
𝑓𝑓(𝑡𝑡) = 𝑀𝑀 𝑓𝑓(𝑡𝑡) = 𝑀𝑀 𝑀𝑀𝑠𝑠2
M f(t)
𝑑𝑑𝑑𝑑 𝑑𝑑𝑡𝑡2
Note: The following set of symbols and units is used through this book:
𝑓𝑓(𝑡𝑡) = 𝑁𝑁 (𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁), 𝑥𝑥(𝑡𝑡) = 𝑚𝑚(𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀), 𝑣𝑣(𝑡𝑡) = 𝑚𝑚/𝑠𝑠(𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀/𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠),
𝐾𝐾 = 𝑁𝑁 /𝑚𝑚(𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁/𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚), 𝑓𝑓𝑣𝑣 = N − 𝑠𝑠/𝑚𝑚(𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁 − 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠/𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚),
𝑀𝑀 = kg(𝐾𝐾𝐾𝐾𝐾𝐾𝐾𝐾𝐾𝐾𝐾𝐾𝐾𝐾𝐾𝐾𝐾𝐾 = 𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁 = 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠2 /𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚).
θ(t) 1
𝑣𝑣(𝑡𝑡) = 𝑅𝑅𝑅𝑅(𝑡𝑡) 𝑖𝑖(𝑡𝑡) = 𝑣𝑣(𝑡𝑡) 𝐷𝐷𝐷𝐷
𝑅𝑅
D T(t)
Inertia
θ(t) 𝑑𝑑𝑑𝑑(𝑡𝑡) 1 1
𝑣𝑣(𝑡𝑡) = 𝐿𝐿 𝑖𝑖(𝑡𝑡) = � 𝑣𝑣(𝜏𝜏 )𝑑𝑑𝑑𝑑 𝐽𝐽 𝑠𝑠2
𝑑𝑑𝑑𝑑 𝐿𝐿 0
J T(t)
Note: The following set of symbols and units is used through this book:
𝑇𝑇 (𝑡𝑡) = N − m(𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁 − 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚), 𝜃𝜃(𝑡𝑡) = 𝑟𝑟𝑟𝑟𝑟𝑟(𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅),
𝜔𝜔(𝑡𝑡) = 𝑟𝑟𝑟𝑟𝑟𝑟(𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅/𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠), 𝐾𝐾 = N − m/rad(𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁 − 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚/𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟),
𝐷𝐷 = N − m − s/rad(𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁 − 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚 − 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑑𝑑𝑑𝑑/𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟),
𝐽𝐽 = 𝑘𝑘𝑘𝑘. 𝑚𝑚2 (𝐾𝐾𝐾𝐾𝐾𝐾𝐾𝐾𝐾𝐾𝐾𝐾𝐾𝐾𝐾𝐾𝐾𝐾 − 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚2 − 𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁 − 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚 − 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠2 /𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟).
4
Laplace transform of some common signal functions
5
Part 1: Mechanical System: Mass-Spring System Model
x(t)
K
Fa (t)
M
B
Solution
a) Derive the second order differential equation of the above mass-spring system
x(t)
Kx(t)
Fa (t)
Bv(t) M
Ma(t)
By Newton’s law:
𝐾𝐾𝐾𝐾(𝑡𝑡) + 𝐵𝐵𝐵𝐵(𝑡𝑡) + 𝑀𝑀𝑀𝑀(𝑡𝑡) = 𝐹𝐹𝑎𝑎 (𝑡𝑡)
𝑑𝑑𝑑𝑑(𝑡𝑡) 𝑑𝑑2 𝑥𝑥(𝑡𝑡)
𝐾𝐾𝐾𝐾(𝑡𝑡) + 𝐵𝐵 + 𝑀𝑀 = 𝐹𝐹𝑎𝑎 (𝑡𝑡)
𝑑𝑑𝑑𝑑 𝑑𝑑𝑡𝑡2
6
Therefore, our differential equation of the system is:
Transform)
1
𝐻𝐻(𝑠𝑠) = (7)
2𝑠𝑠2 + 4𝑠𝑠 + 16
−𝐾𝐾 𝐵𝐵 𝐹𝐹 (𝑡𝑡)
𝑥𝑥̇2 (𝑡𝑡) = 𝑥𝑥1 (𝑡𝑡) − 𝑥𝑥2 (𝑡𝑡) + 𝑎𝑎
𝑀𝑀 𝑀𝑀 𝑀𝑀
−16 4 1
= 𝑥𝑥1 (𝑡𝑡) − 𝑥𝑥2 (𝑡𝑡) + 𝐹𝐹𝑎𝑎 (𝑡𝑡)
2 2 2
1
= −8𝑥𝑥1 (𝑡𝑡) − 2𝑥𝑥2 (𝑡𝑡) + 𝐹𝐹𝑎𝑎 (𝑡𝑡)
2
𝑥𝑥̇1 (𝑡𝑡) = 𝑥𝑥2 (𝑡𝑡)
7
Following the equation (4) & (5), we get:
𝑥𝑥̇ (𝑡𝑡) 0
0 1
ẋ = � 1 � = � � x + �1� 𝐹𝐹𝑎𝑎 (𝑡𝑡)
𝑥𝑥̇2 (𝑡𝑡) −8 −2
2 (9)
y = 𝑥𝑥1 (𝑡𝑡) = [1 0]x
+Block Diagram:
We have to configure our source 𝐹𝐹𝑎𝑎 (𝑡𝑡) (Ramp signal), Transfer function from (7), and
Transfer function
8
After we ran the simulation, we will get the response graph:
+Scope 1:
+Scope 2:
We see that both responses are the same due to State Space function is just a
representation of our Transfer Function.
9
Part 2: Electrical System: RLC Circuit
L C
in out RL
Solution
a) Derive the differential equation of the above systems
By KVL, we get:
𝑉𝑉𝑖𝑖𝑖𝑖 (𝑡𝑡) = 𝑉𝑉𝐿𝐿 (𝑡𝑡) + 𝑉𝑉𝐶𝐶 (𝑡𝑡) + 𝑉𝑉𝑅𝑅𝐿𝐿 (𝑡𝑡) (10)
𝑑𝑑𝑑𝑑(𝑡𝑡) 1
𝑉𝑉𝑖𝑖𝑖𝑖 (𝑡𝑡) = 𝐿𝐿 + � 𝑖𝑖(𝑡𝑡) 𝑑𝑑𝑑𝑑 + 𝑉𝑉𝑅𝑅𝐿𝐿 (𝑡𝑡)
𝑑𝑑𝑑𝑑 𝐶𝐶
Since 𝑉𝑉𝑅𝑅𝐿𝐿 (𝑡𝑡) = 𝑉𝑉𝑜𝑜𝑜𝑜𝑜𝑜 (𝑡𝑡) → 𝑖𝑖(𝑡𝑡) = 𝑉𝑉𝑜𝑜𝑜𝑜𝑜𝑜
𝑅𝑅
(𝑡𝑡)
𝐿𝐿
𝐿𝐿 𝑑𝑑𝑉𝑉𝑜𝑜𝑜𝑜𝑜𝑜 (𝑡𝑡) 1
𝑉𝑉𝑖𝑖𝑖𝑖 (𝑡𝑡) = � �+ � 𝑉𝑉𝑜𝑜𝑜𝑜𝑜𝑜 (𝑡𝑡) 𝑑𝑑𝑑𝑑 + 𝑉𝑉𝑜𝑜𝑜𝑜𝑜𝑜 (𝑡𝑡)
𝑅𝑅𝐿𝐿 𝑑𝑑𝑑𝑑 𝑅𝑅𝐿𝐿 𝐶𝐶
𝑑𝑑𝑉𝑉𝑖𝑖𝑖𝑖 (𝑡𝑡) 𝐿𝐿 𝑑𝑑2 𝑉𝑉𝑜𝑜𝑜𝑜𝑜𝑜 (𝑡𝑡) 1 𝑑𝑑𝑑𝑑 (𝑡𝑡)
= � �+ 𝑉𝑉𝑜𝑜𝑜𝑜𝑜𝑜 (𝑡𝑡) + 𝑜𝑜𝑜𝑜𝑜𝑜
𝑑𝑑𝑑𝑑 𝑅𝑅𝐿𝐿 𝑑𝑑𝑡𝑡2 𝑅𝑅𝐿𝐿 𝐶𝐶 𝑑𝑑𝑑𝑑
𝑑𝑑2 𝑉𝑉𝑜𝑜𝑜𝑜𝑜𝑜 (𝑡𝑡) 𝑅𝑅𝐿𝐿 𝑑𝑑𝑑𝑑𝑜𝑜𝑜𝑜𝑜𝑜 (𝑡𝑡) 1 𝑅𝑅 𝑑𝑑𝑉𝑉 (𝑡𝑡)
+ � �+ 𝑉𝑉𝑜𝑜𝑜𝑜𝑜𝑜 (𝑡𝑡) = 𝐿𝐿 � 𝑖𝑖𝑖𝑖 �
𝑑𝑑𝑡𝑡2 𝐿𝐿 𝑑𝑑𝑑𝑑 𝐿𝐿𝐶𝐶 𝐿𝐿 𝑑𝑑𝑑𝑑
10
Therefore, the differential equation is:
𝑑𝑑2 𝑉𝑉𝑜𝑜𝑜𝑜𝑜𝑜 (𝑡𝑡) 𝑅𝑅𝐿𝐿 𝑑𝑑𝑑𝑑𝑜𝑜𝑜𝑜𝑜𝑜 (𝑡𝑡) 1 𝑅𝑅𝐿𝐿 𝑑𝑑𝑉𝑉𝑖𝑖𝑖𝑖 (𝑡𝑡)
+ � � + 𝑉𝑉 𝑜𝑜𝑜𝑜𝑜𝑜 (𝑡𝑡) = � � (11)
𝑑𝑑𝑡𝑡2 𝐿𝐿 𝑑𝑑𝑑𝑑 𝐿𝐿𝐶𝐶 𝐿𝐿 𝑑𝑑𝑑𝑑
b) Write the transfer function of the systems
From (10) we transform it into Laplace transform:
𝑅𝑅𝐿𝐿 1 𝑅𝑅
𝑠𝑠2 𝑉𝑉𝑜𝑜𝑜𝑜𝑜𝑜 (𝑠𝑠) +
𝑠𝑠𝑉𝑉𝑜𝑜𝑜𝑜𝑜𝑜 (𝑠𝑠) + 𝑉𝑉𝑜𝑜𝑜𝑜𝑜𝑜 (𝑠𝑠) = 𝐿𝐿 𝑠𝑠𝑉𝑉𝑖𝑖𝑖𝑖 (𝑠𝑠)
𝐿𝐿 𝐿𝐿𝐶𝐶 𝐿𝐿
𝑠𝑠𝑅𝑅𝐿𝐿�
𝑉𝑉𝑜𝑜𝑜𝑜𝑜𝑜 (𝑠𝑠) 𝐿𝐿 𝑠𝑠𝑅𝑅𝐿𝐿 𝐶𝐶
= = 2
𝑉𝑉𝑖𝑖𝑖𝑖 (𝑠𝑠) 𝑠𝑠𝑅𝑅 𝑠𝑠 𝐿𝐿𝐿𝐿 + 𝑠𝑠𝑠𝑠𝐿𝐿 𝐶𝐶 + 1
𝑠𝑠2 + 𝐿𝐿𝐿𝐿 + 1
𝐿𝐿𝐿𝐿
𝑠𝑠(3 × 2) 6𝑠𝑠
= 2 = 2
𝑠𝑠 (4 × 2) + 𝑠𝑠(3 × 2) + 1 8𝑠𝑠 + 6𝑠𝑠 + 1
Therefore, the transfer function of this system is:
6𝑠𝑠
𝐻𝐻(𝑠𝑠) = (12)
8𝑠𝑠2 + 6𝑠𝑠 + 1
c) Write the state space equation of the above system
Using (10), we write the equation with the function charge 𝑞𝑞(𝑡𝑡):
𝑉𝑉𝑖𝑖𝑖𝑖 (𝑡𝑡) = 𝑉𝑉𝐿𝐿 (𝑡𝑡) + 𝑉𝑉𝐶𝐶 (𝑡𝑡) + 𝑉𝑉𝑅𝑅𝐿𝐿 (𝑡𝑡)
𝑑𝑑2 𝑞𝑞(𝑡𝑡) 1 𝑑𝑑𝑑𝑑(𝑡𝑡)
𝑉𝑉𝑖𝑖𝑖𝑖 (𝑡𝑡) = 𝐿𝐿 + 𝑞𝑞(𝑡𝑡) + 𝑅𝑅 (13)
𝑑𝑑𝑡𝑡2 𝐶𝐶 𝑑𝑑𝑑𝑑
Let 𝑥𝑥1 (𝑡𝑡) = 𝑞𝑞(𝑡𝑡), 𝑥𝑥2 (𝑡𝑡) = 𝑥𝑥̇1 (𝑡𝑡) = 𝑞𝑞 ̇(𝑡𝑡) = 𝑑𝑑𝑑𝑑(𝑡𝑡)
𝑑𝑑𝑑𝑑
1
𝑉𝑉𝑖𝑖𝑖𝑖 (𝑡𝑡) = 𝐿𝐿 𝑥𝑥̇2 (𝑡𝑡) + 𝑥𝑥 (𝑡𝑡) + 𝑅𝑅𝐿𝐿 𝑥𝑥2 (𝑡𝑡)
𝐶𝐶 1
−1 𝑅𝑅 1
𝑥𝑥̇2 (𝑡𝑡) = 𝑥𝑥1 (𝑡𝑡) − 𝐿𝐿 𝑥𝑥2 (𝑡𝑡) + 𝑉𝑉𝑖𝑖𝑖𝑖 (𝑡𝑡)
𝐿𝐿𝐿𝐿 𝐿𝐿 𝐿𝐿
𝑥𝑥̇1 (𝑡𝑡) = 𝑥𝑥2 (𝑡𝑡)
Then
𝑥𝑥̇1 (𝑡𝑡) 0 1 0
ẋ = � � = � −1 𝑅𝑅𝐿𝐿 � x + � 1 � 𝑉𝑉𝑖𝑖𝑖𝑖 (𝑡𝑡)
𝑥𝑥̇2 (𝑡𝑡) −
𝐿𝐿𝐿𝐿 𝐿𝐿 𝐿𝐿
𝑑𝑑𝑑𝑑(𝑡𝑡)
y = 𝑅𝑅𝐿𝐿 = 𝑅𝑅𝐿𝐿 𝑥𝑥2 (𝑡𝑡) = [0 𝑅𝑅𝐿𝐿 ]x
𝑑𝑑𝑑𝑑
11
Therefore, the state space function is:
0 1 0
ẋ = �−1 3� x + �1� 𝑉𝑉𝑖𝑖𝑖𝑖 (𝑡𝑡)
−
8 4 4 (14)
y = [0 3]x
above systems
+Scope 1:
12
+Scope 2:
13
+Scope 1:
+Scope 2:
14
Lab Assignment
R2=220kΩ C2=0.1μF
C1=5.6μF
v i(t) v 1(t)
- v 0(t)
+
R1=360kΩ
Solution
a) Find the transfer function
Using Laplace Transform, we get:
1 1
𝑍𝑍1 (𝑠𝑠) = =
𝐶𝐶1 // 𝑅𝑅1 𝑠𝑠𝐶𝐶 (𝑠𝑠) + 1
1 𝑅𝑅1 (𝑠𝑠)
𝑅𝑅1
=
𝑠𝑠𝑅𝑅1 𝐶𝐶1 + 1
1
𝑍𝑍2 (𝑠𝑠) = 𝑅𝑅2 + 𝐶𝐶2 = 𝑅𝑅2 (𝑠𝑠) +
𝑠𝑠𝐶𝐶2 (𝑠𝑠)
𝑠𝑠𝑅𝑅2 𝐶𝐶2 + 1
=
𝑠𝑠𝑠𝑠2
Let 𝑥𝑥1 (𝑠𝑠) = −𝑉𝑉𝑖𝑖𝑖𝑖 (𝑠𝑠), 𝑥𝑥2 (𝑠𝑠) = 𝑥𝑥̇1 (𝑠𝑠) = − 𝑑𝑑𝑉𝑉𝑖𝑖𝑖𝑖
𝑑𝑑𝑑𝑑
(𝑠𝑠)
, thus
𝑑𝑑𝑉𝑉𝑖𝑖𝑖𝑖 (𝑠𝑠)
1.232𝑥𝑥̇2 (𝑠𝑠) + 56.611𝑥𝑥2 (𝑠𝑠) + 27.777𝑥𝑥1 (𝑠𝑠) = −
𝑑𝑑𝑑𝑑
1 𝑑𝑑𝑉𝑉𝑖𝑖𝑖𝑖 (𝑠𝑠)
𝑥𝑥̇2 (𝑠𝑠) = −27.777𝑥𝑥1 (𝑠𝑠) − 56.611𝑥𝑥2 (𝑠𝑠) −
1.232 𝑑𝑑𝑑𝑑
𝑥𝑥̇1 (𝑠𝑠) = 𝑥𝑥2 (𝑠𝑠)
We get:
𝑥𝑥̇ (𝑡𝑡) 0
0 1
ẋ = � 1 � = � �x + � 1 � 𝑉𝑉𝑖𝑖𝑖𝑖 (𝑠𝑠)
𝑥𝑥̇2 (𝑡𝑡) −27.777 −56.611 − (16)
1.232
y = [−1 0]x
c) Construct a Simulink model and calculate step and impulse responses of the
above systems
16
+Block Diagram for Step & Impulse responses:
+Scope 1:
17
+Scope 2:
II. DC Motor
A permanent magnet dc motor is a mechanism which converts electrical power to
mechanical power via magnetic coupling. The electrical power is provided by a voltage
source, while the mechanical power is provided by a spinning rotor. A very basic dc
motor is constructed of two main components: the rotor or armature and the stator.
The armature rotates within the framework of the stationary stator. A simple
illustration of a dc motor is shown in figure below:
+
N Stator
Ra La ia(t)
Armature Rf -
+
+
ω Va Va e(t) DC
bvωm(t)
- Motor J
T(t)
Commutator
Brush -
S
(a): DC motor structure. (b): DC motor equivalent electrical diagram
18
The voltage across the inductor is proportional to the change of current through the
coil with respect to time. DC-motor mechanical equation could be written as follow:
𝑑𝑑𝜔𝜔𝑚𝑚
𝐽𝐽 = 𝑇𝑇𝑒𝑒 − 𝑏𝑏𝑣𝑣 𝜔𝜔𝑚𝑚 − 𝑇𝑇𝐿𝐿 (17)
𝑑𝑑𝑑𝑑
Where 𝐽𝐽 moment of inertia of a rotor, and 𝑏𝑏𝑣𝑣 is motor shaft viscous friction
constant. Electrical part of system could be model by equation:
𝑑𝑑𝑖𝑖𝑎𝑎
𝑉𝑉𝑎𝑎 = 𝑅𝑅𝑎𝑎 𝑖𝑖𝑎𝑎 + 𝐿𝐿𝑎𝑎 + 𝑒𝑒𝑎𝑎 (18)
𝑑𝑑𝑑𝑑
Assume that neglectable field dynamic, constant 𝑒𝑒𝑎𝑎 = 𝑘𝑘1 𝜔𝜔𝑚𝑚 and 𝑇𝑇𝑒𝑒 = 𝑘𝑘2 𝑖𝑖𝑎𝑎 , where 𝑘𝑘1
and 𝑘𝑘2 are assumed motor constants. Assume that we know all parameters:
• 𝐽𝐽 : moment of inertia of rotor 0.01𝐾𝐾. 𝑔𝑔𝑚𝑚2
• 𝑏𝑏𝑣𝑣 : motor viscous friction constant 0.1𝑁𝑁 . 𝑚𝑚. 𝑠𝑠
• 𝑘𝑘1 : motor torque constant 0.01 𝑉𝑉 ⁄𝑟𝑟𝑟𝑟𝑟𝑟⁄𝑠𝑠
• 𝑘𝑘2 : linearization constant 0.001𝑁𝑁 . 𝑚𝑚⁄𝐴𝐴𝐴𝐴𝐴𝐴
• 𝑅𝑅𝑎𝑎 : Armature circuit resistance 1Ω
• 𝐿𝐿𝑎𝑎 : Armature circuit inductance 0.1𝐻𝐻
a) Find the differential equation of the motor, transfer function and state space
equations.
b) Make the block diagram of the transfer function and implement it in MATLAB
SIMULINK. You can reduce the block diagram according to your understanding
and you are required to explain each step of reduction in detail.
c) Write detailed analysis on the step response of the DC motor. State the
assumptions in your report.
Solution
a) Find the differential equation of the motor, transfer function and state space
equations
+Differential equation
Since the system also consist of electrical and mechanical systems, we have to write
them both.
-Mechanical equation Part:
From (17) we have:
19
𝑑𝑑𝜔𝜔𝑚𝑚 𝑇𝑇𝑒𝑒 𝑏𝑏𝑣𝑣 𝑇𝑇
= − 𝜔𝜔𝑚𝑚 − 𝐿𝐿
𝑑𝑑𝑑𝑑 𝐽𝐽 𝐽𝐽 𝐽𝐽
𝑑𝑑𝜔𝜔𝑚𝑚 𝑘𝑘2 𝑖𝑖𝑎𝑎 𝑏𝑏𝑣𝑣 𝑇𝑇
= − 𝜔𝜔𝑚𝑚 − 𝐿𝐿
𝑑𝑑𝑑𝑑 𝐽𝐽 𝐽𝐽 𝐽𝐽
𝑑𝑑𝜔𝜔𝑚𝑚 0.001𝑖𝑖𝑎𝑎 0.1 𝑇𝑇
= − 𝜔𝜔𝑚𝑚 − 𝐿𝐿
𝑑𝑑𝑑𝑑 0.01 0.01 0.01
𝑑𝑑𝜔𝜔𝑚𝑚
= 0.1𝑖𝑖𝑎𝑎 − 10𝜔𝜔𝑚𝑚 − 100𝑇𝑇𝐿𝐿 (19)
𝑑𝑑𝑑𝑑
-Electrical equation Part:
From (18) we have:
𝑑𝑑𝑖𝑖𝑎𝑎
𝑉𝑉𝑎𝑎 = 𝑅𝑅𝑎𝑎 𝑖𝑖𝑎𝑎 + 𝐿𝐿𝑎𝑎 + 𝑘𝑘1 𝜔𝜔𝑚𝑚 (20)
𝑑𝑑𝑑𝑑
𝑑𝑑𝑖𝑖𝑎𝑎 𝑅𝑅 𝑖𝑖 𝑘𝑘 1
= − 𝑎𝑎 𝑎𝑎 − 1 𝜔𝜔𝑚𝑚 + 𝑉𝑉
𝑑𝑑𝑑𝑑 𝐿𝐿𝑎𝑎 𝐿𝐿𝑎𝑎 𝐿𝐿𝑎𝑎 𝑎𝑎
𝑑𝑑𝑖𝑖𝑎𝑎 𝑖𝑖 0.01 1
= − 𝑎𝑎 − 𝜔𝜔𝑚𝑚 + 𝑉𝑉
𝑑𝑑𝑑𝑑 0.1 0.1 0.1 𝑎𝑎
𝑑𝑑𝑖𝑖𝑎𝑎
= −10𝑖𝑖𝑎𝑎 − 0.1𝜔𝜔𝑚𝑚 + 10𝑉𝑉𝑎𝑎 (21)
𝑑𝑑𝑑𝑑
+Transfer function
We transform both equations into Laplace Transform:
From (17) since
𝑑𝑑2 𝜃𝜃
𝑇𝑇𝐿𝐿 = 𝐽𝐽
𝑑𝑑𝑡𝑡2
𝑑𝑑2 𝜃𝜃 𝑑𝑑𝑑𝑑
⇒ 𝑇𝑇𝑒𝑒 = 2𝐽𝐽 + 𝑏𝑏𝑣𝑣
𝑑𝑑𝑡𝑡2 𝑑𝑑𝑑𝑑
⇒ 𝑇𝑇𝑒𝑒 (𝑠𝑠) = 2𝐽𝐽𝐽𝐽𝑠𝑠2 + 𝑏𝑏𝑣𝑣 𝜃𝜃𝜃𝜃 (22)
From (20) ⇒ 𝑉𝑉𝑎𝑎 (𝑠𝑠) = 𝑅𝑅𝑎𝑎 𝑖𝑖𝑎𝑎 + 𝐿𝐿𝑎𝑎 𝑖𝑖𝑎𝑎 𝑠𝑠 + 𝑘𝑘1 𝜃𝜃𝜃𝜃 (23)
𝑇𝑇𝑒𝑒 2𝐽𝐽𝐽𝐽𝑠𝑠2 + 𝑏𝑏𝑣𝑣 𝜃𝜃𝜃𝜃
⇒ 𝑖𝑖𝑎𝑎 = = (24)
𝑘𝑘2 𝑘𝑘2
20
𝜃𝜃(𝑠𝑠) 𝑘𝑘2
𝐻𝐻(𝑠𝑠) = =
𝑉𝑉𝑎𝑎 (𝑠𝑠) 𝑠𝑠(𝑅𝑅𝑎𝑎 + 𝐿𝐿𝑎𝑎 𝑠𝑠)(2𝐽𝐽 + 𝑏𝑏𝑣𝑣 ) + 𝑘𝑘1 𝑘𝑘2 𝑠𝑠
1
𝐻𝐻(𝑠𝑠) =
0.2𝑠𝑠3 + 30𝑠𝑠2 + 100.01𝑠𝑠
𝑥𝑥1 (𝑠𝑠) = 𝜃𝜃
𝑥𝑥2 (𝑠𝑠) = 𝑥𝑥̇1 (𝑠𝑠) = 𝜃𝜃 ̇
𝑥𝑥3 (𝑠𝑠) = 𝑥𝑥̇2 (𝑠𝑠) = 𝑥𝑥̈1 (𝑠𝑠) = 𝜃𝜃 ̈
We get:
y = 𝜃𝜃 = [1 0 0]x
21
We can draw block diagram of Eq. (25),(26), (27)& (28)
1
Va(s) +
- ia(s) Eq. (25)
Ra+s La
ea(s)
sθ(s) k1 ea(s) Eq. (26)
Te(s) 1
2Js+bv
sθ(s) Eq. (28)
Va(s) +
-
1
Ra+s La
ia(s)
k2 Te(s) 1
2Js+bv
sθ(s)
k1
k2 Te(s)
Va(s) 1 ia(s) 1 sθ(s) 1 θ(s)
+
- Ra+s La 2Js+bv s
k1
22
We see that the top line is connected in series, thus
Va(s) +
k2 θ(s)
- s(Ra+s La)(2J+bv)
k1
+Implement in SIMULINK
+Scope:
From Step Response Graph above, we see that when input Voltage 𝑉𝑉 (𝑠𝑠) was
introduced the Output 𝜃𝜃 starts gradually gaining rotation until it reaches its maximum
speed.
Conclusion
After this lab-experiment has end, we can further understand the purpose of
Differential Equations, Transfer Function, Laplace Transform, and State Space
Equation. In addition to that, we can also implement those representative equations
using SIMULINK to analyze any more complex system if we so choose.
24