Lecture 8:
Modeling Electrical Systems
determine the mathematical models that
capture the behavior of an electrical system
1. Elements making up an electrical system
2. First-principles modeling of electrical
systems in the time domain
3. Modeling in the Laplace domain (next
time)
1
Modeling Electrical Systems
• Voltage (e) – is a measure of the force that causes
electrons to move through a circuit (a potential
measured w.r.t. a ground)
• Current (i) – is a measure of the rate of flow of charge
(electrons) through a circuit (i=dq/dt), current has
direction
2
Modeling Electrical Systems
Electrical systems consist
of three basic types of
elements
1. Resistance elements
2. Capacitance elements
3. Inductance elements
3
Modeling Electrical Systems
• Resistance Elements
e = iR (Ohm's law)
• Dissipate energy (like a damper)
• Resistance has units of an Ohm (Ω)
4
Modeling Electrical Systems
• Capacitance Elements
q 1 1
C = e = q = idt
e C C
• Capacitance is measured as charge stored per unit
voltage
• If you apply a voltage across a capacitor a
potential builds up that is then released if the
voltage is removed … in other words, capacitors
store potential energy (like a spring) 5
• Capacitance has units of a Farad (F)
Modeling Electrical Systems
• Inductance Elements
di
e=L
dt
• An inductor is a coil of wire such that current
through the coil generates a magnetic field which
induces a voltage that is proportional to how fast
the current is changing
• If power is disconnected, the induced voltage will
make the current continue to flow (like an inertia)
• Inductance elements store kinetic energy 6
• Inductance has units of a Henry (H)
Electrical Circuits
• Resistors in series
e = e1 + e2 + e3 = iR1 + iR2 + iR3
= i( R1 + R2 + R3 )
e
Requiv = = R1 + R2 + R3 8
i
Electrical Circuits
• Resistors in parallel
i = i1 + i2 + i3
e e e
= + +
R1 R2 R3
1 1 1
= e + +
R1 R2 R3
−1
e 1 1 1
Requiv = = + + 9
i R1 R2 R3
Electrical Circuits
• Kirchoff’s Current Law (node law)
• Current in to a node is conserved
i1 + i3 = i2 + i4 + i5
10
Electrical Circuits
• Kirchoff’s Voltage Law (loop law)
• Sum of voltages around a loop
equals zero
di 1
e − iR − L − (i )dt = 0
dt C
11
Electrical Circuits
• Use one equation for each loop
• Assume a direction for current, if solution is
negative, know direction is opposite
ei +
_ C R eo
i1 i2
di1 1
loop 1: ei − L − (i1 − i2 )dt = 0
dt C
1
loop 2: − i2 R − (i2 − i1 )dt = 0 12
C
Electrical Circuits
• Equations can be rewritten in terms of
charge q 1
loop 1: ei − Lq1 − (q1 − q2 ) = 0
C
1
loop 2: − q2 R − (q2 − q1 ) = 0
C
• A mechanical analog exists for each circuit
• What are the state variables?
13
QUIZ
Electromechanical Systems
Mathematical Modelling
of Liquid Level Systems
Laminar vs Turbulent Flow
• Laminar Flow
– Flow dominated by viscosity
forces is called laminar flow and
is characterized by a smooth,
parallel line motion of the fluid
• Turbulent Flow
– When inertia forces dominate,
the flow is called turbulent flow
and is characterized by an
irregular motion of the fluid.
Resistance of Liquid-Level Systems
• Consider the flow through a short pipe connecting two
tanks as shown in Figure.
• Where H1 is the height (or level) of first tank, H2 is the
height of second tank, R is the resistance in flow of liquid
and Q is the flow rate.
Resistance of Liquid-Level Systems
• The resistance for liquid flow in such a pipe is defined as the change
in the level difference necessary to cause a unit change inflow rate.
change in level difference m
Resistance = = 3
change in flow rate m /s
( H1 − H 2 ) m
R= = 3
Q m /s
Resistance in Laminar Flow
• For laminar flow, the relationship between the steady-state flow
rate and steady state height at the restriction is given by:
Q = kl H
• Where Q = steady-state liquid flow rate in m/s3
• Kl = constant in m/s2
• and H = steady-state height in m.
• The resistance Rl is dH
Rl =
dQ
Capacitance of Liquid-Level Systems
• The capacitance of a tank is defined to be the change in quantity of
stored liquid necessary to cause a unity change in the height.
change in liquid stored m 3
Capacitance = = or m 2
change in height m
• Capacitance (C) is cross sectional area (A) of the tank.
Capacitance of Liquid-Level Systems
Rate of change of fluid volume in the tank = flow in − flow out
dV
= qi − q o
dt
d ( A h)
= qi − q o
dt
Capacitance of Liquid-Level Systems
dh
A = qi − q o
dt
dh
C = qi − q o
dt
Modelling Example#1
• The rate of change in liquid stored in the tank is equal to the flow in
minus flow out.
dh
C = qi − q o (1)
dt
• The resistance R may be written as
dH h
R= = (2)
dQ q0
• Rearranging equation (2)
h
q0 = (3)
R
dh h
C = qi − q o (1) q0 = (4)
dt R
• Substitute qo in equation (3)
dh h
C = qi −
dt R
• After simplifying above equation
dh
RC + h = Rq
dt i
• Taking Laplace transform considering initial conditions to zero
RCsH ( s ) + H ( s ) = RQi ( s )
RCsH ( s ) + H ( s ) = RQi ( s )
• The transfer function can be obtained as
H (s) R
=
Qi ( s ) ( RCs + 1)
Modelling Example#1
• The liquid level system considered here is analogous to the
electrical and mechanical systems shown below.
deo
RC + eo = ei
dt
b dxo
+ x o = xi
dh k dt
RC + h = Rq
dt i
Modelling Example#2
• Consider the liquid level system shown in following Figure. In this
system, two tanks interact. Find transfer function Q2(s)/Q(s).
• Tank 1 Pipe 1 h1 − h2
C1
dh1
= q − q1 R1 =
dt q1
dh h2
• Tank 2 C 2 2 = q1 − q 2 Pipe 2 R2 =
dt q2
dh1 h1 − h2 h1 − h2
• Tank 1 C1 = q− Pipe 1 q1 =
dt R1 R1
dh2 h1 − h2 h2 h2
• Tank 2 C 2 = − Pipe 2 q2 =
dt R1 R2 R2
• Re-arranging above equation
dh1 h1 h2 dh2 h2 h2 h1
C1 + = q+ C2 + + =
dt R1 R1 dt R1 R2 R1
dh1 h1 h dh2 h2 h2 h1
C1 + = q+ 2 C2 + + =
dt R1 R1 dt R1 R2 R1
• Taking LT of both equations considering initial conditions to zero [i.e.
h1(0)=h2(0)=0].
1 1
C1s + H 1 ( s ) = Q( s ) + H 2 (s) (1)
R1 R1
1 1 1
C 2 s + +
H 2 (s) = H1 ( s ) (2)
R1 R2 R1
1 1 1 1 1
C1s + H 1 ( s ) = Q( s ) + H 2 ( s ) (1) C 2 s + + H 2 ( s ) = H1 ( s ) (2)
R1 R1 R1 R2 R1
• From Equation (1)
R1Q( s ) + H 2 ( s )
H1 ( s ) =
R1C1s + 1
• Substitute the expression of H1(s) into Equation (2), we get
1 1 1 R1Q( s ) + H 2 ( s )
C 2 s + +
H 2 (s) =
R1 R2 R1 R1C1s + 1
1 1 1 R1Q( s ) + H 2 ( s )
C 2 s + + H 2 ( s ) =
R1 R2 R1 R1C1s + 1
• Using H2(s) = R2Q2 (s) in the above equation
(R2C 2 s + 1)(R1C1s + 1) + R2C1s Q2 ( s ) = Q( s )
Q2 ( s ) 1
=
Q( s ) R2 C1 R1C 2 s 2 + (R1C1 + R2 C 2 + R2 C1 )s + 1
Modelling Example#3
• Write down the system differential equations.
Thermal Systems
Thermal Systems
• Basic Modeling Elements
– Resistance
• Conduction
• Convection
• Radiation
– Capacitance
• Interconnection Relationships
– Energy Balance - 1st Law of Thermodynamics
• Derive Input/Output Models
Variables
• q : heat flow rate [J/sec = W] ( current, power )
• T : temperature [oK] or [oC] ( voltage )
Temperature in a body usually depends on spatial as well as temporal coordinates. As a
result, the dynamics of a thermal system has to be described by partial differential
equations. Moreover, nonlinearities are often essential in describing the heat transfer by
radiation and convection. However, very few nonlinear PDEs have analytical (closed
form) solutions. Usually, finite element methods (FEM) are used to numerically solve
nonlinear PDE problems. Our purpose is to try to use lumped model approximations of
thermal systems to obtain linear ODEs that are capable of describing the dynamic
response of thermal systems to a good first approximation.
Basic Modeling Elements
• Thermal Resistance Ex: Two bodies at temperatures T1 and T2 are
Describes the heat transfer process through separated by two elements with different
an element with the characteristic that the thermal resistance R1 and R2. Heat flows
heat flow rate across the element is through the two elements at a rate of q.
proportional to the temperature difference Find the equivalent thermal resistance Req
across the element, i.e. and solve for the interface temperature
between the two elements.
T1 + T − T2
T1 T2 T1 R1 R2 T2 T1 q T2
q
R q
R Req
q
T = T12 = T1 − T2 = R q T1 R1 T0 R2 T2
or
1 1 1
q = (T1 − T2 ) = T q= (T1 − T0 ) q q
R1
R R R1T2 + R2T1
T0 =
( K J)
1
T q= (T0 − T2 ) R1 + R2
o
R= R2
q
R1q + R2 q = T1 − T2
T1 − T2
Req = = R1 + R2
q
Three Types of Heat Transfer
• Conduction Ex: Calculate the equivalent thermal
Heat transfer through solid or continuous resistance of a wall with a window.
media via random molecular motion Wall Window
(diffusion). Area AW AG
Thickness dW dG
a aW aG
T1 q T2
Resistors connected in Parallel
dW
d Cross sectional area A RW RW =
T aW AW
T1
RG dG
RG =
T a G AG
2 RW
x 1 1 1 1
aA aA T d = + +
q= (T1 − T2 ) = T12 R = 12 = Req RW RG RW
d d q aA 2aW AW a A
= + G G
dW dG
– a : thermal conductivity [W/m-oK] 2aW AW d G + a G AG dW
=
dW d G
Three Types of Heat Transfer
• Convection • Radiation
Heat transfer between the interface of a Heat transfer via electromagnetic waves
solid material and a fluid material via
bulk motion of the fluid. T1 T2
q
– A : surface area [m2]
– h : convective heat transfer
coefficient [W/m2-oK] Surface Area
A
– TS : surface temperature [oK] q = s FE FV A (T14 − T2 4 )
– TF : fluid temperature [oK]
q = hA (TS − TF ) = hA T – A : surface area [m2]
– s : Stefan-Boltzmann constant
1
R= [W/m2-oK4]
hA – FE : effective emissivity
– FV : view factor
– h depends on surface geometry,
fluid flow rate, temperature, flow Nonlinear! Will not be considered in this
direction, ... course
Q: How would we model the process of
storing thermal energy ?
Basic Modeling Elements
• Thermal Capacitance
The ability of a substance to hold or store
If there is net heat flow into the material,
heat is the heat capacity of the material and it
the temperature of the material will
behaves like a thermal capacitance. Since
change and the rate of temperature
the specific heat cP can be interpreted as the
change is proportional to the net heat
heat storage capacity of the material per unit
flow rate qstore:
mass, the total heat storage capability of a
material is: d
cP M TC = qstore = qIN − qOUT
cP M dt
+ TC − Thermal Capacitance
TC
qIN qOUT qIN - qOUT
C
C = cP M = cP r V
C Mass, M
Note:
Volume, V
Density, r The above relationship holds only if we
assume that the temperature is uniform
across the entire material.
Interconnection Laws
Energy Balance - 1st Law of Thermodynamics
– Energy stored in the system is the sum of the net energy inflow, the energy
generated within the system and the work done on the system:
d
qstore = qIN − qOUT + qGENERATED ' + WWORK
WITHIN dt DONE
– Thermal EOMs are obtained by the balance of energy
– Remember that there is NO inertia in macroscopic thermal system
Example (a simple first order system)
Ex: A material with a thermal capacitance C is surrounded by an insulation
material with thermal resistance R. Heat is added to the inner material at a
rate of qi(t). Find the system model, if the inner material temperature TC is to
be the output.
qi
Tc
Ta dTc T −T
TC , C = qi − c a q1 R
dt q R qc
C R qstore
IN
qOUT
qi
C + Ta
dTc
RC + Tc = Rqi + Ta -
qi(t) dt
Tr
Equivalent electrical circuit
Example
Ta: qi Tc1
q1 R1
TC2 qi Tc2
TC1 C1 C2 qc1 C1 R2
R1 qc2 C2 +
q2
R2
-Ta
Tr
Equivalent electrical circuit
qi(t) State Space Representation:
EOMs:
dTc1
1 1 dTc1 − 1 1 1
0
C1 + Tc1 − Tc2 = qi dt
R1C1 R1C1
Tc1 C1 q
dt R1 R1 = + i
dTc2 1 −
1
+
1 Tc2 1 Ta
dt R C
0
1 1
dTc2 1 2 C2 R1 C2 R2 X C2 R2 u
1 T
C2 + + Tc2 − Tc1 = a X A B
dt R1 R2 R1 R2
Steady State (equilibrium)?
Example
State Space Representation: EOMs for changes in temperatures
from equilibrium :
dTc1 − 1 1 1
dt R1C1 R1C1 T C 0 q
c1 X = X E + X
=
+ 1
i
dTc2 1 1 1 Tc2 1 Ta d d
dt R C − C R + C R X C2 R2 u
0 X = (X − XE )
1 2 2 1 2 2 dt dt
X A B
d
Steady State (equilibrium)? = X = AX + Bu
dt
X =0 = A ( X E + X ) + Bu
A is invertibel
−1
= AX + AX E + Bu
XE = − A Bu
0
R + R1 1 qi = AX
= 2 T
2
R 1 a
TA
In Class Example
Ex: The Pentium processor under normal hA
operation will generate heat at a rate of Heat Sink
qi(t). The processor itself has a specific dS
heat of cP. The cross sectional area of the AP cP , rP , TP dP
chip is AP with a thickness of dP. The qi
average density of the processor is rP . qi qR
To help dissipate the heat and reduce the Tp
processor temperature TP, a heat sink
with the same cross sectional area and an Rs
qi qc Ra
average thickness of dS is added on top of
the processor. The heat sink has a C +
thermal conductivity of aS . The effective - TA
conduction area between the heat sink
and processor is approximated by AP . To Tr
dTP T − Ta
further improve heat dissipation, a fan is 1st law: C = qi − p
used to generate air flow on top of the dt q
Rs + Ra
IN
qstore
heat sink, the effective convection qOUT
coefficient is hA and the effective contact C = C p r pV p = C p r p Ap d p
area between the heat sink and the air
ds 1
flow is AS . The temperature inside the Rs = Ra =
a s Ap ha As
computer is maintained at TA. Find the
relationship between qi(t) and the
dTP
temperature of the processor TP. ( Rs + Ra ) C + Tp = ( Rs + Ra ) qi + Ta
dt
Req