#page no 517
#calculate the characteristic impedance of polyethylene
#prob no. 15.1
from math import sqrt
#Dielectric constt=2.3
#given
er=2.3;
#calculations
#Determination of characteristic impedance
Z=377./sqrt(er);
#results
print 'The charasteristic impedance of polyethylene is',round(Z,3),'ohm'
#calculate the max power density
#page no 518
#prob no. 15.2
#given
#Dielelectric strength of air=3MV/m
e=3*10**6;#electric field strength
Z=377.;#impedance of air
#calculations
Pd=(e**2)/Z;#Determination of power density
#results
print 'The max power density is',round(Pd/10**9,3),'GW/m2'
#calculate the power density
#page no 520
#prob no. 15.3
from math import pi
#given
#An isotropic radiator with power 100W & dist given is 10km
Pt=100;r=10*10**3;
#calculations
#Determination of power density at r=10km
Pd=Pt/(4*pi*(r**2));
#results
print 'Power density at a point 10km',Pd*10**9,'nW/m2'
#calculate the electric field strength
#page no 521
#prob no. 15.4
from math import sqrt
#given
#An isotropic radiator radiates power=100W at point 10km
Pt=100.;r=10.*10**3;
#calculations
#Determination of electric field strength
e=sqrt(30*Pt)/r;
#results
print 'The electric field strength is',e*1000,'mW/m'
#calculate the power delivered
#page no 525
#prob no. 15.5
from math import log10
#A transmitter with power o/p=150W at fc=325MHz.antenna gain=12dBi receiver antenna gain=5dBi at 10km away
#given
#considering no loss in the system
d=10.;Gt_dBi=12.;Gr_dBi=5.;fc=325.;Pt=150.;
#calculations
#Determination of power delivered
Lfs=32.44+(20*log10(d))+(20*log10(fc))-(Gt_dBi)-(Gr_dBi);
Pr=Pt/(10**(Lfs/10));
#results
print 'The power delivered to receiver is',round(Pr*10**9,3),'nW'
#calculate the power delivered to receiver
#page no 525
#prob no. 15.6
#given
from math import log10
#A transmitter with o/p power=10W at fc=250MHz,connected to Tx 10m line with loss=3dB/100m t0 antenna with gain=6dBi.
#Rx antenna 20km away with gain=4dBi
#Refer fig.15.6,assuming free space propagation
d=20;fc=250.;Gt_dBi=6.;Gr_dBi=4.;loss=3./100;Zl=75.;Zo=50.;L=10.;Pt=10.;
#calculations
Lfs=32.44+(20*log10(d))+(20*log10(fc))-Gt_dBi-Gr_dBi;#path loss
L_tx=L*loss;#Determination of loss
ref_coe=(Zl-Zo)/(Zl+Zo);#Reflection coefficient
L_rx=1-(ref_coe**2);#Proportion of incident power that reaches load
L_rx_dB=-10*log10(L_rx);#Converting that proportion in dB
#Determination of total loss Lt
Lt=(Lfs)+(L_tx)+(L_rx_dB);
#Determination of power delivered to receiver
Pt_Pr=10**(Lt/10);#Power ratio
Pr=Pt/Pt_Pr;
#results
print 'The power delivered to receiver is',Pr,'W'
#calculate the angle of refraction
#page no 530
#prob no. 15.7
#given
from math import sqrt, sin, asin,pi
#A radio wave moves from air(er=1) to glass(er=7.8).angle of incidence=30 deg
theta_i=30.;er1=1;er2=7.8;
#calculations
#determination of angle of refraction
theta_r=asin((sin(theta_i*pi/180.))/(sqrt(er2/er1)));
#results
print 'The angle of refraction is',round(theta_r*180/pi,3),'degree'
#calculate the max usable freq
#page no 537
#prob no. 15.8
#given
from math import cos,pi
#A Tx statn with fc=11.6MHz & angle of incidence=70 degree
theta_i=70.;fc=11.6;#in MHz
#calculations
#determination of max usable freq(MUF)
MUF=fc/(cos(theta_i*pi/180.));
#results
print 'The max usable freq MUF is',round(MUF,2),'MHz'
#calculate the max common distance in both cases
#page no 539
#prob no. 15.9
#given
from math import sqrt
#A taxi compony using central dispatcher with antenna height=15m & taxi antenna height=1.5m
ht=15.;hr=1.5;
#calculations and results
#a)Determination of max commn dist betn dispatcher and taxi
d1=sqrt(17*ht)+sqrt(17*hr);
print 'a)The max common distance between dispatcher & taxi',round(d1,3),'km'
#b)Determination of max ommn dist betn 2 taxis
d2=sqrt(17*hr)+sqrt(17*hr);#ht=hr=height of antenna of taxi cab
print 'The max common distance between two taxi is',round(d2,3),'km'
#calculate the fading period in both cases
# page no 545
# prob no 15.11
#given
# An automobile travels at 60km/hr
v=60.*10**3/(60*60);#conversion of car's speedto m/s
c=3.*10**8;#speed of light
#part a) calculation of time between fades if car uses a cell phone at 800*10**6Hz
f=800.*10**6;
#calculations and results
T=c/(2*f*v);
print 'The fading period is',T,'sec'
#part b) calculation of time between fades if car uses a PCS phone at 1900*10**6Hz
f=1900.*10**6;
T=c/(2*f*v);
print 'The fading period is',round(T,5),'sec'
# Note that the rapidity of the fading increases with both the frequency of the transmissions and the speed of the vehicle
#calculate the no. of cell sites
#page no 550
#given
# problem no 15.12
A=1000.;#metropolitian area expressed in sq. km
r=2;#radius of cell in km
#calculations
# Number of cell sites given as
N=A/(3.464*r**2);
#results
print 'Number of cell sites are',round(N)