# given
c=1.4*10**6 #frequency of carrier wave,Hz
m1=20 #frequency component,Hz
m2=10*10**3 #KHz
#calculation
Ur1=c+m1
Ur2=c+m2
Lr1=c-m1
Lr2=c-m2
#result
#range of upper sideband(usb)
print"upper sideband will include frequencies from ",Ur1,"Hz"
print"to ",Ur2,"Hz"
#range of lower sideband (lsb)
print"lower sideband will include frequencies from ",Lr2,"Hz"
print"to ",Lr1,"Hz"
# given
b=100.0 #maximum p-p carrier (V)
a=60.0
d=125.0
c=35.0
x=180
y=0
#Calculation
m1=((b-a)/(b+a))*100
m2=((d-c)/(d+c))*100
m3=((x-y)/(y+x))*100
#result
print"(a) percent(m) = ",m1,"percent"
print"(b) percent(m) = ",m2,"percent"
print"(c) percent(m) = ",m3,"percent"
print"(d) this is a case of overmodulation"
print"(e) this is a distorted AM wave as the increase > decrease in carrier's amplitude"
#given
c=1*10**3 #carrier output
#calculation
esb= 1/4.0*(c)
tsp=(esb*2)
tp=(tsp+c)
#result
print"Total transmitted power =",tp,"W"
# given
m=0.9 #modulation index
Pc=500 #carrier Power
#calculation
x=(m**2)/2.0
y=(1+x)*Pc
#result
print"total transmitted power= ",y,"W" #total transmitted powwer
# given
m=0.95 #modulation index
Pt= 50*10**3 #total transmitted power
#calculation
x=(m**2)/2.0
y=1+x
z=(Pt/y)
Pi=Pt-z
#result
print"Pc = ",round(z,2),"W" #carrier power
print"total intelligence power = ",round(Pi,2),"W" #intelligence signal
# given
Ic=12 #antenna current of AM transmitter when unmodulated
It=13 #current when modulated
#calculation
import math
x=2*((13/12.0)**2-1)
m=math.sqrt(x)
a=m*100
#result
print"percent(m) = ",round(a,0),"percent"
# given
n=0.7 #efficiency
c=10*10**3 #carrier wave
#calculation
Is=0.5*c #intelligence signal
p=(Is/n)
#result
print"dc input power = ",round(p,2),"W" #dc input power
#given
Pc=10.0*10**3 #carrier power
Pt=11.2*10**3 #transmitted power
m2=0.5 #modulation index of another sine wave
#calculation
import math
x=2*((Pt/Pc)-1)
m=math.sqrt(x)
meff=math.sqrt((m**2)+(m2**2))
a=Pc*(1+((meff**2)/2.0))
#result
print"Pt = ",a,"W" #total transmitted power
# given
v1=1.0
v2=0.03
v3=0.05
v4=0.02
v5=0.04
#calculation
import math
x=math.sqrt((v2**2+v3**2+v4**2+v5**2)/v1**2)
y=x*100
#result
print"THD = ",round(y,2),"percent" #Total harmonic distortion