code
By: Anonymous9/27/202281 views Public Note
clc
clear all
close all
MSG=[1 0 1 0 1 0 1]
% PSD of UPNRZ
Rb_1 = 1;
Tb_1 = 1/Rb_1;
f_1 = 0:0.05*Rb_1:2*Rb_1;
x_1 = f_1 * Tb_1;
a_1 = 1;
b1_1 = power(Tb_1,2);
b2_1 = power(a_1,2);
P1 = Tb_1/4*(sinc(x_1).*sinc(x_1)) (dirac(b2_1/4));
figure(1);
plot(f_1, P1, 'LineWidth', 2);
set(gca, 'fontsize', 13, 'fontweight', 'bold');
xlabel('Frequency', 'fontsize', 13, 'fontweight', 'bold');
ylabel('Power Spectral Density', 'fontsize', 13, 'fontweight', 'bold');
title('PSD of Unipolar Non-Return to Zero Signal', 'fontsize', 14);
grid on;
hold on;
% PSD of URZ
Rb_1 = 1;
Tb_1 = 1/Rb_1;
f_1 = 0:0.05*Rb_1:2*Rb_1;
x_1 = f_1 * Tb_1;
a_1 = 1;
b1_1 = power(Tb_1,2);
b2_1 = power(a_1,2);
P1 = Tb_1/4*(sinc(pi*x_1).*sinc(pi*x_1))*(1 (dirac(b2_1/4))/Tb_1);
plot(f_1, P1, 'LineWidth', 2);
set(gca, 'fontsize', 13, 'fontweight', 'bold');
xlabel('Frequency', 'fontsize', 13, 'fontweight', 'bold');
ylabel('Power Spectral Density', 'fontsize', 13, 'fontweight', 'bold');
title('PSD of Unipolar Return to Zero Signal', 'fontsize', 14);
grid on;
hold on;
% PSD of PNRZ
Rb_1 = 1;
Tb_1 = 1/Rb_1;
f_1 = 0:0.05*Rb_1:2*Rb_1;
x_1 = f_1 * Tb_1;
a_1 = 1;
b1_1 = power(Tb_1,2);
b2_1 = power(a_1,2);
P1 = Tb_1*(sinc(pi*x_1).*sinc(pi*x_1))
plot(f_1, P1, 'LineWidth', 2);
set(gca, 'fontsize', 13, 'fontweight', 'bold');
xlabel('Frequency', 'fontsize', 13, 'fontweight', 'bold');
ylabel('Power Spectral Density', 'fontsize', 13, 'fontweight', 'bold');
title('PSD of Polar Return to Zero Signal', 'fontsize', 14);
grid on;
hold on;
% PSD of BPRZ
Rb_1 = 1;
Tb_1 = 1/Rb_1;
f_1 = 0:0.05*Rb_1:2*Rb_1;
x_1 = f_1 * Tb_1;
a_1 = 1;
b1_1 = power(Tb_1,2);
b2_1 = power(a_1,2);
P1 = Tb_1/4*(sinc(pi*x_1/2).*sinc(pi*x_1/2)).*(sin(pi*x_1).*sin(pi*x_1))
plot(f_1, P1, 'LineWidth', 2);
set(gca, 'fontsize', 13, 'fontweight', 'bold');
xlabel('Frequency', 'fontsize', 13, 'fontweight', 'bold');
ylabel('Power Spectral Density', 'fontsize', 13, 'fontweight', 'bold');
title('PSD of BiPolar to Zero Signal', 'fontsize', 14);
grid on;
hold on;
% PSD of Manchester
Rb_1 = 1;
Tb_1 = 1/Rb_1;
f_1 = 0:0.05*Rb_1:2*Rb_1;
x_1 = f_1 * Tb_1;
a_1 = 1;
b1_1 = power(Tb_1,2);
b2_1 = power(a_1,2);
P1 = Tb_1/4*(sinc(pi*x_1/2).*sinc(pi*x_1/2)).*(sin(pi*x_1/2).*sin(pi*x_1/2))
plot(f_1, P1, 'LineWidth', 2);
set(gca, 'fontsize', 13, 'fontweight', 'bold');
xlabel('Frequency', 'fontsize', 13, 'fontweight', 'bold');
ylabel('Power Spectral Density', 'fontsize', 13, 'fontweight', 'bold');
title('PSD of Manchester, UNRZ, URZ, PNRZ, BPNRZ Signal', 'fontsize', 14);
grid on;