Part B : Chapter 4 : Radio Communication

Example 4.1 Page no : 4.3

In [46]:
import math 

fc = 100.;				#kHz
fm = 5.;				#kHz

# Calculations and Results
LSB = [fc-fm ,fc];				#kHz
USB = [fc, fc+fm];				#kHz
print ("Part (a)");
print ("Lower sideband is from "+str(LSB[0])+" kHz to "+str(LSB[1])+" kHz");
print ("Upper sideband is from "+str(USB[0])+" kHz to "+str(USB[1])+" kHz");
B = 2*fm;				#kHz
print "(b) Bandwidth(kHz)",B
print ("part (c)");
fm = 3;				#kHz
f_usf = fc+fm;				#kHz
print "Upper side frequency(kHz)",f_usf
f_lsf = fc-fm;				#kHz
print "Lower side frequency(kHz)",f_lsf
Part (a)
Lower sideband is from 95.0 kHz to 100.0 kHz
Upper sideband is from 100.0 kHz to 105.0 kHz
(b) Bandwidth(kHz) 10.0
part (c)
Upper side frequency(kHz) 103.0
Lower side frequency(kHz) 97.0

Example 4.2 Page no : 4.9

In [47]:
import math 

# Variables
fc = 500.;				#kHz
fm = 10.;				#kHz
#Am = 7.5*Vp & Ac = 20*Vc
Em = 7.5;				#times of Vp
Ec = 20.;				#times of Vp(unmodulated carrier)

# Calculations and Results
print ("Part (a)");
f_usf = fc+fm;				#kHz
print "Upper side frequency(kHz)",f_usf
f_lsf = fc-fm;				#kHz
print "Lower side frequency(kHz)",f_lsf
print ("Part (b)");
m = Em/Ec;				#modulation coefficient
print "Modulation coefficient",m
M = 100*m;				#% modulation
print "% Modulation",M
print ("Part (c)");
Ec1 = Ec;				#times of Vp(modulated carrier)
Eusf = m*Ec/2;				#times of Vp
Elsf = m*Ec/2;				#times of Vp
print ("Peak amplitude of modulated carrier is "+str(Ec1)+"*Vp");
print ("Upper & lower side frequency voltages, Eusf  =  Elsf  =  "+str(Eusf)+"*Vp");
print ("Part (d)");
Vmax = Ec+Em;				#times of Vp
Vmin = Ec-Em;				#times of Vp
print ("Maximum amplitude of envelope is "+str(Vmax)+"*Vp");
print ("Minimum amplitude of envelope is "+str(Vmin)+"*Vp");
Part (a)
Upper side frequency(kHz) 510.0
Lower side frequency(kHz) 490.0
Part (b)
Modulation coefficient 0.375
% Modulation 37.5
Part (c)
Peak amplitude of modulated carrier is 20.0*Vp
Upper & lower side frequency voltages, Eusf  =  Elsf  =  3.75*Vp
Part (d)
Maximum amplitude of envelope is 27.5*Vp
Minimum amplitude of envelope is 12.5*Vp

Example 4.3 Page no : 4.14

In [48]:
import math 

# Variables
fc = 1.;				#MHz
fm = 5.;				#kHz
m = 60./100;				#Modulation
Pc = 6;				#kW
RL = 50.;				#W

# Calculations and Results
Pavg = Pc*(1+m**2/2);				#kW(Average power delivered to load)
print ("Part(a)");
print "Average power of modulated signal(kW)",Pavg
PdB = 10*math.log10(Pavg*1000);				#dB
print "Average power of modulated signal(dB) :%.2f"%PdB
PdBm = 10*math.log10(Pavg*10**6);				#dBm
print "Average power of modulated signal(dBm) : %.2f"%PdBm
print ("Part(b)");
VS_RMS = math.sqrt(2*RL*Pavg*1000)/1000;				#kV
print "RMS voltage of modulated signal(kV) : %.2f"%VS_RMS
Vp = math.sqrt(2)*VS_RMS;				#V
print "Peak value of modulated signal(kV) : %.2f"%Vp
#Answer is wrong in the book.
Part(a)
Average power of modulated signal(kW) 7.08
Average power of modulated signal(dB) :38.50
Average power of modulated signal(dBm) : 68.50
Part(b)
RMS voltage of modulated signal(kV) : 0.84
Peak value of modulated signal(kV) : 1.19

Example 4.4 Page no : 4.15

In [49]:
# Variables
Vc = 10.;				#times of Vp
RL = 10.;				#ohm
m = 1.;				#modulation coefficient

# Calculations and Results
Pc = Vc**2/2/RL;				#W
Pusb = m**2*Pc/4;				#W
Plsb = m**2*Pc/4;				#W
print ("Part(a)");
print "Carrier power(W)",Pc
print "Upper side band power(W)",Pusb
print "Lower side band power(W)",Plsb
print ("Part(b)");
Psbt = m**2*Pc/2;				#W
print "Total side band power(W)",Psbt
print ("Part(c)");
Pt = Pc*(1+m**2/2);				#W
print "Total power of modulated wave(W)",Pt
print ("Part(e)");
m = 0.5;				#modulation coefficient
Pusb = m**2*Pc/4;				#W
Plsb = m**2*Pc/4;				#W
print "Carrier power(W)",Pc
print "Upper side band power(W)",Pusb
print "Lower side band power(W)",Plsb
Psbt = m**2*Pc/2;				#W
print "Total side band power(W)",Psbt
Pt = Pc*(1+m**2/2);				#W
print "Total power of modulated wave(W)",Pt
Part(a)
Carrier power(W) 5.0
Upper side band power(W) 1.25
Lower side band power(W) 1.25
Part(b)
Total side band power(W) 2.5
Part(c)
Total power of modulated wave(W) 7.5
Part(e)
Carrier power(W) 5.0
Upper side band power(W) 0.3125
Lower side band power(W) 0.3125
Total side band power(W) 0.625
Total power of modulated wave(W) 5.625

Example 4.5 Page no : 4.21

In [51]:
import math 

# Variables
RF = 200.;				#kHz
IF = 10.;				#kHz

# Calculations
BI = RF/IF;				#unitless(Bandwidth Improvement)
NF = 10*math.log10(BI);				#dB

# Results
print "Noise Figure improvement(dB) : %.f"%NF
Noise Figure improvement(dB) : 13

Example 4.6 Page no : 4.35

In [52]:
import math 

# Variables
#Part (a)
K1 = 5.;				#kHz/V
#vm(t) = 2*math.cos(2*p*2000*t);
Vm = 2.;				#V
fm = 2000.;				#Hz

# Calculations and Results
delta_f = K1*Vm;				#kHz
print "(a) Pak frequency deviation(kHz) : %.2f"%delta_f
m = delta_f*1000/fm;				#modulation index
print "(a) Modulation index : %.2f"%m
#Part (b)
K = 2.5;				#rad/V
#vm(t) = -math.cos(2*p*2000*t);
fm = 2000;				#Hz
m = K*Vm;				#rad(Peak phase shift)
print "(b) Peak phase shift(rad) : %.2f"%m
(a) Pak frequency deviation(kHz) : 10.00
(a) Modulation index : 5.00
(b) Peak phase shift(rad) : 5.00

Example 4.7 Page no : 4.36

In [53]:
import math 

# Variables
#v(t) = 20*math.sin(6.28*10**6*t+10*math.sin(6.28*10**3*t));
#Comparing with VPM(t) = A*math.sin(omega_c*t+mp*math.sin(omega_m*t))
A = 20;
omega_c = 6.28*10**6;				#rad
omega_m = 6.28*10**3;				#rad
# Calculations
fc = omega_c/2/math.pi/10**6;				#MHz
fm = omega_m/2/math.pi/10**3;				#kHz
mp = 10;				#modulation index
delta_theta = mp;				#radians

# Results
print "(a) Carrier freuency(MHz)",fc
print "(b) Modulating freuency(kHz)",fm
print "(c) Modulation index(mp)",mp
print "(d) Peak phase deviation(radians)",delta_theta
(a) Carrier freuency(MHz) 0.999493042617
(b) Modulating freuency(kHz) 0.999493042617
(c) Modulation index(mp) 10
(d) Peak phase deviation(radians) 10

Example 4.8 Page no : 4.39

In [63]:
%matplotlib inline
from matplotlib.pyplot import plot,title,xlabel,ylabel,bar

# Variables
delta_f = 10.;				#kHz
fm = 10.;				#kHz
Vc = 10.;				#V
fc = 500.;				#kHz

# Calculations and Results
m = delta_f/fm;				#modulation index
#For m = 1 we have 3 sidebands
B = 2*(3*fm);				#kHz
print "(a) Actual minimum bandwidh(kHz)",B
B = 2*(fm+delta_f);				#kHz
print "(b) Approximate minimum bandwidh(kHz)",B
A0 = 0.77*fm;				#V
A1 = 0.44*fm;				#V
A2 = 0.11*fm;				#V
A3 = 0.02*fm;				#V
#For frequency spectrum
A = [A3, A2, A1, A0, A1, A2, A3];				#V(Amplitudes)
f = [fc-3*fm ,fc-2*fm, fc-fm, fc, fc+fm, fc+2*fm, fc+3*fm];				#kHz
bar(f,A);
title('Output frequency spectrum');
xlabel('Frequency(kHz)');
ylabel('Amplitudes(V)');
(a) Actual minimum bandwidh(kHz) 60.0
(b) Approximate minimum bandwidh(kHz) 40.0

Example 4.9 Page no : 4.40

In [64]:
# Variables
#Part (a)
delta_f = 75.;				#kHz
fm = 15.;				#kHz

# Calculations and Results
DR = delta_f/fm;				#Deviation ratio
print "(a) Deviation ratio",DR
#For m or DR = 5 we have 8 sidebands
B = 2*(8*fm);				#kHz
print "(a) Bandwidh for worst case(kHz)",B
#Part (b)
delta_f = 75./2;				#kHz
fm = 15./2;				#kHz
DR = delta_f/fm;				#Deviation ratio
print "(b) Deviation ratio or modulation index",DR
#For m or DR = 5 we have 8 sidebands
B = 2*(8*fm);				#kHz
print "(b) Bandwidh for worst case(kHz)",B
(a) Deviation ratio 5.0
(a) Bandwidh for worst case(kHz) 240.0
(b) Deviation ratio or modulation index 5.0
(b) Bandwidh for worst case(kHz) 120.0

Example 4.10 Page no : 4.44

In [65]:
# Variables
#Part (a)
ft = 88.8;				#MHz
N1N2N3 = 20;				#frequency multiplication

# Calculations and Results
fc = ft/N1N2N3;				#MHz
print "(a) Master oscillator center frequency(MHz)",fc
delta_ft = 75.;				#kHz
delta_f = delta_ft*1000/N1N2N3;				#Hz
print "(b) Frequency deviation at the output(Hz)",delta_f
fm = 15;				#kHz
DR = delta_f/1000/fm;				#Deviation ratio at output
print "(c) Deviation ratio at the output",DR
DR = DR*N1N2N3;				#Deviation ratio at antenna
print "(d) Deviation ratio at the antenna",DR
(a) Master oscillator center frequency(MHz) 4.44
(b) Frequency deviation at the output(Hz) 3750.0
(c) Deviation ratio at the output 0.25
(d) Deviation ratio at the antenna 5.0

Example 4.11 Page no :4.46

In [66]:
import math 

# Variables
VCO = 200.;				#ppm(VCO stability)
fc = 5.1;				#MHz
ft_old = 91.8;				#MHz
k0 = 10.;				#kHz/V
kd = 2.;				#V/kHz
f2 = 30.6;				#MHz

# Calculations
fc = fc*10**6+(VCO*10**-6*fc*10**6);				#Hz(with feedback loop open)
N1 = 2;
N2 = 3;
f2_new = N1*N2*fc;				#Hz
df2 = f2_new-f2*10**6;				#Hz(Frequency drift)
ft = N2*f2_new/10**6;				#MHz(Transmit frequency)
df2_reduced = df2/(1+N1*N2*kd*k0);				#Hz(reduced frequency drift)
df2_reduced = round(df2_reduced);				#Hz
print "Reduced frequency drift(Hz)",df2_reduced
f2dash = f2*10**6+df2_reduced;				#Hz(New transmit frequency of antenna)
ftnew = f2dash*N2;				#Hz
print "New transmit frequency of antenna(Hz)",ftnew
old_drift = ft*10**6-ft_old*10**6;				#Hz
new_drift = ftnew-ft_old*10**6;				#Hz
print ("The frequency drift at the antenna has been reduced from "+str(old_drift)+" Hz to\
 "+str(new_drift)+" Hz. This fulfill the FCC requirements.")
Reduced frequency drift(Hz) 51.0
New transmit frequency of antenna(Hz) 91800153.0
The frequency drift at the antenna has been reduced from 18360.0 Hz to 153.0 Hz. This fulfill the FCC requirements.