# 4.1
import math
fc=1000;
print ('In addition to carrier frequency of 1000kHz the other upeer and lower frequencies are')
fs1=0.3;
fu1=fc+fs1;
print ("Upper side band frequency for modulating frequency of 300 Hz =%.1f kHz" %fu1)
fl1=fc-fs1;
print ("Lower side band frequency for modulating frequency of 300 Hz =%.1f kHz" %fl1)
fs2=0.8;
fu2=fc+fs2;
print ("Upper side band frequency for modulating frequency of 800 Hz =%.1f kHz" %fu2)
fl2=fc-fs2;
print ("Lower side band frequency for modulating frequency of 800 Hz =%.1f kHz" %fl2)
fs3=2;
fu3=fc+fs3;
print ("Upper side band frequency for modulating frequency of 2kHz =%.1f kHz" %fu3)
fl3=fc-fs3;
print ("Lower side band frequency for modulating frequency of 2kHz =%.1f kHz" %fl3)
# 4.2
import math
L=50*10**-6;
C=1*10**-9;
fc=1/(2*math.pi*(L*C)**0.5);
fs1=10000;
fu1=(fc+fs1)*10**-3;
print ("Upper side band frequency =%.2f kHz" %fu1)
fl1=(fc-fs1)*10**-3;
print ("Lower side band frequency =%.2f kHz" %fl1)
# 4.3
import math
Pc=50;
m=0.85;
Pt=Pc*(1+(m**2/2))
print ("Radiation Power =%.2f kW" %Pt)
# 4.4
import math
delta=4.8;
Es=2.4;
K=delta/Es;
Es1=7.2;
delta1=K*Es1;
Es2=10;
delta2=K*Es2;
fs1=500*10**-3;
mf1=delta/fs1;
print ("modulation index for Es (2.4) =%.1f" %mf1)
mf2=delta1/fs1;
print ("modulation index for Es(7.2)=%.1f" %mf2)
mf3=delta2/fs1;
print ("modulation indexfor Es(10) =%.1f" %mf3)
# 4.5
import math
wc=6*10**8;
fc=(wc)/(2*math.pi)*10**-3;
print ("carrier frequency =%.1f kHz" %fc)
ws=1250;
fs=(ws)/(2*math.pi);
print ("modulating frequency =%.1f Hz" %fs)
mf=5;
delta=mf*fs;
print ("maximum deviation =%.1f Hz" %delta)
Rms=12/(2**0.5);
P=Rms**2/10;
print ("Power dissipated =%.1f W" %P)
# 4.6
import math
delta=10;
fs=2;
mf=delta/fs;
BW=16*mf;
print ("Band width =%.0f kHz" %BW)
# 4.7
import math
fc=100*10**6;
wc=2*math.pi*fc;
fs=6*10**3;
ws=2*math.pi*fs;
delta=60*10**3;
mf=delta/fs;
mp=mf;
print ('epm=8sin(0.6283*10**9t+10 sin 37.7*10**3t)V')
print ('for a signal voltage of 4 V')
mp=4*10/3;
print ('epm=8sin(0.6283*10**9t+13.33 sin 37.7*10**3t)V')
print ('for a fs of 8 kHz')
print ('epm=8sin(0.6283*10**9t+13.33 sin 50.27*10**3t)V')
# 4.8
import math
n=5;
Ql=2**n;
Range=(Ql-1)*1;
print ('range is 0-31 V with each step representing 1V')
Qe=27.39-27;
print ("quattization error =%.1f V" %Qe)
# 4.9
import math
print ('For amplitude modulation')
MCCW=2*1;
print ("Minimum width of carrier channel =%.1f kHz" %MCCW)
print ('For frequency modulation')
MCCW=2*(1.5+1);
print ("Minimum width of carrier channel =%.1f kHz" %MCCW)
print ('For pulse code modulation')
MCCW=8*1;
print ("Minimum width of carrier channel =%.1f kHz" %MCCW)
# 4.10
import math
Fc=430-370;
print ('At 403 change in frequency')
Fc1=403-370;
Fuel_level=Fc1*3000/Fc;
print ("Fuel level =%.1f L" %Fuel_level)
# 4.11
import math
print ('for good quality data the sampling rate should be at least 5 times the data frequency for one channel')
channel=5;
f=50;
sampling_rate=5*channel*f;
print ("sampling rate =%.1f samples per second" %sampling_rate)
#4.12
import math
Vs=7;
Vn=1;
fh=10**3;
H=2*fh*math.log(1+(Vs/Vn),2);
print ("Maximum possible data transmission rate =%.1f bits per second" %H)
Sampling_rate=2*fh;
print ("minimum sampling rate per channel =%.1f samples per second" %Sampling_rate)
C_max=85714/2000;
print ("maximum number of channels =%.0f " %C_max)
#4.13
import math
d_rate=100;
fc= 0.5*d_rate;
print ("cutt off frquency =%.1f kHz " %fc)
#4.14
import math
print ('The modulated carrier will have a bandwidth of 100MHz+/- 1kHz.')
print ('therefore we can have 5 channels each transmitting a 1KHz data for 5kHz bandwidth')
# 4.15
import math
Fd=7.5*165*10**3/100;
mf=5;
Bandwidth=Fd/mf;
print ("Bandwidth of intelligence =%.1f Hz " %Bandwidth)
Tr=0.35/Bandwidth*10**6;
print ("Rise time=%.1f us " %Tr)