Exp 9 PDF
Exp 9 PDF
Exp. No : 9
DATE: 9.10.24
AIM:
To simulate Amplitude Modulation (AM) and Frequency Modulation (FM) schemes using MATLAB and
compare their Figure of merit.
SOFTWARE USED:
MATLAB R2024
THEORY:
Amplitude Modulation or AM, is a modulation technique which is used to modify the carrier wave’s
amplitude in accordance with the message signal, such as an audio signal, i.e., a modulating signal. Frequency
Modulation or FM, is a modulation technique which is used to modify the carrier wave’s frequency in accordance
with the message signal or modulating signal. In order to compare the noise performance of different modulation
schemes, we use Figure of Merit, which is given by
(𝑆𝑁𝑅)
Figure of Merit = (𝑆𝑁𝑅)𝑂
𝐶
Where (SNR)O is the Output SNR and (SNR)C is the Channel SNR.
A simplified AM receiver model is shown in Figure 1. The transmitted AM signal s(t) is received by the receiver
along with the noise w(t). The received signal is filtered by the band-pass filter with bandwidth 2W. The filtered
signal is demodulated using Envelope detector.
𝐴2𝑐 𝑘𝑎
2𝑃
(SNR)O,AM =
2𝑊𝑁𝑜
(𝑆𝑁𝑅) 2𝑃
𝑘𝑎
(Figure of Merit)AM = (𝑆𝑁𝑅)𝑂,𝐴𝑀 = 2 𝑃)
𝐶,𝐴𝑀 (1+𝑘𝑎
A simplified FM receiver model is shown in Figure 2. The transmitted FM signal s(t) is received by the receiver
along with the noise w(t). The received signal is filtered by the band-pass filter with bandwidth equal to the
bandwidth of the transmitted signal. The filtered signal is amplitude limited and demodulated using Frequency
discriminator. The Low-pass filter’s output is the demodulated message signal.
3𝐴2𝑐 𝑘𝑓2 𝑃
(SNR)C,FM =
2𝑁𝑜 𝑊 3
𝐴2𝑐
(SNR)O,FM =
2𝑊𝑁𝑜
(𝑆𝑁𝑅) 3𝑘𝑓2 𝑃
(Figure of Merit)FM = (𝑆𝑁𝑅)𝑂,𝐹𝑀 =
𝐶,𝐹𝑀 𝑊2
CODE:
clc;
clear all;
close all;
y = Ac*(1+m*(cos(2*pi*fm*t))).*cos(2*pi*fc*t);
msg = Am*(cos(2*pi*fm*t));
P = bandpower(msg);
ka = 1/Ac;
snr_c = 10*log10(snr_c);
snr_o = 10*log10(snr_o);
demod_signal = abs(y);
fpass = 100;
fs = 1/(t(2) - t(1));
[b, a] = butter(2, fpass/(fs/2)); % Normalized frequency since passband frequency(w)
must be between 0 and 1
filtered_signal = filtfilt(b,a, demod_signal);
figure(1);
subplot(5,1,1);
plot(t,ym);
title("Modulating Signal");
xlabel('time');
ylabel('Magnitude');
subplot(5,1,2);
plot(t,yc);
title("Carrier signal");
xlabel('time');
ylabel('Magnitude');
subplot(5,1,3);
plot(t,y);
title("Modulated signal")
xlabel('time');
ylabel('Magnitude');
subplot(5,1,4);
plot(t,filtered_signal);
title("Demodulated signal");
xlabel('time');
ylabel('Magnitude');
subplot(5,1,5);
plot(f, abs(Y));
xlim([-2*fc/1000, 2*fc/1000])
title("Frequency Spectrum");
xlabel('Frequency (kHz)');
OUTPUT :
AM MODULATION:
Under modulation:
Critical modulation:
Over modulation:
FM MODULATION:
clc;
clear all;
close all;
tm = 1/fm;
t = 0:tm/1000:(20*tm);
fs = 1/(t(2) - t(1));
yc = Ac.*cos(2*pi*fc*t);
msg_signal = Am*cos(2*pi*fm*t);
P = bandpower(msg_signal);
snr_o = (3*Ac^2*kf^2*P)/(2*N0*fm^3);
snr_c= Ac^2/(2*fm*N0);
FoM = snr_o/snr_c;
disp("Output SNR(dB): ");
disp(10*log10(snr_o));
disp("Channel SNR(dB): ");
disp(10*log10(snr_c));
disp("FoM: ");
disp(FoM);
figure(1);
subplot(4,1,1);
plot(t, msg_signal);
title('Message Signal (Modulating Signal)');
xlabel('Time (s)');
ylabel('Amplitude (V)');
subplot(4,1,2);
plot(t,yc);
title("Carrier signal");
xlabel('time');
ylabel('Magnitude');
subplot(4,1,3);
plot(t, y_fm);
title('Frequency Modulated Signal (FM Signal)');
xlabel('Time (s)');
ylabel('Amplitude (V)');
subplot(4,1,4);
plot(t, demod_signal);
title('Demodulated Signal (Recovered Message Signal)');
xlabel('Time (s)');
ylabel('Amplitude (V)');
ylim=[-Am Am];
OUTPUT:
RESULT:
Thus Amplitude Modulation (AM) and Frequency Modulation (FM) schemes are simulated using MATLAB and
Figure of merit values are compared.