0% found this document useful (0 votes)
3 views

Final_MATLAB

The project simulates the transmission of various modulation techniques (AM, DSB-SC, SSB, FM) through an AWGN channel using MATLAB, focusing on a 15 dB SNR. Each signal is demodulated, and the SNR of the demodulated signals is calculated to evaluate noise robustness. The project also compares the pros and cons of each modulation technique regarding power efficiency, bandwidth efficiency, and noise resilience.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Final_MATLAB

The project simulates the transmission of various modulation techniques (AM, DSB-SC, SSB, FM) through an AWGN channel using MATLAB, focusing on a 15 dB SNR. Each signal is demodulated, and the SNR of the demodulated signals is calculated to evaluate noise robustness. The project also compares the pros and cons of each modulation technique regarding power efficiency, bandwidth efficiency, and noise resilience.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

PROJECT TITLE : MATLAB 21

COURSE CODE : ECC 201


COURSE INSTRUCTOR : ABHAY KUMAR SAH

Michael Jai Tigga Pushpendra Singh


22116054 22116077
ECE 3Y (O6) ECE 3Y (O7)
PROBLEM STATEMENT :
(a) Using MATLAB, simulate the transmission of
each of the modulated signals (AM, DSB-SC,
SSB, and FM) through an AWGN channel with an
SNR of 15 dB.
(b) Demodulate each received signal and plot the
demodulated output alongside the original
message signal.
(c) Calculate and compare the Signal-to-Noise
Ratio (SNR) of the demodulated signals for each
modulation scheme.
(d) Summarize the pros and cons of each
modulation technique in terms of power efficiency,
bandwidth efficiency, and robustness to noise give
complete MATLAB code.
ABSTRACT :

This project aims to simulate the transmission


of modulated signals—Amplitude Modulation
(AM), Double Sideband Suppressed Carrier
(DSB-SC), Single Sideband (SSB), and
Frequency Modulation (FM)—through an
Additive White Gaussian Noise (AWGN)
channel using MATLAB. The simulation is
conducted with a Signal-to-Noise Ratio (SNR)
of 15 dB for each signal. After transmission,
the signals are demodulated to retrieve the
original message signal, and the output is
plotted alongside the original signal for
comparison. Furthermore, the SNR of each
demodulated signal is calculated to assess
the noise robustness of each modulation
technique. Lastly, the project discusses the
pros and cons of each modulation scheme in
terms of power efficiency, bandwidth
efficiency, and resistance to noise, providing a
comprehensive comparison of their
performance in communication systems.
Steps Followed to write MATLAB Code :

1. Generate the Message Signal

 Create a simple message signal (e.g., a cosine wave or a sinusoidal signal)


that will be used for modulation.
 Define parameters such as sampling frequency and signal duration.

2. Amplitude Modulation (AM)

 Modulate the message signal using standard AM formula: (1 + message_signal) *


cos(2 * pi * carrier_frequency * t).
 Add white noise to the modulated signal by simulating transmission through
an AWGN (Additive White Gaussian Noise) channel with a given SNR (e.g.,
15 dB).
 Demodulate the AM signal using envelope detection.
 Apply a low-pass filter to smooth the demodulated signal.
 Plot the original message signal and the demodulated AM signal for
comparison.

3. Double Sideband Suppressed Carrier (DSB-SC) Modulation

 Modulate the message signal using DSB-SC: message_signal * cos(2 * pi *


carrier_frequency * t).
 Add white noise using the AWGN channel.
 Demodulate the DSB-SC signal by multiplying it with the carrier signal again
(coherent demodulation).
 Apply a low-pass filter to recover the original message signal.
 Plot the original message signal and the demodulated DSB-SC signal for
comparison.

4. Single Sideband (SSB) Modulation

 Modulate the message signal using the Hilbert transform to generate an


analytic signal for SSB modulation.
 Add white noise using the AWGN channel.
 Demodulate the SSB signal by multiplying with the carrier frequency and
applying a low-pass filter to recover the original message.
 Plot the original message signal and the demodulated SSB signal for
comparison.
5. Frequency Modulation (FM)

 Modulate the message signal using frequency modulation: cos(2 * pi *


carrier_frequency * t + 2 * pi * kf * integral(message_signal)) , where kf is the frequency
sensitivity.
 Add white noise using the AWGN channel.
 Demodulate the FM signal by differentiating the phase angle of the received
signal to extract the original message signal.
 Apply a low-pass filter to smooth the demodulated FM signal.
 Plot the original message signal and the demodulated FM signal for
comparison.

6. Signal-to-Noise Ratio (SNR) Calculation

 For each demodulated signal (AM, DSB-SC, SSB, FM), calculate the SNR
using MATLAB’s snr() function.
 Compare the SNR values for each modulation scheme to evaluate which
modulation technique is more robust to noise.

7. Comparison of Modulation Techniques

 Summarize the pros and cons of each modulation technique:


o AM: Simple, but low power efficiency and bandwidth inefficient,
sensitive to noise.
o DSB-SC: More power-efficient than AM but still uses double
bandwidth.
o SSB: Bandwidth efficient and less power consumption but more
complex to implement.
o FM: Very robust to noise but consumes more bandwidth compared to
AM and DSB-SC.

MODULATION TECHNIQUES
Amplitude Modulation (AM):

Amplitude Modulation (AM) is a technique where the amplitude of a carrier wave is


varied in proportion to the message signal. The modulated signal contains the carrier
and two sidebands (upper and lower), which represent the frequencies created by
the modulation. AM is simple to implement but suffers from low power efficiency
because the carrier consumes most of the power. It is also bandwidth inefficient,
requiring twice the bandwidth of the original message signal, and is susceptible to
noise interference.

Double Sideband Suppressed Carrier (DSB-SC):

DSB-SC is a variation of AM where the carrier is suppressed, and only the two
sidebands carry the information. This improves power efficiency as no power is
wasted on the carrier. The signal requires the same bandwidth as AM but with the
added complexity of needing a coherent demodulator to extract the message signal.
DSB-SC is more power-efficient but still uses double the bandwidth of the original
signal.
Single Sideband (SSB):

SSB modulation removes one of the sidebands, reducing the bandwidth by half
compared to AM and DSB-SC. This makes SSB highly bandwidth efficient,
transmitting only the essential sideband. SSB requires complex filtering and
demodulation but is preferred in long-distance communications due to its power and
bandwidth efficiency.

Frequency Modulation (FM):

In FM, the frequency of the carrier wave is varied according to the message signal.
FM provides high resistance to noise and is widely used in high-fidelity broadcasting.
However, it consumes much more bandwidth than AM and DSB-SC, making it
bandwidth inefficient. FM is ideal where signal quality and noise robustness are
prioritized over bandwidth conservation.

Effect of AWGN on Signals:

Additive White Gaussian Noise (AWGN) represents a basic noise model that adds
random, white noise to the transmitted signal. The term "white" refers to the noise
having a constant power spectral density across all frequencies, similar to white light
containing all visible wavelengths. "Gaussian" indicates that the amplitude of the
noise follows a normal distribution.

AWGN affects all modulation schemes by introducing random fluctuations in the


signal’s amplitude and phase, degrading the signal quality. The key effects are:

1. Signal Distortion: AWGN adds random variations that distort the signal, making it
harder to detect and demodulate accurately.
2. Decreased Signal-to-Noise Ratio (SNR): AWGN reduces the SNR, making it more
challenging to recover the original message from the received signal.
3. Bit Errors: In digital communication, AWGN can introduce bit errors, as the noisy
signal may be misinterpreted during demodulation.

Simulation of Real-World Transmission:

AWGN simulates real-world conditions where signals are transmitted over noisy
channels. In real environments, factors like thermal noise, atmospheric conditions, or
interference from other transmissions generate noise similar to AWGN. By adding
AWGN to signals in MATLAB simulations, we mimic the unpredictable nature of real
communication channels.

This allows us to evaluate the robustness of different modulation schemes under


noise and test the system's performance under realistic transmission scenarios.
Different modulation techniques respond differently to AWGN, revealing their
strengths and weaknesses in terms of power efficiency, bandwidth usage, and noise
resilience.
The advantages and disadvantages of each
modulation technique in terms of power efficiency,
bandwidth efficiency, and noise robustness
Amplitude Modulation (AM)

Pros:

 Simplicity: AM is easy to implement and demodulate, making it suitable for basic


communication systems.
 Wide Compatibility: AM signals can be easily transmitted and received with a
simple setup.

Cons:

 Power Inefficiency: A significant portion of power is used by the carrier wave, which
does not convey any information.
 Bandwidth Inefficiency: AM requires double the bandwidth of the original message
signal due to the presence of both upper and lower sidebands.
 Noise Susceptibility: AM signals are highly susceptible to noise and interference,
which can distort the signal and lead to a poor quality reception.

Double Sideband Suppressed Carrier (DSB-SC)

Pros:

 Improved Power Efficiency: DSB-SC does not transmit the carrier, reducing power
consumption compared to AM.
 Reduced Distortion: Since the carrier is suppressed, there is less distortion caused
by noise.

Cons:

 Coherent Demodulation Required: DSB-SC requires a coherent receiver, making


the system more complex.
 Bandwidth Inefficiency: It still uses the same bandwidth as AM, which can be a
limitation for certain applications.

Single Sideband (SSB)

Pros:

 High Bandwidth Efficiency: SSB uses only one sideband, effectively halving the
bandwidth requirement compared to AM and DSB-SC.
 Power Efficiency: SSB transmits information with minimal power, as it avoids
transmitting the carrier and one sideband.

Cons:
 Complexity: The generation and demodulation of SSB signals are more complex,
requiring advanced filtering techniques.
 Phase and Frequency Stability: SSB systems require precise synchronization to
maintain phase coherence, which can complicate the design.

Frequency Modulation (FM)

Pros:

 Robustness to Noise: FM is highly resistant to noise and interference, making it


ideal for high-fidelity audio and communication.
 Improved Signal Quality: FM maintains better signal quality over long distances
compared to AM.

Cons:

 Bandwidth Inefficiency: FM signals require significantly more bandwidth than AM,


DSB-SC, or SSB due to the nature of frequency deviation.
 Complex Receiver Design: FM demodulation requires more complex circuits
compared to AM, increasing the overall system complexity.

Summary Table
Modulation Noise
Power Efficiency Bandwidth Efficiency
Technique Robustness

Low (double original


AM Low Low
signal)

Moderate (carrier
DSB-SC Low (same as AM) Moderate
suppressed)

SSB High High (half of AM/DSB-SC) High

Low (broadband
FM Moderate Very High
requirements)

This summary provides a quick overview of the advantages and disadvantages of


each modulation technique, helping to assess their suitability for different
communication applications.

Complete MATLAB CODE :


NOTE : % is used in MATLAB for comments for better code readability.

% Parameters
fs = 10000; % Sampling frequency
t = 0:1/fs:1-1/fs; % Time vector (1 second duration)
f_message = 5; % Frequency of message signal (Hz)
A_message = 1; % Amplitude of message signal
f_carrier = 100; % Frequency of carrier signal (Hz)
A_carrier = 1; % Amplitude of carrier signal
snr_db = 15; % Signal-to-Noise Ratio in dB

% Generate message signal (cosine wave)


message_signal = A_message * cos(2 * pi * f_message * t);

% Modulate Signals
% 1. Amplitude Modulation (AM)
am_modulated_signal = (1 + message_signal) .* A_carrier .* cos(2 * pi * f_carrier
* t);

% 2. Double-Sideband Suppressed Carrier (DSB-SC)


dsb_sc_modulated_signal = message_signal .* A_carrier .* cos(2 * pi * f_carrier *
t);

% 3. Single-Sideband (SSB)
analytic_signal = hilbert(message_signal);
ssb_modulated_signal = real(analytic_signal .* exp(1j * 2 * pi * f_carrier * t));

% 4. Frequency Modulation (FM)


fm_modulated_signal = A_carrier * cos(2 * pi * f_carrier * t + 2 * pi * f_message
* t);

% Transmit each signal through an AWGN channel


received_am = awgn(am_modulated_signal, snr_db, 'measured');
received_dsb_sc = awgn(dsb_sc_modulated_signal, snr_db, 'measured');
received_ssb = awgn(ssb_modulated_signal, snr_db, 'measured');
received_fm = awgn(fm_modulated_signal, snr_db, 'measured');

% Demodulate each received signal

% AM Demodulation
envelope_am = abs(received_am);
lp_filter_am = designfilt('lowpassfir', 'FilterOrder', 20, 'CutoffFrequency', 20,
'SampleRate', fs);
demodulated_am = filtfilt(lp_filter_am, envelope_am);

% DSB-SC Demodulation
dsb_sc_demodulated = received_dsb_sc .* cos(2 * pi * f_carrier * t);
[b, a] = tf(lp_filter_am); % Get the filter coefficients from the low-pass filter
demodulated_dsb_sc = filter(b, a, dsb_sc_demodulated);

% SSB Demodulation
ssb_demodulated = received_ssb .* exp(-1j * 2 * pi * f_carrier * t);
demodulated_ssb = real(hilbert(ssb_demodulated));
% FM Demodulation
fm_demodulated = fmdemod(received_fm, f_carrier, fs, f_message);

% (c) Calculate and compare the Signal-to-Noise Ratio (SNR)


function snr_value = calculate_snr(original_signal, received_signal)
signal_power = mean(original_signal.^2);
noise_power = mean((received_signal - original_signal).^2);
snr_value = 10 * log10(signal_power / noise_power);
end

snr_am = calculate_snr(message_signal, demodulated_am);


snr_dsb_sc = calculate_snr(message_signal, demodulated_dsb_sc);
snr_ssb = calculate_snr(message_signal, demodulated_ssb);
snr_fm = calculate_snr(message_signal, fm_demodulated);

% Display SNR values


disp(['AM SNR: ', num2str(snr_am), ' dB']);
disp(['DSB-SC SNR: ', num2str(snr_dsb_sc), ' dB']);
disp(['SSB SNR: ', num2str(snr_ssb), ' dB']);
disp(['FM SNR: ', num2str(snr_fm), ' dB']);

% Plot the original and demodulated signals


figure;

% AM
subplot(4, 2, 1);
plot(t, message_signal);
title('Original Message Signal (AM)');
xlabel('Time (seconds)');
ylabel('Amplitude');
grid on;

subplot(4, 2, 2);
plot(t, demodulated_am);
title('Demodulated AM Signal');
xlabel('Time (seconds)');
ylabel('Amplitude');
grid on;

% DSB-SC
subplot(4, 2, 3);
plot(t, message_signal);
title('Original Message Signal (DSB-SC)');
xlabel('Time (seconds)');
ylabel('Amplitude');
grid on;

subplot(4, 2, 4);
plot(t, demodulated_dsb_sc);
title('Demodulated DSB-SC Signal');
xlabel('Time (seconds)');
ylabel('Amplitude');
grid on;

% SSB
subplot(4, 2, 5);
plot(t, message_signal);
title('Original Message Signal (SSB)');
xlabel('Time (seconds)');
ylabel('Amplitude');
grid on;

subplot(4, 2, 6);
plot(t, demodulated_ssb);
title('Demodulated SSB Signal');
xlabel('Time (seconds)');
ylabel('Amplitude');
grid on;

% FM
subplot(4, 2, 7);
plot(t, message_signal);
title('Original Message Signal (FM)');
xlabel('Time (seconds)');
ylabel('Amplitude');
grid on;

subplot(4, 2, 8);
plot(t, fm_demodulated);
title('Demodulated FM Signal');
xlabel('Time (seconds)');
ylabel('Amplitude');
grid on;

RESULTS :

Fig 1.) SNR of various demodulated signals are displayed.


Fig.2) Graphs of various message signals and their demodulated signals.

Conclusion :

Based on the simulation and analysis of the modulation techniques (AM, DSB-SC, SSB, and
FM) in the presence of an AWGN channel, the following conclusions can be drawn regarding
their performance:

1. Signal Quality: Frequency Modulation (FM) consistently demonstrated superior


signal quality, showing high robustness against noise and distortion. The ability of
FM to maintain signal integrity, even under low SNR conditions, makes it ideal for
high-fidelity applications such as FM broadcasting.
2. Efficiency: Single Sideband (SSB) modulation emerged as the most efficient in terms
of both power and bandwidth. By transmitting only one sideband, SSB minimizes
power consumption and bandwidth usage, making it highly suitable for long-distance
communications where bandwidth conservation is critical.
3. Power Consumption: While DSB-SC improves power efficiency by suppressing the
carrier, it still requires the same bandwidth as AM and is more complex to implement.
AM, although simple and easy to demodulate, proved to be the least efficient due to
high power consumption from the carrier and vulnerability to noise.
4. Complexity vs. Performance: SSB and FM are more complex than AM and DSB-SC
but offer significant advantages in noise resistance and efficiency. While SSB is
advantageous for its efficiency, FM is preferred in scenarios where noise immunity is
paramount, such as in radio and television broadcasting.

In summary, the choice of modulation technique depends on the specific requirements of the
communication system. If bandwidth efficiency and power conservation are priorities, SSB is
the optimal choice. However, for applications demanding high robustness to noise, FM stands
out as the best performing modulation technique.

You might also like