0% found this document useful (0 votes)
9 views6 pages

Chapter4 Passband Modulation

The document outlines a series of problems related to evaluating the error performance of different passband modulation techniques: BASK, BPSK, and BFSK. Each problem involves creating MATLAB scripts to simulate the modulation, add noise, recover the signal, and calculate the bit error probability both through simulation and theoretical calculations. The final problem consolidates the results from the previous problems to plot a comparison graph of the error performance for the three modulation techniques.

Uploaded by

dohoangthuynam1
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)
9 views6 pages

Chapter4 Passband Modulation

The document outlines a series of problems related to evaluating the error performance of different passband modulation techniques: BASK, BPSK, and BFSK. Each problem involves creating MATLAB scripts to simulate the modulation, add noise, recover the signal, and calculate the bit error probability both through simulation and theoretical calculations. The final problem consolidates the results from the previous problems to plot a comparison graph of the error performance for the three modulation techniques.

Uploaded by

dohoangthuynam1
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/ 6

Chapter 4: Assignment

Problem 1: Creating BASK.m, and completing the following code to evaluate


the error performance of the passband modulation BASK.

clc; clear; close all;

N0 = 10^-2;
EbN0_dB = 0:2:8; EbN0 = 10.^(EbN0_dB /10);
Eb = ????;
EBASK = ????; % The energy of BASK

Ntry = 4*10^3; % The number of transmitted bits


P_error_simul = zeros(1,length(EbN0_dB));
P_error_theo = zeros(1,length(EbN0_dB));

for j = 1:length(EbN0_dB)

ts = 1/1000; % The sample time


Tb = 1; % The time of 1 bit
Tc = 1/10; % The cycle of the carrier signal
fc = 1/Tc; % The frequency of the carrier signal
V = ????; % The amplitude of the carrier signal

t_1bit = 0 : ts : Tb-ts; % The time of 1 bit


s1 = ????; % s1(t)
s2 = ????; % s2(t)
L = length(t_1bit);

% ================= The passband modulation BASK


Bit = ????; % The transmitted bits
s = [];
t = [];
for i = 1:Ntry
if Bit(i) == 0
s = [s ????];
else
s = [s ????];
end
t_ibit = t_1bit + ????; % Time of i-bit
t = [t t_ibit];
end

% ================= The AWGN channel


B = 1/ts; % Bandwidth of signals
Power_noise = ????; % The power of noise
w = ????;

% ================= The received signal

1 | Page
r = ????;

% ================= Signal recovery


phi1 = ????;
h = ????;
Th = ????; % The threshold for decision

Bit_rec = zeros(1,Ntry);
for i = 1:Ntry
Frame = ????; % Construct 1 Frame with L samples
y = ????; % The signals pass through the matched filter
r2_mu = ????;
% --------- Comparator for decision
if ????
Bit_rec(i) = ????;
else
Bit_rec(i) = ????;
end
end
Bit_rec;

% ================== The bit error probability


% ------------- Simulation
[Num, rate] = biterr(Bit, Bit_rec);
P_error_simul(j) = rate;

% ------------- Theory
P_error_theo(j) = ????;

end

P_error_simul
P_error_theo
Problem 2: Creating BPSK.m, and completing the following code to evaluate
the error performance of the passband modulation BPSK.

clc; clear; close all;

N0 = 10^-2;
EbN0_dB = 0:2:8; EbN0 = 10.^(EbN0_dB /10);
Eb = ????;
EBPSK = ????; % The energy of BPSK

Ntry = 10^4; % The number of transmitted bits


P_error_simul = zeros(1,length(EbN0_dB));
P_error_theo = zeros(1,length(EbN0_dB));

for j = 1:length(EbN0_dB)

ts = 1/1000; % The sample time


2 | Page
Tc = 1/10; % The cycle of the carrier signal
fc = 1/Tc; % The frequency of the carrier signal
Tb = 1; % The time of 1 bit
V = ????; % The amplitude of the carrier signal

t_1bit = 0 : ts : Tb-ts;
s1 = ????; % s1(t)
s2 = ????; % s2(t)
L = length(t_1bit);

% ================= The passband modulation BPSK


Bit = ????;
s = [];
t = [];
for i = 1:Ntry
if Bit(i) == 0
s = [s ????];
else
s = [s ????];
end
t_ibit = t_1bit + ????; % Time of i-bit
t = [t t_ibit];
end

% ================= The AWGN channel


B = 1/ts; % Bandwidth of signals
Power_noise = ????; % The power of noise
w = ????;

% ================= The received signal


r = ????;

% ================= Signal recovery


phi1 = ????;
h = ????;
Th = ????;

Bit_rec = zeros(1,Ntry);
for i = 1:Ntry
Frame = ????; % Construct 1 Frame with L samples
y = ????; % The signals pass through the matched filter
r2_mu = ????;
% --------- Comparator for decision
if ????
Bit_rec(i) = ????;
else
Bit_rec(i) = ????;
end
end
Bit_rec;

3 | Page
% ================== The bit error probability
% ------------- Simulation
[Num, rate] = biterr(Bit, Bit_rec);
P_error_simul(j) = rate;

% ------------- Theory
P_error_theo(j) = ????;

end

P_error_simul
P_error_theo
Problem 3: Creating BFSK.m, and completing the following code to evaluate
the error performance of the passband modulation BFSK.

clc; clear; close all;

N0 = 10^-2;
EbN0_dB = 0:2:8; EbN0 = 10.^(EbN0_dB /10);
Eb = ????;
EBFSK = ????; % The energy of BASK

Ntry = 4*10^3; % The number of transmitted bits


P_error_simul = zeros(1,length(EbN0_dB));
P_error_theo = zeros(1,length(EbN0_dB));

for j = 1:length(EbN0_dB)

ts = 1/1000; % The sample time


Tb = 1; % The time of 1 bit
V = ????; % The amplitude of the carrier signal
fc1 = 8/????; % The frequency of the first carrier signal
fc2 = 9/????; % The frequency of the second carrier signal

t_1bit = 0 : ts : Tb-ts;
s1 = ????; % s1(t)
s2 = ????; % s2(t)
L = length(t_1bit);

% ================= The passband modulation BFSK


Bit = ????;
s = [];
t = [];
for i = 1:Ntry
if Bit(i) == 0
s = [s ????];
else
s = [s ????];
end
t_ibit = t_1bit + ????; % Time of i-bit
4 | Page
t = [t t_ibit];
end

% ================= The AWGN channel


B = 1/ts; % Bandwidth of signals
Power_noise = ????; % The power of noise
w = ????;

% ================= The received signal


r = ????;

% ================= Signal recovery


phi1 = ????;
h = ????;
Th = ????;

Bit_rec = zeros(1,Ntry);
for i = 1:Ntry
Frame = ????; % Construct 1 Frame with L samples
y = ????; % The signals pass through the matched filter
r2_mu = ????;
% --------- Comparator for decision
if ????
Bit_rec(i) = ????;
else
Bit_rec(i) = ????;
end
end
Bit_rec;

% ================== The bit error probability


% ------------- Simulation
[Num, rate] = biterr(Bit, Bit_rec);
P_error_simul(j) = rate;

% ------------- Theory
P_error_theo(j) = ????;

end

P_error_simul
P_error_theo

5 | Page
Problem 4: Collecting the results in Problems 1, 2, and 3 to plot the graph for
the error performance comparison of BASK, BPSK, and BFSK. Creating Results.m
and completing the following code.

clc; clear; close all;

EbN0_dB = 0:2:8;

P_error_simul_BASK = ????;
P_error_theo_BASK = ????;

P_error_simul_BPSK = ????;
P_error_theo_BPSK = ????;

P_error_simul_BFSK = ????;
P_error_theo_BFSK = ????;

figure(1)
semilogy(EbN0_dB, P_error_theo_BASK, 'r-', 'linewidth', 1.8);
hold on;
semilogy(EbN0_dB, P_error_theo_BPSK, 'g--', 'linewidth', 1.8);
semilogy(EbN0_dB, P_error_theo_BFSK, 'b:', 'linewidth', 2);
semilogy(EbN0_dB, P_error_simul_BASK, 'ko');
semilogy(EbN0_dB, P_error_simul_BPSK, 'ko');
semilogy(EbN0_dB, P_error_simul_BFSK, 'ko');
xlabel('Eb/N0 (dB)'); ylabel('The error probability');
legend('Theory BASK', 'Theory BPSK', 'Theory BFSK', 'Simulation')

6 | Page

You might also like