You are on page 1of 6

Experiment No.

Date: 10.2.23

Frequency Modulation and Demodulation with built-in functions

Name: Avinash V
Reg. No. 21BEC1676

AIM: To study the frequency modulation and demodulation process and calculate the
modulation depth by varying the modulating voltage.

Software required: MATLAB

Procedure:

1) Open MATLAB online

2) Assign the values for all parameters like message signal frequency, amplitude, and
others

3) Specify the message signal in mathematical form and plot the message signal

4) Give the name for the plot and as well as the axes

5) Similarly construct the carrier signal to perform frequency modulation

6) To perform frequency modulation use “fmmod” command and obtain the waveform

7) To extract the message signal from FM modulated signal use “fmdemod” signal

8) Finally, calculate the required parameter like bandwidth

Diagram and equations:

Frequency modulation is defined as a system of modulation in which the frequency of the


carrier is varied in accordance with the amplitude of the message signal.

Let the carrier signal be: Vc(t) = Ac cos(2πfct)

The standard equation of angle-modulated wave is given by

s(t) = AC Cos (2 π fC t+2π kf ∫ (mt)dt


when the message signal m(t) = Am sin(2πfmt)
The frequency-modulated signal is given by

SFM = AC Cos (2π fC t – (kf Am) / fm Cos (2 π fC t))

SFM = AC Cos (2π fC t – β Cos (2 π fC t))

Where β = (kf Am) / fm

Where β is the modulation index

Block Diagram:

Modulation

Modulating FM
signal modulator FM output
generator

Demodulation

Modu
Modulating FM FM lating
signal modulator demodulator signal
generator

MATLAB code for Modulation:

clear all
close all
clc
t=(0:0.0001:0.1);
fm=20;
fc=100;
fs=2000;
fdev=50;
Am=1;
Ac=5;
m=Am*cos(2*pi*fm*t);
figure;
subplot(3,1,1);
plot(t,m)
xlabel('Time');
ylabel('Amplitude');
title('Message Signal');

c=Ac*cos(2*pi*fc*t);
subplot(3,1,2);
plot(t,c)
xlabel('Time');
ylabel('Amplitude');
title('Carrier Signal');

%FM Modulation
fmw= fmmod(m,fc,fs,fdev)
subplot(3,1,3);
plot(t,fmw)
xlabel('Time');
ylabel('Amplitude');
title('Frequency modulated Signal');

MATLAB Simulation result for FM Modulator:


MATLAB code for Demodulation:

clear all
close all
clc
t=(0:0.0001:0.1);
fm=20;
fc=100;
fs=2000;
fdev=50;
Am=1;
Ac=5;
m=Am*cos(2*pi*fm*t);
figure;
subplot(4,1,1);
plot(t,m)
xlabel('Time');
ylabel('Amplitude');
title('Message Signal');

c=Ac*cos(2*pi*fc*t);
subplot(4,1,2);
plot(t,c)
xlabel('Time');
ylabel('Amplitude');
title('Carrier Signal');

%FM Modulation
fmw= fmmod(m,fc,fs,fdev)
subplot(4,1,3);
plot(t,fmw)
xlabel('Time');
ylabel('Amplitude');
title('Frequency modulated Signal');

%FM DEMODULATION
fdmw=fmdemod(fmw,fc,fs,fdev);
subplot(4,1,4);
plot(t,fdmw);
xlabel('Time');
ylabel('Amplitude');
title('Frequency demodulated Signal');
MATLAB Simulation result for FM Demodulator:

Explanation:

From the frequency-modulated signal we can observe a multiplication of carrier signal and
message signal also in the frequency-modulated wave we can also observe a higher frequency
distribution during the positive half cycle of the message signal and a low-frequency
distribution during the negative half-cycle of the message cycle.

For the demodulation part, we simply feed the FM wave to the demodulator practically but in
MATLAB we use “fmdemod”. The output of demodulated waveform is exactly the same as
the message signal we fed into the modulator

Observation:

Frequency Modulating Band width=


Vm F1 F2 deviation Fd index 2(Fd+Fm)
(f1-f2) (f1-f2)/Fm

1 100 20 80 4 200
For Frequency deviation= 100:

For Frequency deviation= 250:

Inference:

From the modulation part, we understand the frequency of FM waves will be more during
the positive slope of the message signal and the frequency will be less at the negative slope of
the message signal and the demodulated waveform will be more similar to the message signal

Result:

The MATLAB code for FM modulation is done and verified the output using demodulation

You might also like