Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 3

Code for Transient Response in R-L-C (series) Networks:

V = 10V , R = 400  , L = 10 H and C = 100 µF .

V = R i + L di/dt + 1/ C  i dt

Or, v / s = R I(s) + s L I(s) + I(s) / C s (all initial conditions are zero) (Taking the Laplace transform on
both side)

Or, 10 / s = 400 I(s) + 10 s I(s) + 10000 I(s) / s

Or, 10 = 400 s I(s) + 10 s 2 I(s) + 10000 I(s)

Or, I(s) = 10 / ( 10 s 2 + 400 s + 10000 )

Code:

>> syms s
>> ilaplace(10/(10*s^2+400*s+10000))

ans =

-1/2400*(-2400)^(1/2)*(exp((-20+1/2*(-2400)^(1/2))*t)-exp((-20-1/2*(-2400)^(1/2))*t))

>> t=0:0.00001:1;
>> i=-1/2400*(-2400)^(1/2)*(exp((-20+1/2*(-2400)^(1/2))*t)-exp((-20-1/2*(-2400)^(1/2))*t));
>> plot(t,i) and press Enter to get the graph
Code for Transient Response in R-L-C (parallel) Networks:

The switch in Figure has been opened for a long time. If the switch closes at t = 0, find the voltage v(t). Assume that
R = 10 , L = 1/32 H, C = 50µF and I S 2 A .

At t < 0, the voltage across the capacitor is

vC (0) (2) (10) 20 V


In addition, the current flowing through the inductor

iL (0) 0
At t > 0, the switch closes and all the four elements of Figure remain in parallel. Using KCL, we get

Taking the Laplace transform of the above expression, we get

Simplifying the above expression, we get

Code:
>> syms s
>> ilaplace((40000+20*s)/(s^2+2000*s+64*10^4))

ans =

-20/3*exp(-1600*t)+80/3*exp(-400*t)

>> t=0:0.001:.05;
>> i=-20/3*exp(-1600*t)+80/3*exp(-400*t);
>> plot(t,i) and press Enter to get the graph

You might also like