# Page Number: 4.9
# Example 4.3
# Given
fc=1.*10.**6.; # Hz
kf=5.;
mt=1.*10.**5.; # Hz
# (a) mi(t) with fm
mi=(fc+(kf*mt));
print"Max, Inst. Frequency with FM",mi,"Hz"
import math
kp=3.;
# (b) mi2(t) with pm
mi2=fc+(mt*(kp/(2*math.pi)));
print"Max, Inst. Frequency with PM",mi2,"Hz"
# Page Number: 4.13
# Example 4.9
# Given
delf=20.*10.**3.; # hz
fm=10.*10.**3.; # Hz
B=delf/fm;
print"Beta: ",B
# Page Number: 4.16
# Example 4.13
# Given
# x(t)=10cos((2*pi*10**8*t)+(200cos(2*pi*10**3*t)))
# on differentiating
# wi=2*pi*(1D+8)-4*pi*sin(2*pi*(1D+3)*t)
# Therefore
import math
delw=4.*math.pi*(1.*10.**5.);
wm=2.*math.pi*(1.*10.**3.);
B=delw/wm;
wb=2.*(B+1.)*wm;
fb=wb/2.*math.pi;
print"Wb",wb,"rad/s"
print"Fb",fb,"Hz"
# Page Number: 4.17
# Example 4.14
# Given
delf=100.*10.**3; # Hz
fc=20.*10.**6.; # Hz
# As B=delf/fm;
# (a) fm1=1*10.**3hz
print'Part a'
fm1=1.*10.**3.; # Hz
B1=delf/fm1;
print'Modulation Index',B1
fb1=2.*delf;
print'Bandwidth',fb1,'Hz'
# (b) fm2=100*10.**3hz
print'\nPart b'
fm2=100.*10.**3.; # Hz
B2=delf/fm2;
print'Modulation Index',B2
fb2=2.*(B2+1.)*fm2;
print'Bandwidth',fb2,'Hz'
# (c) fm3=500*10.**3hz
print'\nPart c'
fm3=500.*10.**3.; # Hz
B3=delf/fm3;
print'Modulation Index',B3
fb3=2.*fm3;
print'Bandwidth',fb3,'Hz'
# Page Number: 4.17
# Example 4.15
# Given
# x(t)=10cos(wct+3sinwmt)
# Comparing with standard equation
B=3.;
fm=1.*10.**3.; # hz
fb=2.*(B+1.)*fm;
# (a)fm is doubled
fma=2.*fm;
fba=2.*(B+1.)*fma;
print"fb with 2fm: ",fba
# (b)fm is one halved
fmb=fm/2.;
fbb=2.*(B+1.)*fmb;
print"fb with 0.5fm: ",fbb
# Page Number: 4.18
# Example 4.16
# Given
# x(t)=10cos(wct+3sinwmt)
# Comparing with standard equation of fm
B=3.;
fm=1.*10.**3.; # hz
fb=2.*(B+1.)*fm;
# B is inversaly proportional to fm
# (a)fm is doubled
Ba=B/2.;
fma=2.*fm;
fba=2.*(Ba+1.)*fma;
print"fb with 2fm: ",fba
# (b)fm is one halved
Bb=2.*B;
fmb=fm/2.;
fbb=2.*(Bb+1.)*fmb;
print"fb with 0.5fm: ",fbb
# Page Number: 4.18
# Example 4.17
# Given
fm=2.*10.**3.; # Hz
delf=5.*10.**3.; # Hz
# (a) Bandwidth of modulated signal
B=delf/fm;
fb=2.*(B+1.)*fm;
print'Bandwidth',fb,'Hz'
# (b)Max. frequency deviation and Bandwidth of new signal
# Given
fm1=fm-(1.*10.**3.);
delf1=3.*delf;
B1=delf1/fm1;
fd=B1*fm1;
print'Maximum frequency deviation',fd,'Hz'
fb1=2.*(B1+1.)*fm1;
print'Bandwidth',fb1,'Hz'
# Page Number: 4.19
# Example 4.18
# Given
delf=75.*10.**3.; # Hz
fM=15.*10.**3.; # Hz
D=delf/fM;
# Given formula fb=2(*10.**2)*fM
fb1=2.*10.**2.*fM;
print'BW uing formula',fb1,'Hz'
# Carsons Rule
fb2=2.*10.**1.*fM;
print'BW uing Carsons Rule',fb2,'Hz'
# High quality Fm radios require minimum 200kHz
# Therefore, carsons rule underestimates bandwidth
# Page Number: 4.19
# Example 4.19
# Given
fm1=50.; # Hz
fm2=15.*10.**3.; # Hz
delf=75.*10.**3.; # Hz
# As B=delf/fm
Bmin=delf/fm2;
Bmax=delf/fm1;
# Let B1=0.5
B1=0.5;
n=(Bmax/B1);
print'Multiplication factor',n
delf1=(delf/n);
print'Max allowed frequency deviation',delf1,'Hz'
# Page Number: 4.20
# Example 4.20
# Given
f1=2.*10.**5.; # Hz
fLO=10.8*10.**6.; # Hz
delf1=25.; # Hz
n1=64.;
n2=48.;
delf=(delf1*n1*n2);
print'Maximum frequency deviation',delf,'Hz'
f2=n1*f1;
f3a=f2+fLO;
f3b=f2-fLO;
# For f3a
fca=n2*f3a;
print'Carrier frequency 1',fca,'Hz'
# For f3b
fcb=n2*f3b;
print'Carrier frequency 2',fcb,'Hz'
# Page Number: 4.20
# Example 4.21
# Given
delf=20.*10.**3.; # Hz
fc=200.*10.**3.; # Hz
of=96.*10.**6.; # hz
# delf=n1*n2 and as only doublers are used, n1*n2 has to be power of 2
# By trail and error, we find
n1=64.;
n2=32.;
# Output of first Multiplier
o1=n1*fc;
print'Output of first multiplier: ',o1,'Hz'
i2=of/n2;
flo=o1-i2;
print'fLO',flo,'Hz'
# Page Number: 4.20
# Example 4.22
# Given
B=0.2;
f1=200.*10.**3.; # Hz
fml=50.; # Hz
fmh=15.*10.**3.; # Hz
delf=75.*10.**3.; # hz
fc=108.*10.**6.; # Hz
delf1=B*fml;
n1n2=delf/delf1;
# Let n2=150
n2=150.;
flo=((delf*f1)-fc)/n2;
print'fLO',flo,'Hz'
n1=n1n2/n2;
print"n1 with n2=150:",n1
# Page Number: 4.21
# Example 4.23
# Given,
delfd1=50.; # Hz
f1=120.; # Hz
delfd2=20000.; # Hz
f2=240.; # Hz
# (a)PM
delf1=(f2/f1)*delfd1;
n1=delfd2/delf1;
print'Frequency multiplication factor in PM',n1
# (b)FM
n2=delfd2/delfd1;
print'Frequency multiplication factor in FM',n2
# Page Number: 4.25
# Example 4.29
# Given,
f1=108.; # MHz
f2=157.; # MHz
# (a) Image frequency overlaps RF band
fIF=12.; # MHz
fL01=f1-fIF;
print'fL01',fL01,'MHz'
fim1=fL01-fIF;
print'fim1',fim1,'MHz'
fL02=f2-fIF;
print'fL02',fL02,'MHz'
fim2=fL02-fIF;
print'fim2',fim2,'MHz'
# Clearly image and RF band overlap