# Variables
#All frequencies in kHz
fc = 1*10**3; #in kHz
W = 15;
# Calculations and Results
DSBl = fc-W; #lowest freq of DSB signal
DSBh = fc+W; #highest freq of DSB signal
print '(a) The range of freq is from ',DSBl,'to',DSBh
BT = 2*W;
print '(b) Transmission bandwidth is ',BT
# Variables
#All frequencies in kHz
fi = 250.; #input freq
# Calculations and Results
LSB = [fi-1,fi-3,fi-5];
USB = [fi+1,fi+3,fi+5];
print '(a) The upper sideband and lower sideband ,USB:' ,USB,'and LSB:',LSB
BT = 2*5;
print 'The net transmission bandwidth is ',BT
# Variables
fc = 1*10**3; #in kHz
W = 15;
# Calculations and Results
LSBl = fc-W; #lowest freq of LSB
USBh = fc+W; #highest freq of USB
print '(a) The range of freq(in kHz) for LSB is from ',LSBl,'to',fc
print '(b) The range of freq(in kHz) for USB is from ',fc,'to',USBh
BT = W;
print '(b) Transmission bandwidth is ',BT
# Variables
#All frequencies in kHz
fi = 250; #input freq
# Calculations and Results
LSB = [fi-1, fi-3, fi-5];
USB = [fi+1, fi+3, fi+5];
print '(a) For LSB transmission freq are' ,LSB
print '(b) For USB transmission freq are',USB
W = 5;
BT = W;
print '(c) The transmission bandwidth is ',BT
from numpy import array
#All frequencies in kHz
#refer Ex 6.4
fi = 250; #input freq
LSB = array([fi-1, fi-3, fi-5]); #from Ex 6.4
# Calculations
fc = 250; #carrier freq
f0sum = fc+LSB;
f0diff = fc-LSB;
# Results
print '(a) The output frequencies (in kHz) are ',f0diff,f0sum
print '(b) At low pass filter,the actual frequencies (in kHz) are ',f0diff
from numpy import array
# Variables
#All frequencies in kHz
fi = 250; #input freq
USB = array([fi+1, fi+3, fi+5]); #from Ex 6.4
#
# Calculations
fc = 250; #carrier freq
f0sum = fc+USB;
f0diff = USB-fc;
# Results
print '(a) The output frequencies (in kHz) are ',f0sum,f0diff
print '(b) At low pass filter,the actual frequencies (in kHz) are',f0diff
from numpy import array
#All frequencies in kHz
#refer Ex 6.4
# Variables
fi = 250.; #input freq
LSB = array([fi-1, fi-3, fi-5]); #from Ex 6.7
# Calculations
fc = 250.1; #carrier freq
f0sum = fc+LSB;
f0diff = fc-LSB;
# Results
print '(a) The output frequencies (in kHz) are ',f0sum,f0diff
print '(b) At low pass filter,the frequencies (in kHz) are ',f0diff
# Variables
fc = 250; #carrier freq
# Calculations and Results
LSB = [fc-1, fc-3, fc-5];
USB = [fc+1, fc+3, fc+5];
print '(a) The spectrum contains following freq.LSB:' ,LSB
print 'USB:',USB,
print 'carrier:',fc
W = 5;
BT = 2*W;
print 'The transmission bandwidth is ',BT
# Variables
#All voltage in V
m = 0.6; #modulation factor
A = 100; #peak carrier level (in V)
# Calculations
Vmax = A*(1+m);
Vmin = A*(1-m);
# Results
print 'The maximum and minimum values of positive envelope is','Vmax:',Vmax,'Vmin:',Vmin
# Variables
Ratio = .5/2; # Ratio = Vmin/Vmax
# Calculations
m = (1-Ratio)/(1+Ratio); #modulation factor
# Results
print 'The modulation factor is ',m
print 'The %age modulation is ',m*100
# Calculations
def sideband_amplitude(m,A):
return m*A/2; #As:sideband amplitude
#m:modulation factor
#A:carrier amplitude
# Variables
A = 10.;
m = 0;
# Results
print '(a) For m = 0, sideband amplitude is ',sideband_amplitude(m,A)
m = 0.5;
print '(b) For m = 0.5, sideband amplitude is ',sideband_amplitude(m,A)
m = 1.;
print '(c) For m = 1, sideband amplitude is ',sideband_amplitude(m,A)
# Variables
fc = 455.; #in kHz
# Calculations and Results
Tc = (1./fc)*10**3; #in micro sec
print '(a) The carrier period is',Tc,'micro s'
tau = 10*Tc; #in micro sec
print 'The time consmath.tant is selected 10Tc:',tau,'micro s'
C = 0.01*10**-6; #in F
R = (tau*10**-6)/C; #ohm
print 'R is determined',R,'ohm'
W = 5.; #in kHz
Tm = 1/W*10**3; #micro sec
print 'The shortest modulation period Tm = ',Tm,'micro sec'
# Variables
A = 200.; # in Volts
R = 50.; #in ohm
# Calculations and Results
P = A**2/(4*R); #in W
print '(a) The sverage power is ',P,'W'
Pp = A**2/(2*R); #in W
print '(b) The peak envelop power is ',Pp,"W"
import math
# Variables
P = 1000.; #in watts
R = 50.; #in ohm
# Calculations
Vrms = math.sqrt(R*P); #in V
Irms = math.sqrt(P/R); #in A
# Results
print 'The unmodulated rms carrier voltage is ',Vrms,"V"
print 'The unmodulated rms carrier current is ',Irms,"A"
import math
# Calculations
#All power in Watts
Pc = 1000.;
def avg_P(m): #function for total average power
return (1+(m**2/2))*Pc;
def peak_P(m): #function for peak power
return (1+m)**2*Pc;
def SB_P(m): #function for SB power
return avg_P(m)-Pc;
def lay(m): #function for print laying table
table = [m*100, avg_P(m), peak_P(m), SB_P(m)];
print (table);
# Results
print ('Summary for the result is print layed in the table ');
print ('Mod**n_% Avg_Pwr Peak_Pwr SB_Pwe');
m = 0.; #for m = 0
lay(m);
m = 0.5; #for m = 0.5
lay(m);
m = 1.; #for m = 1
lay(m);
import math
# Variables
#All power in Watts
#All voltage in volts
#All current in ampere
R = 50;
m = 0.5;
P = 1125; #for m = 0.5
# Calculations and Results
Vrms = math.sqrt(R*P);
Irms = math.sqrt(P/R);
print '(a) For m = 0.5, Vrms and Irms are:',Vrms,'V',Irms,'A'
m = 1.;
P = 1500.; #For m = 1
Vrms = math.sqrt(R*P);
Irms = math.sqrt(P/R);
print '(b) For m = 1, Vrms and Irms are:',Vrms,'V',Irms,'A'