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

Matlab file

The document discusses the operation of Amplitude Modulation (AM), Frequency Modulation (FM), Phase Modulation (PM), Double Sideband Suppressed Carrier (DSB-SC), and Single Sideband (SSB) modulation techniques. It includes theoretical explanations, mathematical expressions, modulation and demodulation processes, advantages and disadvantages of each method, and provides MATLAB scripts for simulating these techniques. The document emphasizes the efficiency and power-saving aspects of DSB-SC and SSB compared to standard AM.

Uploaded by

tecefe5899
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Matlab file

The document discusses the operation of Amplitude Modulation (AM), Frequency Modulation (FM), Phase Modulation (PM), Double Sideband Suppressed Carrier (DSB-SC), and Single Sideband (SSB) modulation techniques. It includes theoretical explanations, mathematical expressions, modulation and demodulation processes, advantages and disadvantages of each method, and provides MATLAB scripts for simulating these techniques. The document emphasizes the efficiency and power-saving aspects of DSB-SC and SSB compared to standard AM.

Uploaded by

tecefe5899
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 16

Aim:

To study the operation of Amplitude Modulation and Demodulation

Theory:
Amplitude Modulation is a method used to transmit information (like voice or music) using a high-
frequency wave called a carrier wave. In AM, the amplitude (or height) of the carrier wave is changed
according to the message signal (also called modulating signal), while the frequency and phase of the
carrier wave remain the same.

Key Points:

 Message signal : The original information (like voice or data).


 Carrier signal : A high-frequency wave that carries the message.
 Modulated signal. : The result of combining the message with the carrier.
The formula for AM is:
s(t) = [A + m(t)] × cos(2πfₐt)
Where:
 A is the carrier amplitude
 m(t) is the message signal
 fₐ is the carrier frequency
 s(t) is the AM signal

Modulation Index (μ):


This shows how much the carrier wave is being changed.
 μ = Am / A c
,where Am is message amplitude and Ac is carrier amplitude
 If μ > 1, it is overmodulated (can cause distortion)
 If μ = 1, it is perfectly modulated
 If μ < 1, it is under-modulated

Demodulation:
Demodulation is the process of recovering the original message signal from the AM wave.
There are two common methods:
1. Envelope Detection
 This is used when modulation index μ ≤ 1.
 It works by tracing the "envelope" (outer shape) of the AM wave.
 A diode and capacitor circuit can do this in hardware.
 In MATLAB, we can simulate this using the abs() function.

2. Coherent Detection
 Requires a locally generated carrier signal that is exactly in sync with the original carrier.
 It multiplies the AM signal with the same carrier, then applies a low-pass filter.
Block Diagram:

(i) Configuration (ii) Output waveform


Carrier Signal

(i) Configuration (ii) Output waveform


Message Signal
Script:
% TIME SETTINGS
fs = 10000; % Sampling frequency
t = 0:1/fs:0.01; % Time vector

% MESSAGE SIGNAL AND CARRIER SIGNAL


fm = 100;
Am = 1;
m = Am * cos(2*pi*fm*t);

fc = 1000;
Ac = 2;
c = Ac * cos(2*pi*fc*t);

% AM SIGNAL
AM = (1 + (m / Ac)) .* c;

% DEMODULATION
demodulated = abs(AM);
demodulated_filtered = lowpass(demodulated, fm*2, fs);

% PLOT RESULTS
figure;

subplot(3,1,1);
plot(t, AM);
title('AM Signal');
xlabel('Time (s)');
ylabel('Amplitude');

subplot(3,1,3);
plot(t, demodulated_filtered);
title('Demodulated Signal (After Low-pass Filter)');
xlabel('Time (s)');
ylabel('Amplitude');

Output Amplitude Modulated and Demodulated Waveform:


Aim:
To study the operation of Amplitude Modulation and Demodulation and observing Frequency Spectrum.

Theory:
What is FM?
 In Frequency Modulation, the frequency of a high-frequency carrier wave is changed based on the
amplitude of the message signal.
 The amplitude of the carrier remains constant.

How it works?
 If the message signal is positive, the carrier frequency increases.
 If the message signal is negative, the carrier frequency decreases.
 This makes the wave vary in frequency depending on the message, while its height (amplitude)
stays the same.

Formula for FM signal:


s(t)=Ac⋅cos[2πfct + 2πkf ∫m(t).dt]
Where:
 Ac : Carrier amplitude
 fc : Carrier frequency
 m(t) : Message signal
 kf : Frequency sensitivity
 ∫m(t)dt : Integral of the message signal (affects frequency change)

What is FM Demodulation?
FM demodulation is the process of getting the original message signal back from the FM wave.

Common Methods:
1. Frequency Discriminator (Slope Detection)
 Converts frequency changes into amplitude changes.
 Then uses an envelope detector to recover the message.
2. Phase-Locked Loop (PLL) – Most common
 A PLL tracks the frequency of the FM signal.
 It produces an output that follows the frequency changes.
 Then, it converts these changes back into the original signal.

Advantages
 Better noise immunity than AM
 Constant amplitude → less power variation
 Used in FM radio, telemetry, radar, and audio broadcasting

Disadvantages
 Requires more bandwidth than AM
 More complex circuits for modulation and demodulation
Block Diagram:

(i) Configuration (ii) Output waveform


Message Signal
Output Frequency Modulated Waveform:
Script:
% PARAMETERS
fs = 8000;
t = 0:1/fs:0.02;
fm = 100;
fc = 400;
Am = 1;
Ac = 1;
freq_dev = 100;

% MESSAGE SIGNAL
m = Am * cos(2 * pi * fm * t);

% CARRIER SIGNAL
c = Ac * cos(2 * pi * fc * t);

% FM MODULATION USING fmmod


s = fmmod(m, fc, fs, freq_dev);

% FM DEMODULATION USING fmdemod


demod_signal = fmdemod(s, fc, fs, freq_dev);

% TIME DOMAIN PLOTS


figure;

subplot(3,1,1);
plot(t, m, 'b', 'LineWidth', 1.5);
title('Message Signal');
xlabel('Time (s)'); ylabel('Amplitude');
grid on; axis tight;

subplot(3,1,2);
plot(t, s, 'r', 'LineWidth', 1.5);
title('FM Modulated Signal');
xlabel('Time (s)'); ylabel('Amplitude');
grid on; axis tight;

subplot(3,1,3);
plot(t, demod_signal, 'g', 'LineWidth', 1.5);
title('FM Demodulated Signal');
xlabel('Time (s)'); ylabel('Amplitude');
grid on; axis tight;

% FREQUENCY DOMAIN ANALYSIS


N = length(t); % Number of samples
f = (0:N-1) * (fs/N); % Frequency axis

M_f = abs(fft(m, N)); % FFT of message signal


S_f = abs(fft(s, N)); % FFT of FM modulated signal
C_f = abs(fft(c, N)); % FFT of carrier signal

% FREQUENCY SPECTRUM OF MODULATED SIGNAL


figure;
plot(f, S_f, 'r', 'LineWidth', 1.5);
xlabel('Frequency (Hz)');
ylabel('Magnitude');
title('Spectrum of FM Modulated Signal');
grid on;
xlim([0 1000]);

% FREQUENCY SPECTRUM OF CARRIER SIGNAL


figure;
plot(f, C_f, 'g', 'LineWidth', 1.5);
xlabel('Frequency (Hz)');
ylabel('Magnitude');
title('Spectrum of Carrier Signal');
grid on;
xlim([0 1000]);

Frequency Modulation and Demodulation

Frequency Modulation Frequency Spectrum


Aim:
To study the operation of Amplitude Modulation and Demodulation and observing Frequency Spectrum.

Theory:
What is PM?
Phase Modulation (PM) is a type of angle modulation where the phase of the carrier signal is varied
proportionally to the amplitude of the message signal, while the frequency and amplitude of the carrier
remain constant.

Mathematical Expression
Let:
 m(t). : message signal (e.g., sine wave)
 Ac : amplitude of the carrier
 fc : carrier frequency
 kp : phase sensitivity constant (radians/volt)

Then, the PM signal is:


s(t)=Accos[2πfct + kpm(t)]

Key Concepts
Term Meaning
Carrier signal High-frequency sinusoid that carries the message
Phase deviation Δϕ = kp⋅m(t) (how much the phase shifts)
Modulation index β= kp ⋅Am (proportional to peak message amplitude)
Instantaneous phase Total angle = carrier phase + modulating signal's effect
Bandwidth Similar to FM, estimated using Carson’s Rule: BW≈2(β+fm)

PM Demodulation
PM demodulation is more complex and typically done by:
 First converting phase variations to frequency variations
 Then applying FM demodulation techniques

Advantages of PM
 Better noise performance than AM
 More efficient use of power
 Often used in digital communications (e.g., PSK)

Disadvantages
 Demodulation is more complex
 Less popular for analog audio than FM

Block Diagram:
(i) Configuration (ii) Output waveform
Message Signal
Output Frequency Modulated Waveform:

Script:
fs = 5000;
fc = 500;
t = (0:1/fs:0.2)';

% MESSAGE SIGNAL
x = sin(2*pi*30*t) + 2*sin(2*pi*60*t);

% PHASE MODULATION
fDev = 1; % Increased frequency deviation
y = pmmod(x, fc, fs, fDev);
z = pmdemod(y, fc, fs, fDev);

% PLOT SIGNALS
plot(t, x, 'r', 'LineWidth', 1.5); % Original signal in red
hold on;
plot(t, y, 'b', 'LineWidth', 1.5); % Modulated signal in blue
hold off;

xlabel('Time (s)');
ylabel('Amplitude');
legend('Original Signal', 'Modulated Signal');
grid on;
title('Original vs. Phase Modulated Signal');

% PLOT DEMODULATED SIGNAL


subplot(3,1,3);
plot(t, z, 'g', 'LineWidth', 1.5);
xlabel('Time (s)');
ylabel('Amplitude');
title('Demodulated Signal');
legend('Demodulated Signal');
grid on;
Aim:
To study the operation of Double Sideband Suppressed Carrier Amplitude Modulation

Theory:
What is DSB-SC?
DSB-SC is a type of amplitude modulation where the modulated signal contains only the upper and lower
sidebands, while the carrier is not transmitted. The information from the message signal is fully present in
these sidebands.

Why DSB-SC is Needed:


1. Power Saving
In standard AM, the carrier takes up most of the transmission power, but it does not carry
any actual information. In DSB-SC, the carrier is suppressed, so less power is required to
transmit the same information.
2. Efficient Use of Transmitted Signal
Only the essential parts of the signal (sidebands) are transmitted. This makes the system
more efficient as all the transmitted power contributes to sending useful information.
3. Simple Modulation Technique
DSB-SC can be generated by simply multiplying the message signal with a carrier signal. This
is a basic and straightforward method called product modulation.

Characteristics of DSB-SC:
 The signal has two sidebands: one above and one below the carrier frequency.
 The carrier is not present in the transmitted signal.
 The modulated signal is symmetrical around the carrier frequency.
 Bandwidth is the same as standard AM, which is twice the highest frequency of the message signal.
 Transmission is more power-efficient than regular AM.

Mathematical Expression:
Let:
 m(t) : message signal
 c(t) = Accos(2πfct) : carrier signal carrier signal
 Ac : amplitude of the carrier
 fc : carrier frequency

The modulated signal is:


s(t)=m(t)⋅cos(2πfct)
If m(t)=Amcos(2πfmt), then:
s(t)=Amcos(2πfmt)⋅cos(2πfct)
Using the identity:
cosA⋅cosB=[cos(A−B)+cos(A+B)]/2
So,
s(t)=Am[cos(2π(fc−fm)t)+cos(2π(fc+fm)t)]/2

This shows the two sidebands with no carrier.


Script:
% DEFINE PARAMETERS
fc = 500;
fm = 50;
fs = 10000;
t = 0:1/fs:0.1;
Ac = 1;
m = cos(2*pi*fm*t); % Message signal
c = cos(2*pi*fc*t); % Carrier signal

% DSB-SC SIGNAL
s_DSB_SC = m .* c;

% DSB-FC SIGNAL
mu = 1; % Modulation index
s_DSB_FC = (Ac * (1 + mu * cos(2*pi*fm*t))) .* cos(2*pi*fc*t);

% COMPUTE FREQUENCY SPECTRUM


N = length(t);
f = linspace(-fs/2, fs/2, N); % Frequency axis
S_DSB_SC = abs(fftshift(fft(s_DSB_SC, N))) / N;
S_DSB_FC = abs(fftshift(fft(s_DSB_FC, N))) / N;

% PLOT SIGNALS
figure;
subplot(4,1,1);
plot(t,m, 'b');
title('Message Signal');
xlabel('Time'); ylabel('Amplitude');

subplot(4,1,2);
plot(t,s_DSB_SC , 'r');
title('DSB-SC Modulated Signal');
xlabel('Time'); ylabel('Amplitude');

% PLOT FREQUENCY SPECTRA


figure;
subplot(2,1,1);
plot(f, S_DSB_SC, 'r', 'LineWidth', 1.5);
xlabel('Frequency (Hz)'); ylabel('Magnitude');
title('Frequency Spectrum of DSB-SC');
ylim([0 0.5])
grid on;

subplot(2,1,2);
plot(f, S_DSB_FC, 'b', 'LineWidth', 1.5);
xlabel('Frequency (Hz)'); ylabel('Magnitude');
title('Frequency Spectrum of DSB-FC');
grid on;
Output:
Aim:
To study the operation of Single Sideband Suppressed Carrier Amplitude Modulation

Theory:
What is SSB?
Single Sideband (SSB) is a type of amplitude modulation where only one of the two sidebands (either the
upper or lower) is transmitted, and both the carrier and the other sideband are suppressed.
In regular AM or DSB-SC, two sidebands are transmitted, but they carry the same information. So SSB
removes the redundancy by keeping only one.

Why SSB is Needed:


1. Bandwidth Reduction
Since only one sideband is transmitted, the bandwidth required is half that of AM or DSB-SC. This
saves space in the frequency spectrum and allows more signals to be transmitted in the same
range.
2. Power Efficiency
SSB eliminates both the carrier and the redundant sideband. As a result, less power is needed, and
no energy is wasted on components that do not carry additional information.
3. Efficient Communication
SSB is especially useful in systems where bandwidth is limited and power efficiency is critical. The
signal still carries the complete message with just one sideband.

Characteristics of SSB:
 Only one sideband (upper or lower) is transmitted.
 Carrier and other sideband are fully removed.
 Bandwidth required is the same as the message signal's highest frequency.
 SSB is more complex to generate and recover but highly efficient.

Mathematical Expression
Let:
 m(t). : message signal (baseband)
 fc : carrier frequency
The DSB-SC signal is:
sDSB-SC(t) = m(t)⋅cos(2πfct)
But this contains both upper and lower sidebands.To get SSB, we need to remove one sideband using
filtering or mathematical transformation.
The SSB modulated signal can be written as:
sSSB(t)=m(t)⋅cos(2πfct) ± m’(t)⋅sin(2πfct))
Where:
 m’(t) is the Hilbert Transform of m(t)
 + sign gives upper sideband (USB)
 − sign gives lower sideband (LSB)
Script:
% PARAMETERS
fs = 10000;
t = 0:1/fs:0.1;
fm = 100;
fc = 1000;
m = cos(2*pi*fm*t); % message signal
m_shifted = sin(2*pi*fm*t); % 90-degree phase-shifted message
signal
c1 = cos(2*pi*fc*t); % In-phase carrier
c2 = sin(2*pi*fc*t); % Quadrature carrier (90-degree
shifted)

% UPPER SIDEBAND AND LOWER SIDEBAND SSB MODULATION


ssb_usb = m .* c1 - m_shifted .* c2;
ssb_lsb = m .* c1 + m_shifted .* c2;

% COMPUTE FREQUENCY SPECTRUM


N = length(t);
f = linspace(-fs/2, fs/2, N);
M_f = abs(fftshift(fft(m, N)));
USB_f = abs(fftshift(fft(ssb_usb, N)));
LSB_f = abs(fftshift(fft(ssb_lsb, N)));

% PLOT TIME DOMAIN SIGNALS


figure;
subplot(3,2,1);
plot(t, m);
title('Message Signal');
xlabel('Time (s)'); ylabel('Amplitude');

subplot(3,2,3);
plot(t, ssb_usb);
title('SSB Upper Sideband (USB)');
xlabel('Time (s)'); ylabel('Amplitude');

subplot(3,2,5);
plot(t, ssb_lsb);
title('SSB Lower Sideband (LSB)');
xlabel('Time (s)'); ylabel('Amplitude');

% PLOT FREQUENCY SPECTRUM


subplot(3,2,2);
plot(f, M_f);
title('Spectrum of Message Signal');
xlabel('Frequency (Hz)'); ylabel('Magnitude');

subplot(3,2,4);
plot(f, USB_f);
title('Spectrum of SSB Upper Sideband (USB)');
xlabel('Frequency (Hz)'); ylabel('Magnitude');

subplot(3,2,6);
plot(f, LSB_f);
title('Spectrum of SSB Lower Sideband (LSB)');
xlabel('Frequency (Hz)'); ylabel('Magnitude');

You might also like