0% found this document useful (0 votes)
15 views9 pages

NSS Experiment 11 Updated

Uploaded by

manas210405
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)
15 views9 pages

NSS Experiment 11 Updated

Uploaded by

manas210405
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/ 9

K. J.

Somaiya College of Engineering, Mumbai-77


(A Constituent College of Somaiya Vidyavihar University)
Department of Electronics Engineering

Course Name: Networks, Signals and Systems Semester: III


Date of Performance: 23/10/24 Batch No: A2
Faculty Name: Prof.Alice Cheeran Roll No: 31
Faculty Sign & Date: Grade/Marks:

Experiment No: 11
Title: Mini Project
Aim and Objective of the Experiment:
Project based learning: Identify the applications of Signals and Systems and implement it using
software

COs to be achieved:
CO4: Understand operations of continuous signals and systems
CO5: Apply Fourier series and transform for spectral analysis

Stepwise-Procedure:
1. Identify any application of (Not covered in Laboratory experiments)
“Signals and Systems ” course.
Application: Implementing amplitude modulation (AM) or frequency modulation (FM) system
to illustrate how signals can be transmitted and received, which is widely used in communications.
2.Implement the selected experiment using software.
Ans:(With explanation)
% Parameters
Fs = 10000; % Sampling frequency (Hz)
t = 0:1/Fs:0.5; % Time vector (0.5 seconds)
message_freq = 100; % Message signal frequency (Hz)
carrier_freq = 1000; % Carrier frequency (Hz)
amplitude_message = 1; % Amplitude of message signal
amplitude_carrier = 1; % Amplitude of carrier signal
modulation_index_AM = 0.5;% AM modulation index
modulation_index_FM = 10; % FM modulation index
n_terms = 10; % Number of terms in Fourier series approximation

% Fourier Series Approximation of Message Signal


message_signal_fourier = zeros(size(t));
for k = 1:n_terms
% Calculating Fourier series terms (assuming message signal is a square wave)
bn = (4 * amplitude_message / (pi * (2*k - 1))) * sin(2 * pi * (2*k - 1) * message_freq * t);

Networks, Signals and Systems Semester: III Academic Year: 2023-24


Roll No:
K. J. Somaiya College of Engineering, Mumbai-77
(A Constituent College of Somaiya Vidyavihar University)
Department of Electronics Engineering

message_signal_fourier = message_signal_fourier + bn; % Sum terms for Fourier series


approximation
end

% Original Message Signal (Sine Wave for comparison)


message_signal = amplitude_message * sin(2 * pi * message_freq * t);

% Carrier Signal
carrier_signal = amplitude_carrier * sin(2 * pi * carrier_freq * t);

% AM Modulation using Fourier-approximated Message Signal


AM_signal_fourier = (1 + modulation_index_AM * message_signal_fourier) .* carrier_signal;

% FM Modulation using Fourier-approximated Message Signal


FM_signal_fourier = amplitude_carrier * sin(2 * pi * carrier_freq * t + modulation_index_FM *
message_signal_fourier);

% Spectral Analysis
n = length(t); % Number of points
f = (-n/2:n/2-1)*(Fs/n); % Frequency vector for plotting

% Fourier Transform and shift for plotting in frequency domain


message_spectrum = fftshift(abs(fft(message_signal, n)));
AM_spectrum = fftshift(abs(fft(AM_signal_fourier, n)));
FM_spectrum = fftshift(abs(fft(FM_signal_fourier, n)));

% Plotting the Frequency Spectrum of the Message Signal


figure;
subplot(3, 1, 1);
plot(f, message_spectrum);
title('Spectrum of Message Signal');
xlabel('Frequency (Hz)');
ylabel('Magnitude');

% Plotting the Frequency Spectrum of the AM Signal


subplot(3, 1, 2);
plot(f, AM_spectrum);
title('Spectrum of AM Signal');
xlabel('Frequency (Hz)');
ylabel('Magnitude');

% Plotting the Frequency Spectrum of the FM Signal


subplot(3, 1, 3);
plot(f, FM_spectrum);
title('Spectrum of FM Signal');

Networks, Signals and Systems Semester: III Academic Year: 2023-24


Roll No:
K. J. Somaiya College of Engineering, Mumbai-77
(A Constituent College of Somaiya Vidyavihar University)
Department of Electronics Engineering

xlabel('Frequency (Hz)');
ylabel('Magnitude');
3.Upload the plots/results in the experiment document.

Observations

Post Lab Subjective/Objective type Questions:


Submit a detail project report of the mini project.
Project Report on Modulation and Demodulation
Title: Implementation of Amplitude Modulation (AM) and Frequency Modulation
(FM) Using MATLAB

Networks, Signals and Systems Semester: III Academic Year: 2023-24


Roll No:
K. J. Somaiya College of Engineering, Mumbai-77
(A Constituent College of Somaiya Vidyavihar University)
Department of Electronics Engineering

Submitted by: Manas Pandya

1.Introduction:
1.1 Objective: The objective of this project is to understand and implement amplitude modulation
(AM) and frequency modulation (FM) using MATLAB software to illustrate how signals can be
transmitted and received, as is commonly done in communication systems.

1.2 Overview:AM and FM are widely used techniques in communication systems to encode
information into carrier waves, which are then transmitted over a medium and demodulated at the
receiver end. This project implements AM and FM systems using MATLAB to simulate
modulation and demodulation of a message signal, while also performing spectral analysis.

2. Aim and Objectives:


2.1 Aim:To implement and analyze modulation techniques (AM and FM) using MATLAB.

2.2 Objectives:  Apply modulation and demodulation processes using MATLAB.


 Analyze the frequency spectrum of AM and FM signals.
 Illustrate how spectral analysis helps in understanding signal transmission.

3. Course Outcomes:
 CO4: Understand operations of continuous signals and systems.
 CO5: Apply Fourier series and Fourier transform for spectral analysis.

4. Theoretical Background:
Modulation:
Modulation is the process of varying a carrier wave’s properties based on a message signal’s
properties, enabling efficient transmission over long distances.

 Amplitude Modulation (AM):


In AM, the carrier wave’s amplitude is varied in accordance with the message signal. AM is
simpler and requires a narrower bandwidth, but it is more susceptible to noise and
interference.
 Frequency Modulation (FM):
FM alters the frequency of the carrier signal based on the amplitude of the message signal.
It is more resistant to noise but requires a larger bandwidth than AM.

5. Implementation in MATLAB:
5.1 Code for Modulation and Demodulation

Networks, Signals and Systems Semester: III Academic Year: 2023-24


Roll No:
K. J. Somaiya College of Engineering, Mumbai-77
(A Constituent College of Somaiya Vidyavihar University)
Department of Electronics Engineering

The MATLAB code below demonstrates the modulation and demodulation of a message signal
using both AM and FM.

% Parameters
Fs = 10000; % Sampling frequency (Hz)
t = 0:1/Fs:0.5; % Time vector (0.5 seconds)
message_freq = 100; % Message signal frequency (Hz)
carrier_freq = 1000; % Carrier frequency (Hz)
amplitude_message = 1; % Amplitude of message signal
amplitude_carrier = 1; % Amplitude of carrier signal
modulation_index_AM = 0.5;% AM modulation index
modulation_index_FM = 10; % FM modulation index

% Message Signal
message_signal = amplitude_message * sin(2 * pi * message_freq * t);

% Carrier Signal
carrier_signal = amplitude_carrier * sin(2 * pi * carrier_freq * t);

% AM Modulation
AM_signal = (1 + modulation_index_AM * message_signal) .* carrier_signal;

% FM Modulation
FM_signal = amplitude_carrier * sin(2 * pi * carrier_freq * t + modulation_index_FM *
message_signal);

% Demodulation of AM Signal (Envelope Detection)


AM_envelope = abs(hilbert(AM_signal)); % Envelope detection using Hilbert transform

% FM Demodulation using differentiation and Hilbert transform


FM_demodulated = diff(unwrap(angle(hilbert(FM_signal)))) * Fs / (2 * pi *
modulation_index_FM);

% Spectral Analysis
n = length(t); % Number of points
f = (-n/2:n/2-1)*(Fs/n); % Frequency vector for plotting

% Fourier Transform and shift for plotting in frequency domain


message_spectrum = fftshift(abs(fft(message_signal, n)));
AM_spectrum = fftshift(abs(fft(AM_signal, n)));
FM_spectrum = fftshift(abs(fft(FM_signal, n)));

% Plotting the Frequency Spectrum


figure;
subplot(3, 1, 1);

Networks, Signals and Systems Semester: III Academic Year: 2023-24


Roll No:
K. J. Somaiya College of Engineering, Mumbai-77
(A Constituent College of Somaiya Vidyavihar University)
Department of Electronics Engineering

plot(f, message_spectrum);
title('Spectrum of Message Signal');
xlabel('Frequency (Hz)');
ylabel('Magnitude');

subplot(3, 1, 2);
plot(f, AM_spectrum);
title('Spectrum of AM Signal');
xlabel('Frequency (Hz)');
ylabel('Magnitude');

subplot(3, 1, 3);
plot(f, FM_spectrum);
title('Spectrum of FM Signal');
xlabel('Frequency (Hz)');
ylabel('Magnitude');

5.2 Explanation of the Code

Parameters:

 Fs: Sampling frequency, which determines how accurately the signals are represented in the
time domain.
 t: Time vector for creating continuous signal samples.
 message_freq and carrier_freq: Frequencies of the message (information) and carrier
signals.
 modulation_index_AM and modulation_index_FM: Modulation indices for AM and FM
that control the modulation depth (how much the carrier’s amplitude or frequency is
influenced by the message signal).

Modulation:

 AM Modulation: The carrier signal’s amplitude is varied according to the message signal,
creating sidebands that appear as mirrored copies of the message signal around the carrier
frequency.
 FM Modulation: The frequency of the carrier signal varies with the amplitude of the
message signal, creating multiple sidebands in the frequency spectrum, which indicates a
broader bandwidth.

Demodulation:

 AM Demodulation: Uses envelope detection by applying the Hilbert transform to


retrieve the message signal’s amplitude variations.

Networks, Signals and Systems Semester: III Academic Year: 2023-24


Roll No:
K. J. Somaiya College of Engineering, Mumbai-77
(A Constituent College of Somaiya Vidyavihar University)
Department of Electronics Engineering

 FM Demodulation: Retrieves the original message signal by differentiating the unwrapped


phase angle of the signal, which measures the frequency deviation.

Spectral Analysis with Fourier Transform:

The Fourier Transform (using the Fast Fourier Transform, fft()) is applied to analyze the frequency
content of each signal (message, AM, and FM) by transforming them from the time domain to the
frequency domain. This helps visualize how the message signal is represented in the frequency
domain after modulation and observe the frequency components.

 Application of Fourier Transform:


Fourier Transform is applied to each signal to obtain its magnitude spectrum, allowing us
to identify the main frequency components and sidebands. This provides insights into:
o Bandwidth Requirements: AM and FM signals show different sidebands,
revealing that FM requires more bandwidth than AM.
o Frequency Content: Each signal’s spectral components provide a clear picture of
how the message signal’s information is encoded in terms of frequency shifts (FM)
or amplitude variations (AM).
 Plotting Spectral Content: The spectra are plotted to display the magnitude of each
frequency component. The Fourier Transformed signals show:
o Message Spectrum: Displays the primary frequency component of the message
signal.
o AM Spectrum: Shows sidebands around the carrier frequency, reflecting how the
carrier’s amplitude is modified by the message signal.
o FM Spectrum: Displays a series of sidebands due to the carrier frequency
variations, representing how the message signal alters the carrier frequency.

6. Results and Analysis:

Networks, Signals and Systems Semester: III Academic Year: 2023-24


Roll No:
K. J. Somaiya College of Engineering, Mumbai-77
(A Constituent College of Somaiya Vidyavihar University)
Department of Electronics Engineering

6.1 Time Domain Representation:The message signal and modulated AM/FM signals were
plotted, demonstrating how each modulation technique modifies the carrier based on the message
signal.

6.2 Frequency Spectrum Analysis:

1)Message Signal Spectrum: Displays the primary frequency component of the message.

2)AM Spectrum: Shows sidebands around the carrier frequency, reflecting the message signal’s
frequency content.

3)FM Spectrum: Shows a wider range of sidebands around the carrier, reflecting the larger
bandwidth required for FM.

Observations:

 Bandwidth: FM requires a larger bandwidth than AM.


 Noise Resistance: While FM is generally more resistant to noise, this can only be observed
in practical implementations.

7. Conclusion:
 This project successfully implemented AM and FM modulation using MATLAB. The
results showed that:
 AM and FM can efficiently transmit signals, with FM providing better noise resistance at
the cost of higher bandwidth.

Networks, Signals and Systems Semester: III Academic Year: 2023-24


Roll No:
K. J. Somaiya College of Engineering, Mumbai-77
(A Constituent College of Somaiya Vidyavihar University)
Department of Electronics Engineering

 Spectral analysis helped visualize the signal properties in the frequency domain, making it
easier to understand the differences between AM and FM.

9. References:
 A Nagoor Kani-Signals and systems.
 Ravish Singh:Network Analysis and Synthesis
 Signals and systems by Tarun Kumar Rawat.
 MATLAB Documentation
 Online MATLAB resources on modulation and spectral analysis

Conclusion:
This mini-project successfully demonstrated the principles and implementation of Amplitude Modulation
(AM) and Frequency Modulation (FM) using MATLAB. Through this project, we explored how modulation
techniques are used to encode information in carrier signals for transmission, focusing on their differences in
bandwidth requirements and noise resistance. The application of the Fourier Transform enabled spectral
analysis, providing insights into the frequency components and bandwidth of each modulated signal.
Our results confirmed that while AM is simpler to implement and requires less bandwidth, FM offers better
noise resistance at the expense of larger bandwidth. This understanding underscores the significance of
selecting appropriate modulation techniques based on application requirements. Overall, this project provided
a comprehensive overview of modulation and demodulation, enhancing both theoretical and practical
knowledge of signal processing in communication systems.

Signature of faculty in-charge with Date:

Networks, Signals and Systems Semester: III Academic Year: 2023-24


Roll No:

You might also like