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

Digital Modulation

The document outlines the implementation of three modulation techniques: Amplitude Shift Keying (ASK), Frequency Shift Keying (FSK), and Phase Shift Keying (PSK) using a binary data sequence. It includes parameters for sampling frequency, duration, and carrier frequencies, along with the generation of modulated signals for each technique. The document also features a plotting section to visualize the resulting modulated signals.

Uploaded by

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

Digital Modulation

The document outlines the implementation of three modulation techniques: Amplitude Shift Keying (ASK), Frequency Shift Keying (FSK), and Phase Shift Keying (PSK) using a binary data sequence. It includes parameters for sampling frequency, duration, and carrier frequencies, along with the generation of modulated signals for each technique. The document also features a plotting section to visualize the resulting modulated signals.

Uploaded by

wesen derbe
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

% Parameters

Fs = 1000; % Sampling frequency


T = 1; % Duration of the signal in seconds
t = 0:1/Fs:T; % Time vector
f0 = 2; % Frequency of the carrier signal
data = [1 0 1 1 0 0 1]; % Example binary data

% ASK Modulation
A1 = 1; % Amplitude for bit 1
A0 = 0; % Amplitude for bit 0
ask_signal = [];
for i = 1:length(data)
if data(i) == 1
ask_signal = [ask_signal A1 * sin(2 * pi * f0 * t(1:length(t)))];
else
ask_signal = [ask_signal A0 * sin(2 * pi * f0 * t(1:length(t)))];
end
end

% FSK Modulation
f1 = 5; % Frequency for bit 1
f0 = 2; % Frequency for bit 0
fsk_signal = [];
for i = 1:length(data)
if data(i) == 1
fsk_signal = [fsk_signal sin(2 * pi * f1 * t(1:length(t)))];
else
fsk_signal = [fsk_signal sin(2 * pi * f0 * t(1:length(t)))];
end
end

% PSK Modulation
psk_signal = [];
for i = 1:length(data)
if data(i) == 1
psk_signal = [psk_signal sin(2 * pi * f0 * t(1:length(t)))];
else
psk_signal = [psk_signal sin(2 * pi * f0 * t(1:length(t)) + pi)]; % Phase
shift by pi
end
end

% Plotting the signals


figure;

subplot(3,1,1);
plot(ask_signal);
title('ASK Modulation');
xlabel('Time');
ylabel('Amplitude');

subplot(3,1,2);
plot(fsk_signal);
title('FSK Modulation');
xlabel('Time');
ylabel('Amplitude');

subplot(3,1,3);
plot(psk_signal);
title('PSK Modulation');

You might also like