# Chapter 45: Transients and Laplace transforms

### Example 1, page no. 903

In :
from __future__ import division
import math
import cmath
#initializing  the  variables:
C  =  500E-9;#  in  Farad
R  =  100000;#  in  Ohm
V  =  50;#  in  VOlts
ti  =  0.15;#  in  sec
tc  =  0.08;#  in  sec
Vrt  =  35;#  in  Volts

#calculation:
#Initial  current,
i0  =  (V/R)
#when  time  t  =  150ms  current  is
i150  =  (V/R)*math.e**(-1*ti/(R*C))
#capacitor  voltage,  Vc
Vc  =  V*(1  -  math.e**(-1*tc/(R*C)))
#time,  t
tvr  =  -1*R*C*math.log(Vrt/V)

#Results
print  "\n\n  Result  \n\n"
print  "\n  initial  value  of  current  flowing  is  ",round(i0*1E3,2),"mA"
print  "\n  current  flowing  at  t  =  150ms  is  ",round(i150*1E6,2),"uA"
print  "\n    value  of  capacitor  voltage  at  t  =  80ms  is  ",round(Vc,2),"  V"
print  "\n    the  time  after  connection  when  the  resistor  voltage  is  35  V  is  ",round(tvr*1E3,2),"msec"


Result

initial  value  of  current  flowing  is   0.5 mA

current  flowing  at  t  =  150ms  is   24.89 uA

value  of  capacitor  voltage  at  t  =  80ms  is   39.91   V

the  time  after  connection  when  the  resistor  voltage  is  35  V  is   17.83 msec


### Example 2, page no. 905

In :
from __future__ import division
import math
import cmath
#initializing  the  variables:
C  =  5E-6;#  in  Farad
R  =  2000000;#  in  Ohm
V  =  200;#  in  VOlts
tc  =  20;#  in  sec

#calculation:
#capacitor  voltage,  Vc
Vc  =  V*(math.e**(-1*tc/(R*C)))

#Results
print  "\n\n  Result  \n\n"
print  "\n    value  of  capacitor  voltage  at  t  =  20s  is  ",round(Vc,2),"  V"


Result

value  of  capacitor  voltage  at  t  =  20s  is   27.07   V

### Example 3, page no. 907

In :
from __future__ import division
import math
import cmath
#initializing  the  variables:
L  =  0.05;#  in  Henry
R  =  5;#  in  Ohm
V  =  110;#  in  VOlts
ti  =  0.004;#  in  sec
tvr  =  0.006;#  in  sec
tvl  =  0.006;#  in  sec
it  =  15;#  in  amperes

#calculation:
#steady  state  current  i
i  =  V/R
#when  time  t  =  4ms  current  is
i4  =  (V/R)*(1  -  math.e**(-1*ti*R/L))
#resistor  voltage,  VR
VR6  =  V*(1  -  math.e**(-1*tvr*R/L))
#inductor  voltage,  VL
VL6  =  V*(math.e**(-1*tvl*R/L))
#time,  t
ti  =  (-1*L/R)*math.log(1  -  it*R/V)

#Results
print  "\n\n  Result  \n\n"
print  "\n  steady  state  current  i  is  ",round(i,2),"  A"
print  "\n  when  time  t  =  4ms  current  is  is  ",round(i4,2),"  A"
print  "\n    value  of  resistor  voltage  at  t  =  6ms  is  ",round(VR6,2),"  V"
print  "\n    value  of  inductor  voltage  at  t  =  6ms  is  ",round(VL6,2),"  V"
print  "\n    the  time  after  connection  when  the  current  is  15  V  is  ",round(ti,5),"  sec"


Result

steady  state  current  i  is   22.0   A

when  time  t  =  4ms  current  is  is   7.25   A

value  of  resistor  voltage  at  t  =  6ms  is   49.63   V

value  of  inductor  voltage  at  t  =  6ms  is   60.37   V

the  time  after  connection  when  the  current  is  15  V  is   0.01145   sec

### Example 4, page no. 909

In :
from __future__ import division
import math
import cmath
#initializing  the  variables:
i  =  5;#  in  Amperes
L  =  2#  in  Henry
i1  =  0.2;#  in  Amperes
R  =  10;#  in  Ohm

#calculation:
#time  t
ti  =  (-1*L/R)*math.log(i1/i)
#voltage  across  the  resistor  is  a  maximum
VRm  =  i*R

#Results
print  "\n\n  Result  \n\n"
print  "\n    time  t  for  the  current  in  the  2  H  inductor  to  fall  to  200  mA  is  ",round(ti,3),"  sec"
print  "\n    max  voltage  across  the  resistor  is  ",VRm,"  V"


Result

time  t  for  the  current  in  the  2  H  inductor  to  fall  to  200  mA  is   0.644   sec

max  voltage  across  the  resistor  is   50   V

### Example 5, page no. 911

In :
from __future__ import division
import math
import cmath
#initializing  the  variables:
L  =  0.002#  in  Henry
R  =  1000;#  in  Ohm
C1  =  5E-6;#  in  farad
C2  =  5E-9;#  in  farad

#calculation:
a  =  (R/(2*L))**2
b  =  1/(L*C1)
if  (a>b):
s1  =  "overdamped";
elif  (a<b):
s1  =  "underdamped";
else:
s1  =  "critically  damped";
c  =  1/(L*C2)
if  (a>c):
s2  =  "overdamped";
elif  (a<c):
s2  =  "underdamped";
else:
s2  =  "critically  damped";

#Results
print  "\n\n  Result  \n\n"
print  "\n    circuit  is  ",s1
print  "\n    if  C  =  5  nF,  circuit  is  ",s2


Result

circuit  is   overdamped

if  C  =  5  nF,  circuit  is   underdamped

### Example 6, page no. 912

In :
from __future__ import division
import math
import cmath
#initializing  the  variables:
L  =  0.002#  in  Henry
R  =  1000;#  in  Ohm

#calculation:
a  =  (R/(2*L))**2
#for  critically  damped
C  =  4*L/R**2

#Results
print  "\n\n  Result  \n\n"
print  "\n    capacitance  C  is  ",C*1E9,"nF"


Result

capacitance  C  is   8.0 nF

### Example 7, page no. 913

In :
from __future__ import division
import math
import cmath
#initializing  the  variables:
L  =  1.5#  in  Henry
R  =  90;#  in  Ohm
C = 5*1E-6; # in Farad
V = 10; # in Volts

#calculation:
a = -1*R/(2*L)
b = (1/(L*C) - (R/(2*L))**2)**0.5
V0 = V
I0 = 0
A = V0
B = (I0 - C*a*V0)/(C*b)

#Results
print "\n\n  Result  \n\n"
print "Current, i = e^(",a,"t) (",round((a*C*B - A*C*b),4),"sin(",round(b,1),"t)  + (",round((-1*a*C*A + B*C*C*b),0),"cos(",round(b,1),"t) Amps."


Result

Current, i = e^( -30.0 t) ( -0.0183 sin( 363.9 t)  + ( 0.0 cos( 363.9 t) Amps.