#Variabledeclaration
V_pp_max=16.0; #Maximum peak-to-peak voltage of an AM wave, mV
V_pp_min=4.0; #Minimum peak-to-peak voltage of an AM wave, mV
#Calculation
Vmax=V_pp_max/2; #Maximum voltage of AM wave, mV
Vmin=V_pp_min/2; #Minimum voltage of AM wave, mV
m=(Vmax-Vmin)/(Vmax+Vmin); #Modulation factor.
#Result
print("The modulation factor=%.1f."%m);
#Variable declaration
Es=50.0; #signalvoltage amplitude, V
Ec=100.0; #Carrier voltage amplitude, V
#Calculation
m=Es/Ec; #Modulation factor
#Result
print("Modulation factor=%.1f."%m);
#Variable declaration
fc=2500.0; #Carrier frequency, kHz
f1=50.0; #Lower frequency of the audio signal, Hz
f2=15000.0; #Upper frequency of the audio signal, Hz
#Calculation
fl_usb=fc+(f1/1000); #Lower frequency of upper sideband, kHz
fu_usb=fc+(f2/1000); #Upper frequency of upper sideband, kHz
fu_lsb=fc-(f1/1000); #Lower frequency of upper sideband, kHz
fl_lsb=fc-(f2/1000); #Upper frequency of upper sideband, kHz
#Since, f1=50Hz is negligible with respect to f2=15000Hz,
BW=(fc+(f2/1000))-(fc-(f2/1000)); #Bandwidth, kHz
#Result
print("The upper sideband=%.2fkHz to %dkHz."%(fl_usb,fu_usb));
print("The lower sideband=%dkHz to %.2fkHz."%(fl_lsb,fu_lsb));
print("The bandwidth=%dkHz"%BW);
from math import pi
#Variable declaration
EC=5.0; #Carrier amplitude, V
m=0.6; #modulation factor
ws=6280.0; #angular frequency of signal, radians/s
wc=211*10**4; #angular frequency of carrier, radians/s
#Calculation
fs=(ws/(2*pi))/1000; #Signal frequency, kHz
fc=(wc/(2*pi))/1000; #Carrier frequency, kHz
#(i)
Max_amp=EC+m*EC; #Maximum amplitude of AM wave, V
Min_amp=EC-m*EC; #Minimum amplitude of AM wave, V
#(ii)
frequency_components=[fc-fs,fc,fc+fs]; #frequency components, kHz
amplitudes=[m*EC/2,EC,m*EC/2]; #Corresponding amplitudes, V
#Result
print("(i) The maximum and minimum amplitudes of AM wave=%dV and %dV."%(Max_amp,Min_amp));
print("(ii) The frequency components of the AM wave=%.0f,%.0f,%.0f."%(frequency_components[0],frequency_components[1],frequency_components[2]));
print(" The corresponding amplitudes are =%.1fV, %dV, %.1fV."%(amplitudes[0],amplitudes[1],amplitudes[2]));
#Variable declaration
fc=1000.0; #Carrier frequency, kHz
fs=5.0; #Signal frequency, kHz
m=0.5; #Modulation factor
EC=100.0; #Amplitude of the carrier, V
#Calculation
f_lsb=fc-fs; #Lower sideband frequency,kHz
f_usb=fc+fs; #Upper sideband frequency, kHz
Amplitude=m*EC/2; #Amplitude of each sideband, V
#Result
print("The lower and upper sideband frequencies are=%dkHz and %dkHz."%(f_lsb,f_usb));
print("The amplitude of each sideband =%dV"%Amplitude);
#Variable declaration
EC=10.0; #Carrier amplitude, V
ES=6.0; #Signal amplitude, V
fc=10.0; #Carrier frequency, MHz
fs=5/1000.0; #Signal frequency. MHz
#Calculation
#(i)
m=ES/EC; #Modulation factor
#(ii)
f_lsb=fc-fs; #Lower sideband frequency,MHz
f_usb=fc+fs; #Upper sideband frequency, MHz
#(iii)
Amplitude=m*EC/2; #Amplitude of each sideband, V
#Result
print("(i) The modulation factor=%.1f."%m);
print("(ii) The lower and upper sideband frequencies are=%.3fMHz and %.3fMHz."%(f_lsb,f_usb));
print("(iii) The amplitude of each sideband =%dV"%Amplitude);
#Variable declaration
Pc=500.0; #Carrier power, W
m=1.0; #Modulation factor
#Calculation
#(i)
Ps=(1/2.0)*m**2*Pc; #Sideband power, W
#(ii)
PT=Pc+Ps; #Power of AM wave, W
#Result
print("(i) The power in sidebands=%dW"%Ps);
print("(ii) The power of AM wave=%dW"%PT);
#Variable declaration
Pc=50.0; #Power of carrier, kW
#Calculation
#(i)
m=80/100.0; #Modulation factor
Ps=(1/2.0)*m**2*Pc; #Sideband Power, kW
print("(i) The sideband power for 80%% modulation=%dkW."%Ps);
#(ii)
m=10/100.0; #Modulation factor
Ps=(1/2.0)*m**2*Pc; #Sideband Power, kW
print("(ii) The sideband power for 10%% modulation=%.2fkW."%Ps);
#Variable declaration
Pc=40.0; #Carrier power, kW
m=100/100.0; #Modulation index
amplifier_eff=72/100.0; #Efficiency of modulated RF amplifier
#Calculation
#(i)Carrier power remains same after modulation
#(ii)
Ps=(1/2.0)*(m**2)*Pc; #Sideband power
P_audio=Ps/amplifier_eff; #Required audio power, kW
#Result
print("(i) The carrier power=%dkW."%Pc);
print("(ii) The required audio power=%.1fkW."%P_audio);
#Variable declaration
fs=1.0; #Signal frequency, kHz
fc=500.0; #Carrier frequency, kHz
#Calculation
#(i)
sideband_f=[fc-fs,fc+fs]; #Sideband frequencies, kHz
#(ii)
BW=(fc+fs)-(fc-fs); #Bandwidth required, kHz
#Result
print("(i) The sideband frequencies=%dkHz and %dkHz."%(sideband_f[0],sideband_f[1]));
print("(ii) The bandwidth required=%dkHz"%BW);
from math import sqrt
#Variable declaration
IC=8.0; #Antenna current due to carrier,A
m=40/100.0; #Modulation index
#Calculation
#Since, Ps=(1/2)*m²*Pc and PT=Pc+Ps (Total_power=carrier_power+signal_power)
#that implies, (PT/Pc)=1+(m²/2),
#So, square_of(Total_current/Carrier_current)=(IT/IC)²=1+(m²/2).
IT=IC*sqrt(1+(m**2/2.0)); #Total current, A
#Result
print("The total antenna current=%.2fA."%IT);
from math import sqrt
#Variable declaration
IC=8.0; #Antenna current when only carrier is sent, A
IT=8.93; #Total antenna current, A
#Calculation
#Since, Ps=(1/2)*m²*Pc and PT=Pc+Ps (Total_power=carrier_power+signal_power)
#that implies, (PT/Pc)=1+(m²/2),
#So, square_of(Total_current/Carrier_current)=(IT/IC)²=1+(m²/2).
m=sqrt((((IT/IC)**2)-1)*2)*100; #The %age of modulation
#Result
print("The %%age of modulation=%.1f%%."%m);
from math import sqrt
#Variable declaration
Vc=100.0; #Carrier voltage, V
V_T=110.0; #The total voltage after modulation, V
#Calculation
#Since, Ps=(1/2)*m²*Pc and PT=Pc+Ps (Total_power=carrier_power+signal_power)
#that implies, (PT/Pc)=1+(m²/2),
#So, square_of(Total_voltage/Carrier_voltage)=(V_T/Vc)²=1+(m²/2).
m=sqrt((((V_T/Vc)**2)-1)*2); #The %age of modulation
#Result
print("The modulation index =%.3f."%m);
#Variable declaration
Vc=5.0; #Carrier voltage, V
V_lsb=2.5; #Lower sideband component, V
V_usb=2.5; #Upper sideband component, V
R=2.0; #Resistor driven by AM wave, kΩ
#Calculation
#Since, power=(r.m.s_voltage)²/resistance
#(i)
Pc=round((0.707*Vc)**2/R,2); #Carrier power mW
#(ii)
P_lower=round((0.707*V_lsb)**2/R,3); #Power delivered by lower sideband, mW
#(iii)
P_upper=round((0.707*V_usb)**2/R,3); #Power delivered by upper sideband, mW
P_T=round(Pc+P_lower+P_upper,3); #Total power delivered by the AM wave, mW
#Result
print("(i) The carrier power=%.2fmW"%Pc);
print("(ii) The power delivered by lower sideband=%.3fmW"%P_lower);
print("(iii) The power delivered by upper sideband=%.3fmW"%P_upper);
print("The total power delivered by the AM wave=%.3fmW"%P_T);
from math import sqrt
from math import pi
#Variable declaration
wc=6e08; #Carrier angular frequency, rad/s
ws=1250.0; #Signal angular frequency, rad/s
mf=5; #Modulation index
Ec=12.0; #Carrier amplitude, V
R=10.0; #Resistor, Ω
#Calculation
#(i)
fc=wc/(2*pi); #Carrier frequency, Hz
#(ii)
fs=ws/(2*pi); #Signal frequency, Hz
#(iv)
delta_f=mf*fs; #Maximum frequency deviation, Hz
#(v)
P=(Ec/sqrt(2))**2/R; #Power dissipated, W
#Result
print("(i) The carrier frequency=%.1fe06 Hz."%(fc/10**6));
print("(ii) The signal frequency=%.0f Hz."%fs);
print("(iii) The modulation index=%d."%mf);
print("(iv) The maximum frequency deviation=%.0fHz."%delta_f);
print("(v) The power dissipated=%.1fW."%P);
from math import pi
#Variable declaration
fc=25.0; #Carrier frequency, MHz
fs=400.0; #Signal frequency, Hz
Ec=4.0; #Carrier amplitude, V
delta_f=10.0; #Maximum frequency deviation, kHz
#Calculation
wc=2*pi*fc*10**6; #Carrier angular frequency, rad/s
ws=2*pi*fs; #Signal angular frequency, rad/s
mf=delta_f*1000/fs; #Modulation index
#Result
print("e=%dcos(%.2et + %dsin%dt)"%(Ec,wc,mf,ws));
#Variable declaration
delta_f=50.0; #Maximum frequency deviation, kHz
fs=5.0; #Modulating frequency, kHz
#Calculation
mf=delta_f/fs; #Modulation index
#Result
print("The modulation index=%d"%mf);
#Variable declaration
fc=1000.0; #Carrier frequency, kHz
fs=15.0; #Modulating frequency, kHz
#Calculation
first_3_usb_f=[fc+fs,fc+2*fs,fc+3*fs]; #First three upper sideband frequncies, kHz
first_3_lsb_f=[fc-fs,fc-2*fs,fc-3*fs]; #First three lowerr sideband frequncies, kHz
#Result
print("The first three upper sideband frequencies=%dkHz ,%dkHz and %dkHz."%(first_3_usb_f[0],first_3_usb_f[1],first_3_usb_f[2]));
print("The first three lower sideband frequencies=%dkHz ,%dkHz and %dkHz."%(first_3_lsb_f[0],first_3_lsb_f[1],first_3_lsb_f[2]));
#Variable declaration
fs=15.0; #Modulating frequency, kHz
delta_f=75.0; #Maximum frequency deviation, kHz
#Calculation
BW=2*(delta_f+fs); #Bandwidth, kHz
#Result
print("The bandwidth of the FM signal=%dkHz."%BW);
#Variable declaration
k=75.0; #Frequency deviation constant, kHz/V
Es=2.0; #Amplitude of signal, V
#Calculation
delta_f=k*Es; #Maximum frequency deviation, kHz
#Result
print("The maximum frequency deviation=%dkHz."%delta_f);
#Variable declaration
fs1=500.0; #First audio frequency, Hz
fs2=200.0; #Second audio frequency (decreased), Hz
Es=2.4; #AF voltage, V
delta_f1=4.8; #Frequency deviation,kHz
#Calculation
k=delta_f1/Es; #Frequency deviation constant, kHz/V
Es=7.2; #AF voltage, V (increased)
delta_f2=k*Es; #2nd frequency deviation, kHz
Es=10.0; #AF voltage, V (increased)
delta_f3=k*Es; #3rd frequency deviation, kHz
mf1=delta_f1/(fs1/1000); #Modulation index in 1st case
mf2=delta_f2/(fs1/1000); #Modulation index in 2nd case
mf3=delta_f3/(fs2/1000); #Modulation index in 3rd case
#Result
print("The frequency deviation in second case=%.1fkHz."%delta_f2);
print("The frequency deviation in third case=%dkHz."%delta_f3);
print("The modulation index in 1st case=%.1f"%mf1);
print("The modulation index in 2nd case=%.1f"%mf2);
print("The modulation index in 3rd case=%d"%mf3);