You are on page 1of 13

Département de Physique

Digital Communication Systems


Master: Télécommunication

Réalisé par:

➢ El Houssein Ben Messaoud

Encadre par:
➢ Prof. Otman El Mrabet
I. Power spectral Density (PSD) of NRZ Unipolar
II. Power spectral Density (PSD) of NRZ Bipolar
III. Simulation de Power spectral Density (PSD) of NRZ
Bipolar sur MATLAB

1. Code matlab :

clear all
close all

x = [0 1 1 1 0 0 1 0];
m = length(x);
fs = 100;
dt = 1/fs;
T = 1;
t = 0:dt:m*T-dt;
n = length(t);
analog_signal = zeros(1,n);

fin = -5;

for i = 1:m
if x(i) == 1
if fin == 5
analog_signal((i-1)*fs*T+1:i*T*fs) = -5;
fin = -5;
else
analog_signal((i-1)*fs*T+1:i*T*fs) = 5;
fin = 5;
end
end
end

figure
plot(t, analog_signal,'r')
title('Bipolar NRZ Analog Signal')
xlabel('Time (s)')
ylabel('Amplitude')
grid on;
2. Courbe:

IV. Simulation de Power spectral Density (PSD) of NRZ


Unipolar sur MATLAB

1. Code MATLAB
clear all;
close all;
clc;
%%le signal quantifié
x=[0 1 1 1 0 0 1 0];
m=length(x);
Tb=1;
%%le signal analogique équivalent ( linecode Unipolar
NRZ)
dt=Tb/100;
t=0:dt:m*Tb;
n=length(t);
F=zeros(1,n);
for i = 1:m-1
for j = (i-1)*100+1:i*100
if x(i)==1;
F(j)=5;
else
F(j)=0;
end
end
end
plot(t,F,"r")
axis([0 8 0 5.5])
title('Unipolar NRZ Analog Signal')
xlabel('Time (s)')
ylabel('Amplitude')
grid on;

2. Courbe

You might also like