Chapter 2 Switched communication systems

Example 2.2, page no 125

In [9]:
from __future__ import division
#given
Io=4*10**-3 #rqueired operating current
N1=10000 #no of turns in the main winding
R1=645 #resistence of the main winding in ohms
N2=200 #no of turns in auxillary winding
B=2 #spacing bias
Iaux=B/N2 #maximum auxillary current
print "maximum auxillary current is:%0.2f mA\n"%(Iaux*1e3)
MMFaux=N2*Iaux #MMF in the auxillary winding
print "MMF in the auxillary winding is:%0.2fAT \n"%(MMFaux)
MMFop=Io*N1 #operating MFF in main winding
print "MMF in main winding is:%0.2f AT \n"%(MMFop)
MMFnet=MMFop+(0.1*MMFop) #net MMF required in main winding
print "net MMF required in main winding is:%0.2f AT \n"%(MMFnet)
Iop=MMFnet/N1 #operating current needed
print "operating current needed is:%0.2f mA \n"%(Iop*1e3)
V=Iop*R1 #working voltage in volts
print "working voltage is:%0.2f volts \n"%(V)
maximum auxillary current is:10.00 mA

MMF in the auxillary winding is:2.00AT 

MMF in main winding is:40.00 AT 

net MMF required in main winding is:44.00 AT 

operating current needed is:4.40 mA 

working voltage is:2.84 volts 

Example 2.3,page no 125

In [1]:
#given
C=6000#Tatol no of call in busy hour
SC=5000#no of subscribers
CR=C/SC#busy hour calling rate
print "Busy hour calling rate is:%0.2f \n"%(CR)
T=2.5/60#avarage duration of calls in hours

A=C*T#rate of traffic flow
print "Rate of traffic flow is %0.2f traffic unit "%(A)
Busy hour calling rate is:1.00 

Rate of traffic flow is 250.00 traffic unit 

Example 2.4,page no 126

In [11]:
from __future__ import division
from math import log
#given
L=3#relay inductance in henry
R=1500#relay resistance in ohm
Io=20e-3#oparating current in amps
Ir=8e-3#release current in amps

V=50#supply volatage in volts
Im=V/R#maxixmum current in amps
print "maxixmum current is %0.2f mamps \n"%(Im*1e3)
to=(L/R)*log(1/(1-(Io/Im)))#operate lag in sec
print "operate lag is %0.2f msec \n"%(to*1000)
tr=(L/R)*log(Im/Ir)#release lag in sec
print "release lag is %0.2f msec \n"%(tr*1000)
maxixmum current is 33.33 mamps 

operate lag is 1.83 msec 

release lag is 2.85 msec 

Example 2.4.1,page no 126

In [1]:
from __future__ import division
#given
#a
C_S1=20/3#speed in characters per second
P_C1=1/C_S1#periods per character
print "(a)\nperiods per character is:%0.2f msec\n"%(P_C1*1e3)
E_C1=7.5#elements per character
P_E1=P_C1/E_C1#period per element
print "period per element is:%0.2f msec\n"%(P_E1*1e3)
Sb1=1/P_E1#speed in bauds
print "speed is:%0.2f bauds\n\n"%(Sb1)
#b
C_S2=10#speed in characters per second
P_C2=1/C_S2#periods per character
print "(b)\nperiods per character is:%0.2f msec\n"%(P_C2*1e3)
E_C2=7.5#elements per character
P_E2=P_C2/E_C2#period per element
print "period per element is:%0.2f msec\n"%(P_E2*1e3)
Sb2=1/P_E2#speed in bauds
print "speed is %0.2f bauds\n\n"%( Sb2)
#c
C_S3=10#speed in characters per second
P_C3=1/C_S3#periods per character
print "(c)\nperiods per character is:%0.2f msec\n"%(P_C3*1e3)
E_C3=10#elements per character
P_E3=P_C3/E_C3#period per element
print "period per element is:%0.2f msec\n"%(P_E3*1e3)
Sb3=1/P_E3#speed in bauds
print "speed is %0.2f bauds\n"%(Sb3)
(a)
periods per character is:150.00 msec

period per element is:20.00 msec

speed is:50.00 bauds


(b)
periods per character is:100.00 msec

period per element is:13.33 msec

speed is 75.00 bauds


(c)
periods per character is:100.00 msec

period per element is:10.00 msec

speed is 100.00 bauds

Example 2.5,page no 127

In [13]:
from __future__ import division
#given
N=1000#no of turns
L1=5e-8#inductance per turn
L=N**2*L1#total inductance
print "total inductance is %0.2f H \n"%(L)
R=100#resistance of winding in ohm
MMF=5#operating MMF in amp. turn
V=1#voltage of received signal in volts
Im=V/R#maximum current
print "maximum current is %0.2f mA \n"%(Im*1e3)
Io=MMF/N#operating current
print "operating current is %0.2f mA \n"%(Io*1e3)
to=(L/R)*log(1/(1-(Io/Im)))#operate lag
print "operate lag is %0.2f msec \n"%(to*1e3)
total inductance is 0.05 H 

maximum current is 10.00 mA 

operating current is 5.00 mA 

operate lag is 0.35 msec 

Example 2.6,page no 128

In [1]:
#given
S=10000#no of subscribers
C=16000#Tatol no of call in busy hour
CR=C/S#busy hour calling rate
print "Busy hour calling rate is:%0.2f \n"%(CR)
T=2.6#avarage duration of calls in min

A=C*(T/60)#rate of traffic flow
print "Rate of traffic flow is %0.2f traffic unit "%(A)
Busy hour calling rate is:1.00 

Rate of traffic flow is 693.33 traffic unit 

Example 2.7,page no 135

In [2]:
#given
N=7#no of character elements
E_C=10#elements per character (1+7+1+1)
To=100e-3#duration of one character
Te=To/E_C#duration of each element
print "duration of each element is:%0.2f msec\n"%(Te*1e3)
Sb=1/Te#speed in bauds
print "speed is %0.2f bauds\n"%(Sb)
C=2**N#total possible combinations
print "total possible combinations are:%0.2f"%(C)
duration of each element is:10.00 msec

speed is 100.00 bauds

total possible combinations are:128.00

Example 2.8,page no 129

In [3]:
#given
S=1000#no of subscribers
T=2.4/60#avarage duration of calls in hours
A=60#rate of traffic flow
C=A/T#Tatol no of call in busy hour
print "Total no of call in busy hour is:%0.2f calls per Hour\n"%(C)
CR=C/S#busy hour calling rate
print "Busy hour calling rate is:%0.2f \n"%(CR)
SCL=30#no of call lost per hour

B=SCL/(C+SCL)#grade of service
print "grade of service is: %0.2f"%(B)
Total no of call in busy hour is:1500.00 calls per Hour

Busy hour calling rate is:1.50 

grade of service is: 0.02

Example 2.9,page no 129

In [4]:
from math import factorial
#given
N=5#no of switches
A=0.9#traffic offered 
#grade of service B=(A**N/N!)/(1+A+A**2/2!+A**3/3!+...+A**N/N!)
#here
B=(A**N/factorial(N))/(1+A+(A**2/factorial(2))+(A**3/factorial(3))+(A**4/factorial(4))+(A**5/factorial(5)))
print "grade of service is: %0.2e\n"%(B)
Tl=A*B#traffic lost
print "traffic lost is: %0.2e"%(Tl)
grade of service is: 2.00e-03

traffic lost is: 1.80e-03