ADCexp 3

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 11

Experiment no : 3

Name Sarthak Sandip Bhosale

UID 2023201002

Exp no. 3

Aim Building Simulink/ MATLAB Model of DSB-FC


Amplitude Modulator and Demodulator

Software Matlab Online

Problem Statement:
1) Generate AM using the Simulink/MATLAB based on the mathematical expression of DSBFC
AM considering single sine wave input & Observe waveform and spectrum. Calculate
Modulation index for 2 cases. Label all waveforms and spectrum and save results.
2) Generate multitone AM using the Simulink/MATLAB based on the mathematical expression
of DSB-FC AM considering two sine wave inputs & Observe waveform and spectrum. Label
all waveforms and spectrum and save results.

Theory :
Amplitude Modulation (AM) is a modulation technique in which the amplitude of a high-
frequency carrier wave is varied in proportion to a low-frequency message or information
signal. AM is widely used in electronic communication for transmitting audio and data
signals over a radio frequency (RF) carrier wave. During amplitude modulation, only the
amplitude of the carrier wave changes, while its frequency and phase remain constant.
Mathematical Representation:
The amplitude-modulated (AM) signal can be represented as:

Where:
 s(t) = AM modulated signal
 Ac = Amplitude of the carrier signal
 fc = Frequency of the carrier signal
 Am= Amplitude of the message/modulating signal
 fm = Frequency of the message/modulating signal
 t = Time variable
 μ = Modulation index (ratio of ( Am / Ac ))

Modulation Index (μ):


The modulation index determines the extent of variation in the carrier amplitude and is
defined as:

The value of μ has the following impact on the AM signal:

 If μ = 1: 100% modulation occurs, which means the carrier wave is fully


modulated.
 If μ > 1: Over-modulation occurs, leading to distortion.
 If μ < 1: Under-modulation occurs, leading to a lower depth of modulation.

Spectrum of AM:
The frequency spectrum of a Double Sideband Full Carrier (DSB-FC) AM signal consists
of three main components:

1. Carrier Frequency (fc): The central frequency of the AM signal.


2. Upper Sideband (USB): Located at ( fc + fm ).
3. Lower Sideband (LSB): Located at ( fc - fm ).

The USB and LSB carry the same information and are symmetrically located around the
carrier frequency. Thus, the bandwidth of an AM signal is given by:

Key Points:
 AM signals are simple to implement and demodulate, making them suitable for
broadcast radio transmission.
 The carrier component does not carry any information but is necessary for
demodulation at the receiver.
 Due to the presence of both sidebands and the carrier, the bandwidth
requirement is twice the frequency of the message signal.

This summarizes the theory of amplitude modulation along with its key parameters and
spectral components.

Part A :
clear;
close all;
% Parameters for the signals
Ac = 20; % Carrier amplitude
Am = 2; % Message signal amplitude
fc = 9924; % Carrier frequency in Hz
fm = 2142; % Message signal frequency in Hz
fs = 10000; % Sampling frequency in Hz
t = 0:1/fs:0.2; % Time vector for 0.2 seconds UID

% Modulation indices (modulation depths)


modulation_index1 = 0.2; % First modulation index
modulation_index2 = 1.0; % Second modulation index
% Message signal (modulating signal) - common for both cases
message_signal = cos(2 * pi * fm * t);
% Carrier signal - common for both cases
carrier_signal = Ac * cos(2 * pi * fc * t);
% Amplitude Modulated signal (AM signal) for two cases
modulated_signal_1 = (1 + modulation_index1 *
message_signal) .*carrier_signal;modulated_signal_2 = (1 +
modulation_index2 * message_signal) .*carrier_signal;

% Compute FFT of the modulated signals


n = length(t); % Number of samples
f = (-n/2:n/2-1)*(fs/n); % Frequency vector
% FFT for modulated signal with modulation index 0.2
modulated_signal_1_fft = fftshift(fft(modulated_signal_1)/n);
% FFT for modulated signal with modulation index 1.0
modulated_signal_2_fft = fftshift(fft(modulated_signal_2)/n);

% Plotting each signal and its spectrum in separate figures


% Plot Message Signal (common)
figure;
plot(t, message_signal);
title('Single-tone Message Signal');
xlabel('Time (s)');
ylabel('Amplitude');
grid on;

% Plot Carrier Signal (common)


figure;
plot(t, carrier_signal);
title('Carrier Signal');
xlabel('Time (s)');
ylabel('Amplitude');
grid on;

% Plot Modulated Signal with modulation index 0.2


figure;
plot(t, modulated_signal_1);
title('Amplitude Modulated Signal (Index = 0.2)');
xlabel('Time (s)');
ylabel('Amplitude');
grid on;

% Plot Frequency Spectrum of Modulated Signal with modulation index 0.2


figure;
plot(f, abs(modulated_signal_1_fft));
title('Frequency Spectrum (Index = 0.2)');
xlabel('Frequency (Hz)');
ylabel('Magnitude');
xlim([-500 500]);
grid on;

% Plot Modulated Signal with modulation index 1.0


figure;
plot(t, modulated_signal_2);
title('Amplitude Modulated Signal (Index = 1.0)');
xlabel('Time (s)');
ylabel('Amplitude');
grid on;

% Plot Frequency Spectrum of Modulated Signal with modulation index 1.0


figure;
plot(f, abs(modulated_signal_2_fft));
title('Frequency Spectrum (Index = 1.0)');
xlabel('Frequency (Hz)');
ylabel('Magnitude');
xlim([-500 500]);
grid on;

Part-B :

% Parameters for the signals


Ac = 1; % Carrier amplitude
m1 = 0.2; % Modulation index for first tone
m2 = 0.5; % Modulation index for second tone
fc = 200; % Carrier frequency in Hz
Em1 = 4; %First message signal amplitude
Em2 = 7; %Second message signal amplitude
fm1 = 20; % First message signal frequency in Hz
fm2 = 40; % Second message signal frequency in Hz
fs = 10000; % Sampling frequency in Hz
t = 0:1/fs:0.2; % Time vector for 0.2 seconds
% Message signals (modulating signals)
message_signal_1 = Em1*cos(4 * pi * fm1 * t); % First sine wave input
message_signal_2 = Em2*cos(3 * pi * fm2 * t); % Second sine wave input
% Combined message signal
combined_message_signal = m1 * message_signal_1 + m2 * message_signal_2;
% Carrier signal
carrier_signal = Ac * cos(2 * pi * fc * t);
% Multitone AM signal using DSB-FC
modulated_signal = (1 + combined_message_signal) .* carrier_signal;
% Compute FFT of the modulated signal
n = length(t); % Number of samples
f = (-n/2:n/2-1)*(fs/n); % Frequency vector
% FFT for the modulated signal
modulated_signal_fft = fftshift(fft(modulated_signal)/n);
% Plotting each signal and its spectrum in separate figures
% Plot First Message Signal
figure;
plot(t, message_signal_1);
title('Message Signal 1 (Tone 1)');
xlabel('Time (s)');
ylabel('Amplitude');
grid on;

% Plot Second Message Signal


figure;
plot(t, message_signal_2);
title('Message Signal 2 (Tone 2)');
xlabel('Time (s)');
ylabel('Amplitude');
grid on;
% Plot Combined Message Signal
figure;
plot(t, combined_message_signal);
title('Combined Message Signal (Multitone)');
xlabel('Time (s)');
ylabel('Amplitude');
grid on;

% Plot Carrier Signal


figure;
plot(t, carrier_signal);
title('Carrier Signal');
xlabel('Time (s)');
ylabel('Amplitude');
grid on;

% Plot Modulated Signal (Multitone AM)


figure;
plot(t, modulated_signal);
title('Multitone Amplitude Modulated Signal (DSB-FC)');
xlabel('Time (s)');
ylabel('Amplitude');
grid on;

% Plot Frequency Spectrum of Modulated Signal


figure;
plot(f, abs(modulated_signal_fft));
title('Frequency Spectrum of Multitone AM Signal');
xlabel('Frequency (Hz)');
ylabel('Magnitude');
xlim([-500 500]);
grid on;

Conclusion :
In this experiment, we successfully demonstrated the generation and analysis of Double
Sideband Full Carrier (DSBFC) amplitude modulation using MATLAB. We performed the
modulation using single-tone and multitone inputs and observed their impact on the waveform
and spectrum. Additionally, we calculated the modulation index and understood its role in
determining the depth of modulation. Through spectrum analysis, we confirmed the presence of
sidebands corresponding to the modulating signals, validating the theoretical concepts of AM.

You might also like