Sei sulla pagina 1di 8

Experiment # 08

Demonstration of Frequency Demodulation (DFM) scheme using


MATLAB/Simulink
OBJECTIVE:
To generate FM wave and perform demodulation of FM wave using MATLAB and Simulink.

APPARATUS REQUIRED
S.N. Item required
1. Computer
2. MATLAB

Theory:
There are a number of circuits that can be used to demodulate FM. Each type has its own
advantages and disadvantages, some being used when receivers used discrete components, and
others now that ICs are widely used.
Below is a list of some of the main types of FM demodulator or FM detector. Frequency
demodulators are often referred to as discriminators or frequency detectors.
• Slope FM detector
• Foster-Seeley FM detector:
• PLL, Phase locked loop FM demodulator:
• Quadrature FM demodulator:
• Coincidence FM demodulator:

FM Modulation and Demodulation of a Sinusoidal Signal in MATLAB

fmmod command used for Frequency modulation in MATLAB.

Y = fmmod(X,Fc,Fs,FREQDEV) uses the message signal X to modulate the

carrier frequency Fc (Hz) and sample frequency Fs (Hz), where Fs >2*Fc.

FREQDEV (Hz) is the frequency deviation of the modulated signal.

Y = fmmod(X,Fc,Fs,FREQDEV,INI_PHASE) specifies the initial phase of

the modulation.
fmdemod command used for Frequency demodulation in MATLAB.
Z = fmdemod(Y,Fc,Fs,FREQDEV) demodulates the FM modulated signal Y at
the carrier frequency Fc (Hz). Y and Fc have sample frequency Fs (Hz).
FREQDEV is the frequency deviation (Hz) of the modulated signal.

Z = fmdemod(Y,Fc,Fs,FREQDEV,INI_PHASE) specifies the initial phase of


the modulated signal.

Example 1: Demonstrate frequency demodulation for a sinusoidal signal with frequency 20 Hz


and with a carrier frequency of 200 Hz. Set sampling frequency to 1000Hz and frequency
deviation to 50 Hz using MATLAB.
clc
clear all
close all

% Create a time vector t with sampling frequency 1000 Hz.


fs = 1000;
t = 0:1/fs:0.2;
% Create a sinusoidal Vinfo signal with frequency 20 Hz.
fm=20;
vm=1;
vinfo = vm*sin(2*pi*fm*t);
% Create a sinusoidal Vcarrier signal with frequency 200 Hz.
fc = 200;
vc=1;
vcarrier = vc*sin(2*pi*fc*t);
% Set the frequency deviation to 50 Hz.
fDev = 50;
% Frequency modulate Vinfo.
Fm = fmmod(vinfo,fc,fs,fDev);
%Demodulate z.
Dfm = fmdemod(Fm,fc,fs,fDev);
% Plot the original and demodulated signals.
subplot 311
plot(t,vinfo);
xlabel('Time (s)')
ylabel('Amplitude(v)')
legend('Original Signal')
subplot 312
plot(t,Fm);
xlabel('Time (s)')
ylabel('Amplitude(v)')
legend('Modulated Signal')
subplot 313
plot(t,Dfm);
xlabel('Time (s)')
ylabel('Amplitude(v)')
legend('Demodulated Signal')
Figure 8.1 Frequency demodulation of FM signal using MATLAB

Example 2: Demonstrate frequency demodulation for a sinusoidal signal with frequency 20 Hz


and with a carrier frequency of 200 Hz. Set sampling frequency to 1000Hz and frequency
deviation to 50 Hz using Simulink.

Figure 8.2 Frequency demodulation of FM signal using MATLAB Simulink


Output:

8.3 Frequency demodulation of FM signal using MATLAB Simulink


LAB TASK 1:
Demonstrate frequency demodulation for a sinusoidal signal with frequency 30 Hz and with a
carrier frequency of 300 Hz. Set sampling frequency to 1000Hz, frequency deviation to 75Hz,
100Hz and 150Hz using MATLAB.

Output:

Figure 8.4 Frequency demodulation of FM signal using MATLAB


Figure 8.5 Frequency demodulation of FM signal using MATLAB

Figure 8.6 Frequency demodulation of FM signal using MATLAB

LAB TASK 2:
Demonstrate frequency demodulation for a sinusoidal signal with frequency 30 Hz and with a
carrier frequency of 300 Hz. Set sampling frequency to 1000Hz, frequency deviation to 75Hz,
100Hz and 150Hz using Simulink.

Output:

8.7 Frequency demodulation of 75Hz FM signal using MATLAB Simulink


8.7 Frequency demodulation of 100Hz FM signal using MATLAB Simulink

8.8 Frequency demodulation of 150Hz FM signal using MATLAB Simulink


Procedure:

 Open matlab in Computer


 Press ctrl +N to open editor window
 Write desired code for the given tasks in editor window
 Use build-in commands plot, subplot for output
 Press Ctrl+S to save the code
 Press ‘Run’ to execute the program
 Observe the output as shown in the figures given above:
 Output as shown in above figures 6.2
 Task Code
clc
clear all
close all
% Create a time vector t with sampling frequency 1000 Hz.
fs = 1000;
t = 0:1/fs:0.2;
% Create a sinusoidal Vinfo signal with frequency 20 Hz.
fm=30;
vm=1;
vinfo = vm*sin(2*pi*fm*t);
% Create a sinusoidal Vcarrier signal with frequency 200 Hz.
fc = 300;
vc=1;
vcarrier = vc*sin(2*pi*fc*t);
% Set the frequency deviation to 50 Hz.
fDev = 75;
% Frequency modulate Vinfo.
Fm = fmmod(vinfo,fc,fs,fDev);
%Demodulate z.
Dfm = fmdemod(Fm,fc,fs,fDev);
% Plot the original and demodulated signals.
subplot 311
plot(t,vinfo);
title('Frequency Deviation to 75Hz')
xlabel('Time (s)')
ylabel('Amplitude(v)')
legend('Original Signal')
subplot 312
plot(t,Fm);
xlabel('Time (s)')
ylabel('Amplitude(v)')
legend('Modulated Signal')
subplot 313
plot(t,Dfm);
xlabel('Time (s)')
ylabel('Amplitude(v)')
legend('Demodulated Signal')
Comments:
FM demodulator circuits are found in any receiver that uses FM: broadcast
receivers, two ways radios like walkie talkies and handheld radios that use FM, and any receiver
where frequency modulation is used. In any radio that is designed to
receive frequency modulated signals there is some form of FM demodulator or detector. This
circuit takes in frequency modulated RF signals and takes the modulation from the signal to
output only the modulation that had been applied at the transmitter. These FM demodulators are
used in different applications. The different types of FM demodulator provide designers with a
choice of approaches dependent upon the application: broadcast, two way radio communications
including walkie talkies and handheld radios, high specification communications receivers and
the like.
Conclusion:
The process of detection provides a means of recovering the modulating Signal
from demodulating signal. Demodulation is the reverse process of modulation. The detector
circuit is employed to separate the carrier wave and eliminate the side bands. FM demodulation
is a key process in the reception of a frequency modulated signal. Once the signal has been
received, filtered and amplified, it is necessary to recover the original modulation from the
carrier. It is this process that is called demodulation or detection. Demodulation is the process of
separating information from a modulated carrier wave. To perform the demodulation, an internal
counter is used to determine the frequency of the incoming signal. Demodulation is
the process of separating information from a modulated carrier wave.

Potrebbero piacerti anche