Transient Analysis-Modeling and Simulation-Lecture Handouts, Lecture notes of Mathematical Modeling and Simulation

This handout was provided by Dr. Asad Khan for Modeling and Simulation course at Pakistan Institute of Engineering and Applied Sciences, Islamabad (PIEAS). It includes: Transient,  Analysis, Mathematical Model, Kirchoff’s,  Current , Law, KCL, RLC Circuits, Differential

Typology: Lecture notes

2011/2012

Uploaded on 07/11/2012

qader
qader 🇵🇰

4.8

(14)

23 documents

1 / 7

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1CIS308‐ModelingandSimulation
Handout#5
TransientAnalysis
Inelectricalcircuits,theelementslikeinductors,capacitors,resistorsandsourcesareconnectedin
specificwaysthatestablishsomerelationshipbetweenthevariables.TheKirchoff’slawsexpressthe
fundamentalrelationsbetweenthevoltagesandcurrents,whichcanbeusedtoformulatedifferential
equations.
MathematicalModel
TheKirchoff’sCurrentLaw(KCL)establishestherelationshipbetweenthecurrentsenteringorgoingout
ofnodes.Itstatesthatthealgebraicsumofthecurrentsinallthebranchesthatconvergeinacommon
nodeisequaltozero.
Example:Inthecircuitshownbelow,therearefournodes0,1,2,and3.Thecurrentsinthebranches1
2,13,and10aredenotedbyi12,i13,i10respectively.Asthethreebranchesareconnectedtonode1,
theKCLgives
i12+i10+i13=0
Noticethedirectionsofthecurrents.Theyshouldhaveonesignifacurrententersthenodeandthe
oppositesignifitisleavingthenode.SimilarlytheKCLequationsfortheothernodeswillbe
i21+i20+i23=0;I31+i30+i32=0;I01+i02+i03=0
TheKirchoff’sVoltageLaw(KVL)relatesthevoltagesacrossthebranchesthatformaloop.Itstatesthat
thealgebraicsumofthevoltagesbetweensuccessivenodesthatformaclosedpathorloopisequalto
zero.
Theclosedpathsinthegivencircuitare1201,0230,1231,12301,13201,02130,0130.
Kirchoff’sVoltageLawappliedtotheseloopswillyieldtheequations
v12+v20+v01=0
v02+v23+v30=0
v12+v23+v31=0
v12+v23+v30+v01=0
v13+v32+v20+v01=0
v02+v21+v13+v30=0
docsity.com
pf3
pf4
pf5

Partial preview of the text

Download Transient Analysis-Modeling and Simulation-Lecture Handouts and more Lecture notes Mathematical Modeling and Simulation in PDF only on Docsity!

Handout#

Transient Analysis

In electrical circuits, the elements like inductors, capacitors, resistors and sources are connected in

specific ways that establish some relationship between the variables. The Kirchoff’s laws express the

fundamental relations between the voltages and currents, which can be used to formulate differential

equations.

Mathematical Model

The Kirchoff’s Current Law (KCL) establishes the relationship between the currents entering or going out

of nodes. It states that the algebraic sum of the currents in all the branches that converge in a common

node is equal to zero.

Example: In the circuit shown below, there are four nodes 0, 1, 2, and 3. The currents in the branches 1 ‐

2, 1 ‐3, and 1 ‐ 0 are denoted by i 12 , i 13 , i 10 respectively. As the three branches are connected to node 1,

the KCL gives

i 12 + i 10 + i 13 = 0

Notice the directions of the currents. They should have one sign if a current enters the node and the

opposite sign if it is leaving the node. Similarly the KCL equations for the other nodes will be

i 21 + i 20 + i 23 = 0; I 31 + i 30 + i 32 = 0; I 01 + i 02 + i 03 = 0

The Kirchoff’s Voltage Law (KVL) relates the voltages across the branches that form a loop. It states that

the algebraic sum of the voltages between successive nodes that form a closed path or loop is equal to

zero.

The closed paths in the given circuit are 1 ‐ 2 ‐ 0 ‐1, 0 ‐ 2 ‐ 3 ‐0, 1 ‐ 2 ‐ 3 ‐1, 1 ‐ 2 ‐ 3 ‐ 0 ‐1, 1 ‐ 3 ‐ 2 ‐ 0 ‐1, 0 ‐ 2 ‐ 1 ‐ 3 ‐0, 0 ‐ 1 ‐ 3 ‐0.

Kirchoff’s Voltage Law applied to these loops will yield the equations

v 12 + v 20 + v 01 = 0

v 02 + v 23 + v 30 = 0

v 12 + v 23 + v 31 = 0

v 12 + v 23 + v 30 + v 01 = 0

v 13 + v 32 + v 20 + v 01 = 0

v 02 + v 21 + v 13 + v 30 = 0

v 01 + v 13 + v 30 = 0

Modeling the RLC Circuits – Background Knowledge

Electrical circuits are built up of individual components, each of which is a two‐port, that is, components

have two connections or ports through which they exchange electrical signals with the rest of the

system (as shown below). Such a component can be characterized by the relationship between the

current flowing through the device ( I ) and the electrical potential difference across the device ( V ).

Current is the flow of electrical charge, measured in amperes , equal to coulombs/second, and electrical

potential is measured in volts. The voltage is the potential across the device, meaning, in this case, the

potential at the top connection minus the potential at the bottom connection.

By convention, the voltage arrowhead is at the positive end of the voltage difference. By convention, the

current is positive when it flows in the direction indicated by the current arrows and current is positive

when it flows through the component from the positive side of the voltage arrow, as shown in figure.

For practical circuits, charge cannot be created or destroyed within the component, so the current into

one connection is exactly equal to the current leaving the other connection. The three common circuit

elements and their current‐voltage models are shown in the figure below.

In the resistor , the current and voltage are proportional, with constant R, the resistance (units of ohms),

which characterizes the device. This model is called Ohms Law and is also frequently written as I=GV,

where the conductance G is 1/R.

The middle device is a capacitor , which stores charge on two parallel plates separated by an insulator.

The voltage across a capacitor is related to the charge Q stored as Q=CV. The current (I) through the

capacitor is equal to dQ/dt, and the two‐port model of the capacitor can be derived by differentiating. A

capacitor is characterized by its capacitance C, in units of farads.

The third model is for an inductor , a coil of wire, whose two port model, is like that of a capacitor,

except that it is current which is differentiated. The inductor is characterized by its inductance L, in units

of henrys. For linear circuits, the parameters R, G, C, and L are constants.

Let Q=Q(t) denote the charge at time t, I = I(t) denote the current at time t, and V = V(t) denote the

voltage at time t. We have the following relations

For an inductor (which behaves like a mass)

dt

dI

V L

dt

dI

V

inductor inductor

inductor

inductor ∝ ⇒ =

The constant L is called the inductance.

0 (^ ) 0 ()

CR

v t

dt

dv t

If V is the initial charge across the capacitor, then the solution to the equation is given by

⎟ ⎠

⎞ ⎜ ⎝

⎛ −

CR

t

v 0 ( t ) Ve

where CR is the time constant. The equation represents the voltage across a discharging capacitor.

To obtain the voltage across a charging capacitor, consider the following

figure shown on right. Using the Kirchoff Current Law (KCL), we get

0 (^ ) 0 ()

R

v t V

dt

dv t

C

s

If the capacitor is initially uncharged, that is v (^) o (t) at t = 0, the solution to the above equation is given as

⎟ ⎠

⎞ ⎜ ⎝

⎛ − CR

t

v 0 ( t ) Vs 1 e

RL Network

A resistor‐inductor circuit (RL circuit) , or RL filter or RL network , is one of

the simplest analogue infinite impulse response electronic filters. It consists

of a resistor and an inductor, either in series or in parallel, driven by a

voltage source.

Using the Kirchoff’s Voltage Law

  • Rit = dt

dv t L

i

If the initial current flowing through the inductor is I then the solution to the above equation is

⎟ ⎠

⎞ ⎜ ⎝

⎛ −

τ

t

i ( t ) Ie where τ = L/R

The above equation represents the current response of a source‐free RL circuits with initial current I,

and it represents the natural response of an RL circuit.

Consider the following figure shown on right. Using the Kirchoff Current

Law (KVL), we get

Rit V s dt

dit L + ()=

()

If the initial current flowing through the series circuit is zero, the solution of the equation is

⎛ = −

− ( ) ( ) 1 L

Rt s e R

V it

The voltage across the resistor is

⎛ = = −

⎟ ⎠

⎜ ⎞ ⎝

−⎛ L

Rt

vR ( t ) Ri ( t ) Vs 1 e

The voltage across the inductor is

⎟ ⎠

⎞ ⎜ ⎝

⎛ − = − =

L

Rt

vL ( t ) Vs vR ( t ) Vse

General Solution with MATLAB

Graph Functions in MATLAB

MATLAB has built‐in functions that allow one to generate bar charts, x‐y, polar, contour and 3 ‐D plots,

and bar charts. MATLAB also allows one to give titles to graphs, label the x‐ and y‐axes, and add a grid to

graphs. In addition, there are commands for controlling the screen and scaling. The table below gives a

list of MATLAB built‐in graph functions.

Plotting Functions

FUNCTION DESCRIPTION FUNCTION DESCRIPTION

axis freezes the axis limits pause wait between plots

bar plots bar chart plot performs linear x‐y plot

contour performs contour plots polar performs polar plot

ginput puts cross‐hair input from mouse semilogx does semilog x‐y plot (x‐axis logarithmic)

grid adds grid to a plot semilogy does semilog x‐y plot (y‐axis logarithmic)

gtext does mouse positioned text shg shows graph screen

histogram gives histogram bar graph stairs performs stair‐step graph

hold holds plot (for overlaying other plots) text positions text at a specified location on graph

loglog does log versus log plot title used to put title on graph

mesh performs 3 ‐D mesh plot xlabel labels x‐axis

meshdom domain for 3 ‐D mesh plot ylabel labels y‐axis 2

1. For an R‐L circuit, the voltage v(t) and current i(t) are given as

v(t) = 10cos(377t), i(t) = 5cos(377t+

o )

Sketch v(t) and i(t) for t=0 to 20 milliseconds.

t = 0:1E-3:20E-3;

v = 10cos(377t);

a_rad = (60*pi/180); % angle in radians

i = 5cos(377t + a_rad);

plot(t,v,'*',t,i,'o')

title('Voltage and Current of an RL circuit')

xlabel('Sec')

ylabel('Voltage(V) and Current(mA)')

text(0.003, 1.5, 'v(t)');

text(0.009,2, 'i(t)')

3. For the sequential circuit shown in figure, the current

flowing through the inductor is zero. At t = 0, the switch

moved from position a to b, where it remained for 1 s.

After the 1 s delay, the switch moved from position b to

position c, where it remained indefinitely. Sketch the

current flowing through the inductor versus time.

For 0 < t < 1, we can use equation

⎛ = − ⎟

⎛ = −

− ( ) −( ) () 1 0. 41 τ^1

t L

Rt s e e R

V it

where τ = L/R=200/100=2s

At t = 1 second

( ) max

  1. 5 )

i ( t )= 0. 41 − e = I

⎟⎟ ⎠

⎞ ⎜⎜ ⎝

⎛ − −

2

  1. 5

() max

τ

t

it I e

At t > 1 second

where τ = L/Req2=200/100=1s

% tau1 is time constant when switch is at b

% tau2 is the time constant when the switch is in position c

tau1 = 200/100;

for k=1:

t(k) = k/20;

i(k) = 0.4*(1-exp(-t(k)/tau1));

end

imax = i(20); tau2 = 200/200;

for k = 21:

t(k) = k/20;

i(k) = imax*exp(-t(k-20)/tau2);

end

% plot the current

plot(t,i,'o')

axis([0 6 0 0.18])

title('Current of an RL circuit')

xlabel('Time, s')

ylabel('Current, A')

0 1 2 3 4 5 6

0

Current of an RL circuit

Time, s

Current, A