Lab 03 Feedback E20180779 Phon Lundy Pov Punleu

Download as pdf or txt
Download as pdf or txt
You are on page 1of 25

Institute of Technology of Cambodia Department of Electrical and Energy

Lab 03: Mathematical Modeling of


Physical System

Feedback Control System

Lecture by

CHRIN PHOK
CHUM PHARINO

Prepared by students:

PHON LUNDY, e20180779

POV PUNLEU, e20180817

March 10, 2021

Class of 2021-2022
Contents

Experiment No.3: Mathematical Modeling of Physical System ................ 2


Objective ................................................................................................... 2
Reference Formula ..................................................................................... 3
Video Material: ....................................................................................... 3
Formula: .................................................................................................. 3
Part 1: Mechanical System: Mass-Spring System Model ........................... 6
Solution ................................................................................................... 6
Part 2: Electrical System: RLC Circuit ................................................... 10
Solution ................................................................................................. 10
Lab Assignment ....................................................................................... 15
I. Inverting Operational Amplifier Circuit ............................................ 15
Solution ................................................................................................. 15
II. DC Motor......................................................................................... 18
Solution ................................................................................................. 19
Conclusion................................................................................................ 24

1
Experiment No.3: Mathematical Modeling of
Physical System

Objective

1. To understand the role of mathematical models of physical systems in design


and analysis of control systems.
2. To learn MATLAB functions in solving and simulating such models.
The representation of a system provides complete knowledge of all variables of
the system at any 𝑡𝑡 > 𝑓𝑓0 As an example, for a linear, time-invariant, second-order
system with a single input 𝑣𝑣(𝑡𝑡), the state equations could take on the following
form:
𝑑𝑑𝑥𝑥1
= 𝑎𝑎11 𝑥𝑥1 + 𝑎𝑎12 𝑥𝑥2 + 𝑏𝑏1 𝑣𝑣(𝑡𝑡) (1)
𝑑𝑑𝑑𝑑

𝑑𝑑𝑥𝑥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:

Component Voltage-current Current-voltage Voltage-charge Impedance Admittance


𝒁𝒁(𝒔𝒔) = 𝑽𝑽 (𝒔𝒔)⁄𝑰𝑰(𝒔𝒔) 𝒀𝒀 (𝒔𝒔) = 𝑰𝑰(𝒔𝒔)⁄𝑽𝑽 (𝒔𝒔)

1 1 𝑑𝑑𝑑𝑑(𝑡𝑡) 1 1
𝑣𝑣(𝑡𝑡) = � 𝑖𝑖(𝜏𝜏 )𝑑𝑑𝑑𝑑 𝑖𝑖(𝑡𝑡) = 𝐶𝐶 𝑣𝑣(𝑡𝑡) = 𝑞𝑞(𝑡𝑡) 𝐶𝐶𝐶𝐶
Capacitor
𝐶𝐶 0 𝑑𝑑𝑑𝑑 𝐶𝐶 𝐶𝐶𝐶𝐶

1 𝑑𝑑𝑑𝑑(𝑡𝑡) 1
𝑣𝑣(𝑡𝑡) = 𝑅𝑅𝑅𝑅(𝑡𝑡) 𝑖𝑖(𝑡𝑡) = 𝑣𝑣(𝑡𝑡) 𝑣𝑣(𝑡𝑡) = 𝑅𝑅 𝑅𝑅 = 𝐺𝐺
Resistor 𝑅𝑅 𝑑𝑑𝑑𝑑 𝑅𝑅

𝑑𝑑𝑑𝑑(𝑡𝑡) 1 1 𝑑𝑑2 𝑞𝑞(𝑡𝑡) 1


𝑣𝑣(𝑡𝑡) = 𝐿𝐿 𝑖𝑖(𝑡𝑡) = � 𝑣𝑣(𝜏𝜏 )𝑑𝑑𝑑𝑑 𝑣𝑣(𝑡𝑡) = 𝐿𝐿 𝐿𝐿𝐿𝐿
Inductor 𝑑𝑑𝑑𝑑 𝐿𝐿 0 𝑑𝑑𝑡𝑡2 𝐿𝐿𝐿𝐿

Figure 1: Voltage-current, Voltage-charge, and Impedance relationships for


Capacitors, Resistors, and Inductors.

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

Figure 2: Force-velocity, force-displacement, and impedance translational


relationships for springs, viscous dampers, and mass.

Note: The following set of symbols and units is used through this book:
𝑓𝑓(𝑡𝑡) = 𝑁𝑁 (𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁), 𝑥𝑥(𝑡𝑡) = 𝑚𝑚(𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀), 𝑣𝑣(𝑡𝑡) = 𝑚𝑚/𝑠𝑠(𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀/𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠),
𝐾𝐾 = 𝑁𝑁 /𝑚𝑚(𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁/𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚), 𝑓𝑓𝑣𝑣 = N − 𝑠𝑠/𝑚𝑚(𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁 − 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠/𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚),
𝑀𝑀 = kg(𝐾𝐾𝐾𝐾𝐾𝐾𝐾𝐾𝐾𝐾𝐾𝐾𝐾𝐾𝐾𝐾𝐾𝐾 = 𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁𝑁 = 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠2 /𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚).

Torque-angular Torque-angular Impedance


Component
velocity displacement 𝒁𝒁𝑴𝑴 (𝒔𝒔) = 𝑻𝑻 (𝒔𝒔)⁄𝜽𝜽(𝒔𝒔)
Spring
1
θ(t) 𝑑𝑑𝑑𝑑(𝑡𝑡)
𝑇𝑇 (𝑡𝑡) = 𝐾𝐾 � 𝑖𝑖(𝑡𝑡)𝑑𝑑𝑑𝑑 𝑖𝑖(𝑡𝑡) = 𝐶𝐶 𝐾𝐾
0 𝑑𝑑𝑑𝑑
K T(t)
Viscous damper

θ(t) 1
𝑣𝑣(𝑡𝑡) = 𝑅𝑅𝑅𝑅(𝑡𝑡) 𝑖𝑖(𝑡𝑡) = 𝑣𝑣(𝑡𝑡) 𝐷𝐷𝐷𝐷
𝑅𝑅
D T(t)
Inertia
θ(t) 𝑑𝑑𝑑𝑑(𝑡𝑡) 1 1
𝑣𝑣(𝑡𝑡) = 𝐿𝐿 𝑖𝑖(𝑡𝑡) = � 𝑣𝑣(𝜏𝜏 )𝑑𝑑𝑑𝑑 𝐽𝐽 𝑠𝑠2
𝑑𝑑𝑑𝑑 𝐿𝐿 0
J T(t)

Figure 3: Torque-angular velocity, torque-angular displacement, and


impedance rotational relationships for springs, viscous dampers, and inertia.

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

𝒙𝒙(𝒕𝒕) 𝑿𝑿(𝒔𝒔) 𝑹𝑹𝑹𝑹𝑹𝑹


𝛿𝛿(𝑡𝑡) 1 All 𝑠𝑠
𝑢𝑢(𝑡𝑡) 1 𝑅𝑅𝑅𝑅(𝑠𝑠) > 0
𝑠𝑠
−𝑢𝑢(−𝑡𝑡) 1 𝑅𝑅𝑅𝑅(𝑠𝑠) < 0
𝑠𝑠
𝑡𝑡𝑡𝑡(𝑡𝑡) 1 𝑅𝑅𝑅𝑅(𝑠𝑠) > 0
𝑠𝑠2
𝑡𝑡𝑘𝑘 𝑢𝑢(𝑡𝑡) 𝑘𝑘! 𝑅𝑅𝑅𝑅(𝑠𝑠) > 0
𝑠𝑠 𝑘𝑘+1

𝑒𝑒−𝑎𝑎𝑎𝑎 𝑢𝑢(𝑡𝑡) 1 𝑅𝑅𝑅𝑅(𝑠𝑠) > −𝑅𝑅𝑅𝑅(𝑎𝑎)


𝑠𝑠 + 𝑎𝑎
−𝑒𝑒−𝑎𝑎𝑎𝑎 𝑢𝑢(−𝑡𝑡) 1 𝑅𝑅𝑅𝑅(𝑠𝑠) < −𝑅𝑅𝑅𝑅(𝑎𝑎)
𝑠𝑠 + 𝑎𝑎
𝑡𝑡𝑒𝑒−𝑎𝑎𝑎𝑎 𝑢𝑢(𝑡𝑡) 1 𝑅𝑅𝑅𝑅(𝑠𝑠) > −𝑅𝑅𝑅𝑅(𝑎𝑎)
(𝑠𝑠 + 𝑎𝑎)2
−𝑡𝑡𝑒𝑒−𝑎𝑎𝑎𝑎 𝑢𝑢(−𝑡𝑡) 1 𝑅𝑅𝑅𝑅(𝑠𝑠) < −𝑅𝑅𝑅𝑅(𝑎𝑎)
(𝑠𝑠 + 𝑎𝑎)2
𝑐𝑐𝑐𝑐𝑐𝑐𝜔𝜔0 𝑡𝑡𝑡𝑡(𝑡𝑡) 𝑠𝑠 𝑅𝑅𝑅𝑅(𝑠𝑠) > 0
𝑠𝑠 + 𝜔𝜔𝑠𝑠
2

𝑠𝑠𝑠𝑠𝑠𝑠𝜔𝜔0 𝑡𝑡𝑡𝑡(𝑡𝑡) 𝜔𝜔0 𝑅𝑅𝑅𝑅(𝑠𝑠) > 0


𝑠𝑠 + 𝜔𝜔𝑠𝑠
2

𝑒𝑒−𝑎𝑎𝑎𝑎 𝑐𝑐𝑐𝑐𝑐𝑐𝜔𝜔0 𝑡𝑡𝑡𝑡(𝑡𝑡) 𝑠𝑠 + 𝑎𝑎 𝑅𝑅𝑅𝑅(𝑠𝑠) > 𝑅𝑅𝑅𝑅(𝑎𝑎)


(𝑠𝑠 + 𝑎𝑎)2 + 𝜔𝜔𝑠𝑠
𝑒𝑒−𝑎𝑎𝑎𝑎 𝑠𝑠𝑠𝑠𝑠𝑠𝜔𝜔0 𝑡𝑡𝑡𝑡(𝑡𝑡) 𝜔𝜔0 𝑅𝑅𝑅𝑅(𝑠𝑠) > 𝑅𝑅𝑅𝑅(𝑎𝑎)
(𝑠𝑠 + 𝑎𝑎)2 + 𝜔𝜔𝑠𝑠

5
Part 1: Mechanical System: Mass-Spring System Model

x(t)

K
Fa (t)
M
B

Figure 4: Mass-spring system model.

Consider the following Mass-Spring system shown in Figure 4. 𝐾𝐾 is the spring


constant. 𝐵𝐵 is friction contact. 𝑥𝑥(𝑡𝑡) is the displacement and 𝐹𝐹𝑎𝑎 (𝑡𝑡) is the applied
force.
a) Derive the second order differential equation of the above mass-spring system.
b) Write the transfer function of the system 𝑋𝑋(𝑠𝑠)
𝐹𝐹 (𝑠𝑠)
.

c) Write the state space equation of the above system.


d) Construct a SIMULINK diagram to calculate the response of the Mass-Spring
system. The input force increases from 0𝑁𝑁 to 8𝑁𝑁 at 𝑡𝑡 = 1𝑠𝑠. The parameter
values are 𝑀𝑀 = 2𝑘𝑘𝑘𝑘, 𝐾𝐾 = 16 𝑁𝑁 ⁄𝑚𝑚, and 𝐵𝐵 = 4 𝑁𝑁 . 𝑠𝑠⁄𝑚𝑚 (Draw a block diagram
to represent this equation and draw the corresponding SIMULINK diagram
before implementing it on SIMULINK).

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:

𝑑𝑑𝑑𝑑(𝑡𝑡) 𝑑𝑑2 𝑥𝑥(𝑡𝑡) (6)


𝐾𝐾𝐾𝐾(𝑡𝑡) + 𝐵𝐵 + 𝑀𝑀 = 𝐹𝐹𝑎𝑎 (𝑡𝑡)
𝑑𝑑𝑑𝑑 𝑑𝑑𝑡𝑡2

b) Write the transfer function of the system

From our differential equation (6) we transform it to frequency domain (Laplace

Transform)

𝐾𝐾𝐾𝐾(𝑠𝑠) + 𝐵𝐵𝐵𝐵𝐵𝐵(𝑠𝑠) + 𝑀𝑀 𝑠𝑠2 𝑋𝑋(𝑠𝑠) = 𝐹𝐹𝑎𝑎 (𝑠𝑠)


𝑋𝑋(𝑠𝑠)(𝐾𝐾 + 𝐵𝐵𝐵𝐵 + 𝑀𝑀 𝑠𝑠2 ) = 𝐹𝐹𝑎𝑎 (𝑠𝑠)
𝑋𝑋(𝑠𝑠) 1
=
𝐹𝐹𝑎𝑎 (𝑠𝑠) (𝐾𝐾 + 𝐵𝐵𝐵𝐵 + 𝑀𝑀 𝑠𝑠2 )
1
=
16 + 4𝑠𝑠 + 2𝑠𝑠2
Therefore, transfer function of the system is:

1
𝐻𝐻(𝑠𝑠) = (7)
2𝑠𝑠2 + 4𝑠𝑠 + 16

c) Write the state space equation of the above system


Since our differential equation is a second order, we will need to let:
𝑥𝑥1 (𝑡𝑡) = 𝑥𝑥(𝑡𝑡) = 𝑦𝑦(𝑡𝑡)
𝑥𝑥2 (𝑡𝑡) = 𝑥𝑥̇1 (𝑡𝑡) = 𝑑𝑑𝑑𝑑(𝑡𝑡)
𝑑𝑑𝑑𝑑

With this assumption, we rewrite our differential equation:

𝐾𝐾𝑥𝑥1 (𝑡𝑡) + 𝐵𝐵𝑥𝑥2 (𝑡𝑡) + 𝑀𝑀 𝑥𝑥̇2 (𝑡𝑡) = 𝐹𝐹𝑎𝑎 (𝑡𝑡) (8)

−𝐾𝐾 𝐵𝐵 𝐹𝐹 (𝑡𝑡)
𝑥𝑥̇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

d) Construct a SIMULINK diagram to calculate the response of the Mass-Spring

system with the given parameters

+Block Diagram:

We have to configure our source 𝐹𝐹𝑎𝑎 (𝑡𝑡) (Ramp signal), Transfer function from (7), and

our State space function from (9).

source 𝐹𝐹𝑎𝑎 (𝑡𝑡)

Transfer function

State space 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

Consider the electrical circuits shown in the figures below.

L C

in out RL

Figure 5: RLC circuit A.

a) Derive the differential equation of the above systems.


b) Write the transfer function of the systems 𝑉𝑉𝑜𝑜𝑜𝑜𝑜𝑜 (𝑡𝑡)
𝑉𝑉𝑖𝑖𝑖𝑖 (𝑡𝑡)
.

c) Write the state space equation of the above system.


d) Construct a SIMULINK diagram to calculate step and impulse response of the
above systems. Use 𝑅𝑅 = 3, 𝐿𝐿 = 4 and 𝐶𝐶 = 2 (Draw a block diagram to represent
the equations and draw the corresponding SIMULINK diagram before
implementing it on SIMULINK).

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

d) Construct a SIMULINK diagram to calculate step and impulse response of the

above systems

+Block Diagram for Step response:

+Scope 1:

Step Response: Using Transfer function

12
+Scope 2:

Step Response: Using State space function

+Block Diagram for Impulse response:

13
+Scope 1:

Impulse Response: Using Transfer function

+Scope 2:

Impulse Response: Using State space function

14
Lab Assignment

I. Inverting Operational Amplifier Circuit


For Figure 3 find the following:

R2=220kΩ C2=0.1μF

C1=5.6μF

v i(t) v 1(t)
- v 0(t)
+
R1=360kΩ

Figure 6: Inverted amplifier circuit.

a) Find the transfer function 𝑉𝑉0 (𝑠𝑠)


𝑉𝑉𝑖𝑖 (𝑠𝑠)
.

b) Write the state space equation of the above system.


c) Construct a Simulink model and calculate step and impulse responses of the
above systems.

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

We get our Transfer Function:


𝑉𝑉𝑜𝑜𝑜𝑜𝑜𝑜 (𝑠𝑠) 𝑍𝑍 (𝑠𝑠)
𝐻𝐻(𝑠𝑠) = =− 2
𝑉𝑉𝑖𝑖𝑖𝑖 (𝑠𝑠) 𝑍𝑍1 (𝑠𝑠)
15
𝑠𝑠𝑅𝑅2 𝐶𝐶2 + 1
−� �
𝑠𝑠𝑠𝑠2
=
𝑅𝑅1
𝑠𝑠𝑅𝑅1 𝐶𝐶1 + 1
(𝑅𝑅1 𝑅𝑅2 𝐶𝐶1 𝐶𝐶2 )𝑠𝑠2 + (𝑅𝑅1 𝐶𝐶1 + 𝑅𝑅2 𝐶𝐶2 )𝑠𝑠 + 1
=−
(𝑅𝑅1 𝐶𝐶2 )𝑠𝑠
2772𝑠𝑠2 + 127375𝑠𝑠 + 62500
=−
2250𝑠𝑠

𝑉𝑉𝑜𝑜𝑜𝑜𝑜𝑜 (𝑠𝑠) 𝑍𝑍 (𝑠𝑠) 2772𝑠𝑠2 + 127375𝑠𝑠 + 62500


𝐻𝐻(𝑠𝑠) = =− 2 =− (15)
𝑉𝑉𝑖𝑖𝑖𝑖 (𝑠𝑠) 𝑍𝑍1 (𝑠𝑠) 2250𝑠𝑠

b) Write the state space equation


From (24), we can use the Inverse Laplace Transform:
[−2772𝑠𝑠2 − 127375𝑠𝑠 − 62500]𝑉𝑉𝑖𝑖𝑖𝑖 (𝑠𝑠) = 2250𝑠𝑠𝑉𝑉𝑜𝑜𝑜𝑜𝑜𝑜 (𝑠𝑠)
−2772 𝑑𝑑2 𝑉𝑉𝑖𝑖𝑖𝑖 (𝑠𝑠) 127375 𝑑𝑑𝑉𝑉𝑖𝑖𝑖𝑖 (𝑠𝑠) 62500 𝑑𝑑𝑉𝑉 (𝑠𝑠)
�� � �−� � − 𝑉𝑉𝑖𝑖𝑖𝑖 (𝑠𝑠) = 𝑜𝑜𝑜𝑜𝑜𝑜
2250 𝑑𝑑𝑡𝑡2 2250 𝑑𝑑𝑑𝑑 2250 𝑑𝑑𝑑𝑑
𝑑𝑑2 𝑉𝑉𝑖𝑖𝑖𝑖 (𝑠𝑠) 𝑑𝑑𝑉𝑉 (𝑠𝑠) 𝑑𝑑𝑉𝑉 (𝑠𝑠)
−1.232 − 56.611 𝑖𝑖𝑖𝑖 − 27.777𝑉𝑉𝑖𝑖𝑖𝑖 (𝑠𝑠) = 𝑜𝑜𝑜𝑜𝑜𝑜
𝑑𝑑𝑡𝑡2 𝑑𝑑𝑑𝑑 𝑑𝑑𝑑𝑑

Since in an inverter amplifier: 𝑉𝑉𝑜𝑜𝑜𝑜𝑜𝑜 = −𝑉𝑉𝑖𝑖𝑖𝑖

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:

Step Response: Using State space function


+Block Diagram for Step & Impulse responses:

17
+Scope 2:

Impulse Response: Using State space function

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

Substitute (24) into (23)


2𝐽𝐽𝐽𝐽𝑠𝑠2 + 𝑏𝑏𝑣𝑣 𝜃𝜃𝜃𝜃
𝑉𝑉𝑎𝑎 (𝑠𝑠) = (𝑅𝑅𝑎𝑎 + 𝐿𝐿𝑎𝑎 𝑠𝑠) + 𝑘𝑘1 𝜃𝜃𝜃𝜃
𝑘𝑘2
𝑉𝑉𝑎𝑎 (𝑠𝑠) 2𝐽𝐽 𝑠𝑠2 + 𝑏𝑏𝑣𝑣 𝑠𝑠
= (𝑅𝑅𝑎𝑎 + 𝐿𝐿𝑎𝑎 𝑠𝑠) + 𝑘𝑘1 𝑠𝑠
𝜃𝜃 𝑘𝑘2
𝑠𝑠(𝑅𝑅𝑎𝑎 + 𝐿𝐿𝑎𝑎 𝑠𝑠)(2𝐽𝐽 + 𝑏𝑏𝑣𝑣 ) + 𝑘𝑘1 𝑘𝑘2 𝑠𝑠
=
𝑘𝑘2

20
𝜃𝜃(𝑠𝑠) 𝑘𝑘2
𝐻𝐻(𝑠𝑠) = =
𝑉𝑉𝑎𝑎 (𝑠𝑠) 𝑠𝑠(𝑅𝑅𝑎𝑎 + 𝐿𝐿𝑎𝑎 𝑠𝑠)(2𝐽𝐽 + 𝑏𝑏𝑣𝑣 ) + 𝑘𝑘1 𝑘𝑘2 𝑠𝑠
1
𝐻𝐻(𝑠𝑠) =
0.2𝑠𝑠3 + 30𝑠𝑠2 + 100.01𝑠𝑠

+State Space equation


𝜃𝜃(𝑠𝑠) 1
𝐻𝐻(𝑠𝑠) = =
𝑉𝑉𝑎𝑎 (𝑠𝑠) 0.2𝑠𝑠 + 30𝑠𝑠2 + 100.01𝑠𝑠
3

(0.2𝑠𝑠3 + 30𝑠𝑠2 + 100.01𝑠𝑠)𝜃𝜃 = 𝑉𝑉𝑎𝑎 (𝑠𝑠)


𝑑𝑑3 𝜃𝜃 𝑑𝑑2 𝜃𝜃 𝑑𝑑𝑑𝑑
0.2 + 30 + 100.01 = 𝑉𝑉𝑎𝑎 (𝑠𝑠)
𝑑𝑑𝑡𝑡3 𝑑𝑑𝑡𝑡2 𝑑𝑑𝑑𝑑
Let

𝑥𝑥1 (𝑠𝑠) = 𝜃𝜃
𝑥𝑥2 (𝑠𝑠) = 𝑥𝑥̇1 (𝑠𝑠) = 𝜃𝜃 ̇
𝑥𝑥3 (𝑠𝑠) = 𝑥𝑥̇2 (𝑠𝑠) = 𝑥𝑥̈1 (𝑠𝑠) = 𝜃𝜃 ̈
We get:

0.2𝑥𝑥̇3 (𝑠𝑠) + 30𝑥𝑥3 (𝑠𝑠) + 100.01𝑥𝑥2 (𝑠𝑠) = 𝑉𝑉𝑎𝑎 (𝑠𝑠)


𝑥𝑥̇3 (𝑠𝑠) = −150𝑥𝑥3 (𝑠𝑠) − 500.05𝑥𝑥2 (𝑠𝑠) + 5𝑉𝑉𝑎𝑎 (𝑠𝑠)
Therefore, the state space equation is:
𝑥𝑥̇1 0 1 0 0
ẋ = ⎢𝑥𝑥̇2 ⎤

⎥ = �0 0 1 � x + �0� 𝑉𝑉𝑎𝑎 (𝑠𝑠)
⎣𝑥𝑥̇3 ⎦ 0 −500.05 −150 5

y = 𝜃𝜃 = [1 0 0]x

b) Making block diagram and implement in SIMULINK

We first take the equation that we have derived from above

𝑉𝑉𝑎𝑎 (𝑠𝑠) − 𝑘𝑘1 𝜃𝜃𝜃𝜃 = 𝑖𝑖𝑎𝑎 (𝑅𝑅𝑎𝑎 + 𝑠𝑠𝐿𝐿𝑎𝑎 ) (25)


𝑒𝑒𝑎𝑎 (𝑠𝑠) = 𝑘𝑘1 𝜃𝜃𝜃𝜃 (26)
𝑇𝑇𝑒𝑒 (𝑠𝑠) = 𝑘𝑘2 𝑖𝑖𝑎𝑎 (27)
𝑇𝑇𝑒𝑒 (𝑠𝑠) = 𝑠𝑠𝑠𝑠(2𝐽𝐽𝐽𝐽 + 𝑏𝑏𝑣𝑣 ) (28)

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)

ia(s) k2 Te(s) Eq. (27)

Te(s) 1
2Js+bv
sθ(s) Eq. (28)

Since we have the block diagram we can combine them:

Va(s) +
-
1
Ra+s La
ia(s)
k2 Te(s) 1
2Js+bv
sθ(s)

k1

In order to get our desired output 𝜃𝜃(𝑠𝑠), we need to divide it by 𝑠𝑠

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

We also plug in the value of each parameters

+Scope:

Step Response of DC motor with Input V(s) and Output 𝜃𝜃


23
c) State the assumption about the step response of the DC motor

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

You might also like