Chapter 2: Communication Systems

Example 2.1, Page 21

In [2]:
import math

#Variable declaration
# diameter of dish (m)
d=30.;
#frequency of radiation (Hz)
f=4.*10**9;
# speed of light(m/s)
c=3.*10**8;
# efficiency of aperture
e=0.6;


#Calculations&Results
wavelength=c/f
print "wavelength of radiating signal=%.3f m"%wavelength
A=math.pi*d**2/4
print "area of aperture A=%.4f m**2"%A
G=4*math.pi*A*e/wavelength**2
print "antenna gain G=%.3f or %.0f dB"%(G,10*math.log10(G))
BW=65*wavelength/d
print "half power beam width = %.4f degree"%BW
wavelength of radiating signal=0.075 m
area of aperture A=706.8583 m**2
antenna gain G=947482.023 or 60 dB
half power beam width = 0.1625 degree

Example 2.2, Page 22

In [3]:
import math
import scipy

#Variable declaration
#impedance of transmission line
Za=73.
#impedance of antenna
Zo=50.
#radiation efficiency
ecd=1.

#Calculations&Results
from scipy import integrate
x = lambda x:math.sin(x)**4
I,err=integrate.quad(x,0,math.pi)
Do=(4*math.pi)/(I*2*math.pi)
print "Do=%.4f=%.4f dB"%(Do,10*math.log10(Do))
#voltage reflection coefficient
F=(Za-Zo)/(Za+Zo)
print "voltage reflection coefficient =%f"%F
#mismatch efficiency of antenna
er=1-F**2
print "mismatch efficiency of antenna =%.4f=%.4f dB"%(er,10*math.log10(er))
#overall gain
Go=10*math.log10(Do)+10*math.log10(er)+10*math.log10(ecd)
print "overall gain = %.4f dB"%Go
Do=1.6977=2.2985 dB
voltage reflection coefficient =0.186992
mismatch efficiency of antenna =0.9650=-0.1546 dB
overall gain = 2.1439 dB

Example 2.3, Page 24

In [4]:
import math
import numpy

#Variable declaration
print "unit vector along the polarization of incident wave is ui=[1 0 0]"
ui=[1, 0, 0];
print "unit vector along the antenna polarization ua=[1 1 0]*(1/sqrt(2))\n"
q = (1/math.sqrt(2));

#Calculations
ua = [x * q for x in [1,1,0]]
d=[a*b for a,b in zip(ui,ua)]

#Result
print "polarization loss factor |ui*ua|**2=%.2f or = %.2f dB"%(d[0]**2,10*math.log10(d[0]**2))
unit vector along the polarization of incident wave is ui=[1 0 0]
unit vector along the antenna polarization ua=[1 1 0]*(1/sqrt(2))

polarization loss factor |ui*ua|**2=0.50 or = -3.01 dB

Example 2.4, Page 25

In [5]:
import math

#Variable declaration 
# output of high power amplifier(W)
Pt=500;
#efficiency
e=0.8;
#gain of transmitting antenna(60dB=10**6)
G=10**6;

#Calculations&Results
Pant=e*Pt
print "output power of antenna Pant=%.f W"%Pant
L=Pt/Pant
print "input/output power ratio =%.2f=%.4f dB"%(L,10*math.log10(L))
EIRP=Pt*G/L
print "EIRP =%.4f dBw"%(10*math.log10(Pt)+10*math.log10(G)-10*math.log10(L))
print "EIRP=%.2e W"%EIRP
output power of antenna Pant=400 W
input/output power ratio =1.25=0.9691 dB
EIRP =86.0206 dBw
EIRP=4.00e+08 W

Example 2.5, Page 26

In [11]:
import math

#Variable declaration
R = 35860000.  #m
F = 4.*10**9   #operating frequency,Hz
c = 3.*10**8   #m/s

#Calculations
lamda = c/f   #m
spl = ((4*math.pi*R)/lamda)**2

#Result
print "Space loss ratio = %.2e"%spl
#incorrect answer in textbook
Space loss ratio = 3.61e+19

Example 2.6, Page 28

In [12]:
import math

#Variable declaration
#transmitting antenna gain (dB)
Gt=37
# ground station antenna gain (dB)
Gr=45.8
#frequency of signal
f=20*10**3
#distance from ground station
R=36941.031

#Calculations&Results
Pt=10*math.log10(2000)
print "power transmitted\n\tPt = %.4f dB\n"%Pt
Pr=Pt+Gt+Gr-20*math.log10(f*R)-32.4418    #Pt,Pr in dBm and Gt,Gr in dB f in MHz and R in km
print "power received at earth station\n\t = %.4f dBm"%Pr
Gt=0    #Gt in dB
Gr=0    #Gr in dB
Pr=Pt+Gt+Gr-20*math.log10(f*R)-32.4418 
print "if two antennas are isotropic \n\t = %.4fdB, or  %.4emW"%(Pr,10**(Pr/10))
power transmitted
	Pt = 33.0103 dB

power received at earth station
	 = -94.0023 dBm
if two antennas are isotropic 
	 = -176.8023dB, or  2.0882e-18mW

Example 2.7, Page 30

In [13]:
import math

#Variable declaration
# input power to the antenna(W)
Ps=2;
#reflection coefficient of transmitting antenna
Yt=0.1
#reflection coefficient of receiving antenna
Yr=0.2
#distance between two antennas
#consider
A=10**(-5)
R=100*(A)
#maximum directivity of receiving antenna(20 dB = 10**(20/10))
Gr=10**(20./10)
#maximum directivity of transmitting antenna(16dB=10**(16/10))
Gt=10**(16./10)

#Calculations&Results
# power transmitted in the forward direction
Pt = (1-Yt**2)*Ps
print "power transmitted in the forward direction\n\t = %.2f W"%Pt
#Friis transmission equation
Pr=Pt*(A/(4*math.pi*R))**2*Gr*Gt
print "Friis equation \n\t = %fW or %.f mW"%(Pr,Pr*1000)

#power delivered to receiver
Pd=(1-Yr**2)*Pr
print "power delivered to receiver\n\t = %.1f mW"%(Pd*1000)
power transmitted in the forward direction
	 = 1.98 W
Friis equation 
	 = 0.004992W or 5 mW
power delivered to receiver
	 = 4.8 mW

Example 2.8, Page 31

In [14]:
import math

#Variable declaration
#power transmission(W)
Pt=25000
#operating frequency(Hz)
f=12*10**9
#gain of transmitter antenna(25dB)
Gt=10**(25./10)
#gain of receiver antenna(25dB)
Gr=10**(25./10)
#distance between two radars(m)
R=10000
#surface area of target radar(m**2)
A=8
c=3.*10**8

#Calculations&Results
#wavelength L
L=c/f
print "wavelength of signal = %.3f m"%L
Pr=Gr*Gt*Pt*A*L**2/(4*math.pi*(4*math.pi*R**2)**2)
print "received power = %.2eW or %.2f pW"%(Pr,Pr*10**12)
wavelength of signal = 0.025 m
received power = 6.30e-13W or 0.63 pW

Example 2.9, Page 36

In [15]:
import math

#Variable declaration
#noise power at Th=290 K(dBm)
P1=-70.
Th=290.
#noise power at Tc=77 K(dBm)
P2=-75.
Tc=77.
#given noise temperature(K)
Ts=450 
#frequency band B
B=1.5*10**9-500*10**6
#power gain of amplifier(10dB=10)
G=10
#boltzamn constant
k=1.38*10**(-23)

#Calculations&Results
#Y-factor(Y=P1/P2 = (P1-P2)dBm)
Y=10**((P1-P2)/10)
print " Y-factor = %.4f"%Y
#equivalent noise temperature
Te=(Th-Y*Tc)/(Y-1)
print "equivalent noise temperature = %.2f K"%Te
#noise power output of amplifier
Po=G*k*Ts*B+G*k*Te*B
print "noise power output = %.4e W or %.4f dBm"%(Po,10*math.log10(Po*1000))
 Y-factor = 3.1623
equivalent noise temperature = 21.51 K
noise power output = 6.5068e-11 W or -71.8663 dBm

Example 2.10, Page 38

In [16]:
import math

#Variable declaration
#noise figure(dB)
NF=3.5
#band width(Hz)
B=(12-10)*10**9
#amplifier gain
G=10**(20./10)
To=290
k=1.38*10**-23

#Calculations&Results
#noise factor
F=10**(NF/10)
print "noise factor = %.4f"%F
No=F*k*To*B*G
print "output noise power = %.4e W or %.1f dBm"%(No,10*math.log10(No*1000))
noise factor = 2.2387
output noise power = 1.7919e-09 W or -57.5 dBm

Example 2.11, Page 42

In [17]:
import math

#Variable declaration
#ambient temperature(K)
Te=300.
To=290.
#noise temperature of amplifier(K)
Ta=150.
k=1.38*10**-23
#band width(Hz)
B=100.*10**6
#gain of amplifier
Gamp=10**(15./10)
# for transmission lines
Gline=1./10**0.2

#Calculations&Results
#noise factor for amplifier
Famp=1+Ta/To
print "Famp=1+Ta/To"
#noise for transmission lines
Fline=1+(1./Gline-1)*Te/To
print "Fline=1+(1/Gline-1)*Te/To"
Fcascaded=Fline+(Famp-1)/Gline
print "(a)noise figure of cascaded system\n\t = %.4f or %.4f dB"%(Fcascaded,10*math.log10(Fcascaded))
Fcascaded=Famp+(Fline-1)/Gamp
print "(b)if the amplifier is connected before the line\n\t = %.4f or %.4f dB"%(Fcascaded,10*math.log10(Fcascaded))
Famp=1+Ta/To
Fline=1+(1/Gline-1)*Te/To
(a)noise figure of cascaded system
	 = 2.4248 or 3.8468 dB
(b)if the amplifier is connected before the line
	 = 1.5364 or 1.8650 dB

Example 2.12, Page 43

In [18]:
import math

#Variable declaration
#noise factor of A1
F1=10**(3./10)
#noise factor of A2
F2=10**(5./10)
#gain of amplifier A1
G1=10**(20./10)
#gain of amplifier A2
G2=10**(20./10)

#Calculations&Results
#overall gain of cascaded system
G=G1*G2
print "overall gain of cascaded system = %.2f or %.f dB"%(G,10*math.log10(G))

#overall noise figure of cascaded system
F=F1+(F2-1)/G1
print "overall noise of cascaded system = %.6f or %.3f dB"%(F,10*math.log10(F))    #some difference in result is due to approx in calculation
F=F2+(F1-1)/G2
print "overall noise of cascaded system when order of amplifiers is changed = %.6f or %.6f dB"%(F,10*math.log10(F))
overall gain of cascaded system = 10000.00 or 40 dB
overall noise of cascaded system = 2.016885 or 3.047 dB
overall noise of cascaded system when order of amplifiers is changed = 3.172230 or 5.013647 dB

Example 2.13, Page 45

In [19]:
import math

#Variable declaration
#noise factor
F=10**(10/10)

#Calculations&Results
print "(a)B=1MHz"
B=1
Pimds=-111+F+10*math.log10(B)     #F in dB, B in MHz, Pidms in dBm
print "\tPimds = %.1f dBm or %.2e mW"%(Pimds,10**(Pimds/10))

print "(b)B=1GHz"
B=1000
Pimds=-111+F+10*math.log10(B)     #F in dB, B in MHz, Pidms in dBm
print "\tPimds = %.1f dBm or %.2e mW"%(Pimds,10**(Pimds/10))

print "(c)B=10GHz"
B=10000
Pimds=-111+F+10*math.log10(B)     #F in dB, B in MHz, Pidms in dBm
print "\tPimds = %.1f dBm or %.2e mW"%(Pimds,10**(Pimds/10))

print "(d)B=1kHz"
B=0.001
Pimds=-111+F+10*math.log10(B)     #F in dB, B in MHz, Pidms in dBm
print "\tPimds = %.1f dBm or %.2e mW"%(Pimds,10**(Pimds/10))
(a)B=1MHz
	Pimds = -101.0 dBm or 7.94e-11 mW
(b)B=1GHz
	Pimds = -71.0 dBm or 7.94e-08 mW
(c)B=10GHz
	Pimds = -61.0 dBm or 7.94e-07 mW
(d)B=1kHz
	Pimds = -131.0 dBm or 7.94e-14 mW

Example 2.14, Page 51

In [20]:
#Variable declaration
#input signal(dBm)
Pin=-15
#intercept point of characteristic curve(dBm)
Pip=25

#Calculations
Pimr=(Pin-Pip)*2     #Pimr in dB; Pin,Pip in dBm

#Result
print "intermodulation ratio = %.1f dB"%Pimr
intermodulation ratio = -80.0 dB

Example 2.15, Page 52

In [21]:
import math

#Variable declaration
To=290
#bandwidth(Hz)
B=500*10**3
k=1.38*10**-23
#noise factor
F=10**(8./10)
#input power at IP
Pip=10

#Calculations&Results
Nf=k*To*B*F
print "Nf = %.4e or %.2f dBm"%(Nf,10*math.log10(Nf*1000))
Nf=10*math.log10(Nf*1000)   #Nf in dBm
DR=2./3*(Pip-Nf)    #DR in dB; Pip,Nf in dBm
print "dynamic range = %.2f dB"%DR
Nf = 1.2625e-14 or -108.99 dBm
dynamic range = 79.33 dB