0% found this document useful (0 votes)
11 views8 pages

ADCexp 4

Uploaded by

sarthakbh009
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views8 pages

ADCexp 4

Uploaded by

sarthakbh009
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Experiment no : 4

Name Sarthak Sandip Bhosale


UID 2023201002
Exp no. 4
Aim FM Generation and demodulation Using Matlab/Simulink.
Software Matlab Online

Theory :
1. Frequency Modulation (FM) Overview
Frequency Modulation (FM) is a technique where the frequency of the carrier signal is
varied in proportion to the instantaneous amplitude of the modulating signal. It is widely
used in radio broadcasting due to its resilience against signal noise and superior sound
quality.

1) Modulating Signal (m(t)): The baseband signal carrying information (e.g., voice,
music).
2) Carrier Signal (c(t)): A high-frequency sinusoidal signal used to carry the modulating
signal.
3) FM Signal (s(t)): The resulting signal after frequency modulation, where the
frequency of the carrier signal varies according to the amplitude of the modulating signal.

The mathematical expression for the FM signal is:

Where:
- Ac : Amplitude of the carrier signal
- fc : Frequency of the carrier signal
- kf : Frequency sensitivity (modulation index)
- m(t) : Modulating signal

2. FM Modulation Using MATLAB/Simulink


In MATLAB/Simulink, FM generation can be implemented by creating a block diagram
consisting of:
a. Sine Wave Block (Modulating Signal): Represents the information signal (e.g., audio
signal).
b. Carrier Signal Block: A high-frequency sine wave acting as the carrier.
c. FM Modulator Block: This block varies the carrier frequency according to the
amplitude of the modulating signal.

Steps in Simulink:
1. Generate a modulating signal using a Sine Wave block.
2. Set up a Carrier Sine Wave block.
3. Use an FM Modulator Passband block to modulate the signal.

3. FM Demodulation
FM demodulation involves recovering the original modulating signal from the FM signal.
Common methods include:
a. Frequency Discriminator Method: Converts frequency variations into amplitude
variations.
b. Phase-Locked Loop (PLL) Method: Tracks the frequency of the incoming FM signal
to extract the original information.

FM Demodulation Process:
- The demodulated signal is produced by passing the FM signal through a frequency
discriminator, which translates the frequency variations back into amplitude changes,
thus recovering the original modulating signal.
4. FM Demodulation Using MATLAB/Simulink
In Simulink, FM demodulation is implemented by:
1. Inputting the modulated FM signal.
2. Using an FM Demodulator Passband block to demodulate the signal and recover the
original modulating signal.

Steps in Simulink:
1. Input the FM modulated signal to the FM Demodulator Passband block.
2. Set up the necessary parameters for carrier frequency and modulation index.
3. Observe the recovered modulating signal via a Scope or Time Scope block.

5. Applications of FM
- Radio broadcasting (FM radio)
- Sound transmission in TV
- Data transmission in wireless communication systems

By using MATLAB/Simulink, FM generation and demodulation processes can be


simulated, helping in understanding real-world communication systems.

Part A : (Using Matlab )

%% I. Parameters
vm = 2; % message signal amplitude
vc = 2; % carrier signal amplitude
fm = 10; % message signal frequency
fc = 100; % carrier signal frequency
kf = 10; % sensitivity constant

fs = 1000; % sampling frequency


t = 0:1/fs:1; % time vector (1 second duration)
N = length(t); % number of samples

msg_mod = 1; % set to 0: just plot the modulated signal


% set to 1: plot modulated & message together (overlap)
%% II. Message signal generation
% message signal
vmt = vm * cos(2*pi*fm*t);

% plotting message signal


figure(1);
plot(t,vmt);
x0=10; y0=10; width=1000; height=400;
set(gcf,'position',[x0,y0,width,height]);
title('Message Signal');
xlabel('Time (s)');
ylabel('Amplitude');

%% III. Carrier signal generation


% carrier signal
vct = vc * cos(2*pi*fc*t);

% plotting carrier signal


plot(t,vct);
title('Carrier Signal');
xlabel('Time (s)');
ylabel('Amplitude');
%% IV. Frequency deviation, modulation index and bandwidth
dfc = kf * vm; % frequency deviation
beta = dfc / fm; % modulation index
bw = 2 * (dfc + fm); % bandwidth (Carson's rule)

% printing resulting parameters


fprintf('Frequency deviation : %.2f Hz\n', dfc);

Frequency deviation : 20.00 Hz

fprintf('Modulation index : %.2f\n', beta);

Modulation index : 2.00

fprintf('Bandwidth (Carson) : %.2f Hz\n\n', bw);

Bandwidth (Carson) : 60.00 Hz

%% V. FM modulated signal
vst = vc * cos(2*pi*fc*t + beta * sin(2*pi*fm*t));

% plotting FM modulated signal


plot(t,vst);
if msg_mod == 1
hold on;
plot(t,vmt,'--r');
hold off;
legend('FM signal', 'Message signal');
end
title('FM Modulated Signal');
xlabel('Time (s)');
ylabel('Amplitude');
%% VI. Spectrum of FM signal
z = fftshift(fft(vst)) / N; % Fourier Transform of FM signal
f = (-N/2:N/2-1) * (fs/N); % Frequency vector

% plotting spectrum of FM signal


figure(2);
plot(f, abs(z)); % Corrected to use full 'z' vector
x0=10; y0=10; width=1000; height=400;
set(gcf,'position',[x0,y0,width,height]);
title('Spectrum of FM Modulated Signal');
xlabel('Frequency (Hz)');
ylabel('Normalized Amplitude');
xlim([-2*fc 2*fc]); % Set x-axis limits to show around carrier frequency
grid on;
Part-B : ( Using Simulink )

Output :
Conclusion :
In this experiment, we successfully performed Frequency Modulation (FM) using both
MATLAB code and Simulink. Through the MATLAB code, we understood the core concepts of
FM modulation, including generating message and carrier signals, calculating key parameters
like frequency deviation and modulation index, and visualizing the resulting modulated signal.
We also analyzed the frequency spectrum of the FM signal to observe its bandwidth and
behavior. Additionally, by performing FM modulation using Simulink, we gained a practical
understanding of how FM systems operate in a simulated environment, allowing us to visualize
real-time modulation and demodulation processes. This comprehensive approach helped
reinforce our understanding of FM communication systems and their significance in real-world
applications.

You might also like