Chapter4 Passband Modulation
Chapter4 Passband Modulation
N0 = 10^-2;
EbN0_dB = 0:2:8; EbN0 = 10.^(EbN0_dB /10);
Eb = ????;
EBASK = ????; % The energy of BASK
for j = 1:length(EbN0_dB)
1 | Page
r = ????;
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;
% ------------- 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.
N0 = 10^-2;
EbN0_dB = 0:2:8; EbN0 = 10.^(EbN0_dB /10);
Eb = ????;
EBPSK = ????; % The energy of BPSK
for j = 1:length(EbN0_dB)
t_1bit = 0 : ts : Tb-ts;
s1 = ????; % s1(t)
s2 = ????; % s2(t)
L = length(t_1bit);
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.
N0 = 10^-2;
EbN0_dB = 0:2:8; EbN0 = 10.^(EbN0_dB /10);
Eb = ????;
EBFSK = ????; % The energy of BASK
for j = 1:length(EbN0_dB)
t_1bit = 0 : ts : Tb-ts;
s1 = ????; % s1(t)
s2 = ????; % s2(t)
L = length(t_1bit);
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;
% ------------- 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.
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