# Page Number: 3.14
# Example 3.7
# Given
# (a)efficiency=((u**2)/(2+(u**2)))
u=0.5;
n=((u**2.)/(2.+(u**2.)));
np=n*100.;
print"Efficiney: ",round(np,2),"%"
# (b)nmax,
# nmax occurs at u=1;
u1=1.;
nmax=((u1**2.)/(2.+(u1**2.)));
nmaxp=nmax*100.;
print"Efficiney max: ",nmaxp,"%"
# Page Number: 3.14
# Example 3.8
# Given
# From waveform
Amax=150.;
Amin=30.;
# (a)Modulation index
u=((Amax-Amin)/(Amax+Amin));
print"Modulation Index: ",round(u,2)
Ac=(Amax/(1.+u));
# (b)
# Carrier Power
Pc=(Ac**2.)/2.;
print"Carrier Power: ",round(Pc,2),"W"
# Side band Power
PSB=(Amin**2.)/2.;
print"USB=LSB Power: ",round(PSB,2),"W"
# Total Average power
Pt=Pc+(2.*PSB);
print"Total Average Power: ",round(Pt,2),"W"
# (c)Peak Envelope Power
# Given
R=60; # Ohm
PEP=(Amax**2)/(2*R);
print"Peak Envelope Power: ",round(PEP),"W"
# (d) Modulation Efficieny
n=PSB/Pt;
print"Modulation efficieny: ",round(n,2)
# (e) Given
# (i) u=0.2
u1=0.2;
A1=(60./u1)-Ac;
print"A=",round(A1)
# (ii) u=0.8
u2=0.8;
A2=(60./u2)-Ac;
print "A=",round(A2)