CHAPTER 16 : MODULATION AND DEMODULATION

Example 16.2 : Page number 416-417

In [1]:
#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);
The modulation factor=0.6.

Example 16.3 : Page number 417

In [2]:
#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);
Modulation factor=0.5.

Example 16.4 : Page number 419

In [3]:
#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);
The upper sideband=2500.05kHz to 2515kHz.
The lower sideband=2485kHz to 2499.95kHz.
The bandwidth=30kHz

Example 16.5 : Page number 420

In [4]:
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]));
(i) The maximum and minimum amplitudes of AM wave=8V and 2V.
(ii) The frequency components of the AM wave=335,336,337.
     The corresponding amplitudes are =1.5V, 5V, 1.5V.

Example 16.6 : Page number 420-421

In [5]:
#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);
The lower and upper sideband frequencies are=995kHz and 1005kHz.
The amplitude of each sideband =25V

Example 16.7 : Page number 421

In [6]:
#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);
(i) The modulation factor=0.6.
(ii)  The lower and upper sideband frequencies are=9.995MHz and 10.005MHz.
(iii) The amplitude of each sideband =3V

Example 16.8 : Page number 423

In [8]:
#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);
(i)  The power in sidebands=250W
(ii) The power of AM wave=750W

Exmaple 16.9 : Page number 423

In [12]:
#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);
(i) The sideband power for 80% modulation=16kW.
(ii) The sideband power for 10% modulation=0.25kW.

Example 16.10 : Page number 423-424

In [14]:
#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);
(i) The carrier power=40kW.
(ii) The required audio power=27.8kW.

Example 16.11 : Page number 424

In [15]:
#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);
(i)  The sideband frequencies=499kHz and 501kHz.
(ii) The bandwidth required=2kHz

Example 16.12 : Page number 424

In [17]:
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);
The total antenna current=8.31A.

Example 16.13 : Page number 424

In [18]:
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);
The %age of modulation=70.1%.

Example 16.14 : Page number 425

In [19]:
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);
The modulation index =0.648.

Example 16.15 : Page number 425-426

In [20]:
#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);
(i) The carrier power=6.25mW
(ii) The power delivered by lower sideband=1.562mW
(iii) The power delivered by upper sideband=1.562mW
The total power delivered by the AM wave=9.374mW

Example 16.16 : Page number 428

In [21]:
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);
(i)   The carrier frequency=95.5e06 Hz.
(ii)  The signal frequency=199 Hz.
(iii) The modulation index=5.
(iv)  The maximum frequency deviation=995Hz.
(v)   The power dissipated=7.2W.

Example 16.17 : Page number 428-429

In [22]:
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));
e=4cos(1.57e+08t + 25sin2513t)

Example 16.18 : Page number 429

In [23]:
#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);
The modulation index=10

Example 16.19 : Page number 429

In [24]:
#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]));
The first three upper sideband frequencies=1015kHz ,1030kHz and 1045kHz.
The first three lower sideband frequencies=985kHz ,970kHz and 955kHz.

Example 16.20 : Page number 429

In [25]:
#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);
The bandwidth of the FM signal=180kHz.

Example 16.21 : Page number 429

In [26]:
#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);
The maximum frequency deviation=150kHz.

Example 16.22 : Page number 429-430

In [27]:
#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);
The frequency deviation in second case=14.4kHz.
The frequency deviation in third case=20kHz.
The modulation index in 1st case=9.6
The modulation index in 2nd case=28.8
The modulation index in 3rd case=100
In [ ]: