Documente Academic
Documente Profesional
Documente Cultură
Bladi Roberto Gómez Mena Rocio Ximanea Linares Suarez Jorge Eduardo Buzzio Garcia
20101106C 20114059I 20101173B
bladigomezm@gmail.com rlinaressuarez@gmail.com jbuzzio410@gmail.com
Utilizamos lo siguiente:
Una computadora
Software MATLAB
Acceso a Internet
Cámara fotográfica.
Guía de Laboratorio
B. Procedimiento
- Función UNRZ(h)
- Función URZ(h)
- Función PNRZ(h)
- Función AMIRZ(h)
- Función MANCHESTER(h)
UNIPOLAR RZ:
Para el símbolo “1” tendrá dos valores: en el primer semi-
intervalo [0, Tb/2] tendrá un nivel +V y para el segundo semi-
intervalo [Tb/2, Tb] retornará a 0V.
UNIPOLAR NRZ:
UNIPOLAR RZ:
UNIPOLAR RZ:
POLAR NRZ:
C. Sobre la función de auto correlación
UNIPOLAR NRZ:
AMI RZ: set(d,'LineWidth',2.5);
hold on;
axis([0 length(h)-1 -1.5 1.5]);
disp('one');
end
n=n+1;
%pause;
end
MANCHESTER:
V. FUNCIONES EN MATLAB
FUNCIÓN UNRZ(h)
function UNRZ(h)
clf;
n=1;
l=length(h);
h(l+1)=1;
while n<=length(h)-1;
t=n-1:0.001:n;
if h(n) == 0
if h(n+1)==0
y=(t>n);
else
y=(t==n);
end
d=plot(t,y);grid on;
title('Line code UNIPOLAR NRZ');
set(d,'LineWidth',2.5);
hold on;
axis([0 length(h)-1 -1.5 1.5]);
disp('zero');
else
if h(n+1)==0
y=(t<n)-0*(t==n);
FUNCIÓN URZ(h)
else
y=(t<n)+1*(t==n); La función siguiente simula esta codificación:
end
d=plot(t,y);grid on; function URZ(h)
title('Código de línea UNIPOLAR NRZ'); %Example:
%h=[1 0 0 1 1 0 1 0 1 0]; Como ejemplo ejecutamos los siguiente valores:
%URZ(h)
clf;
n=1;
l=length(h);
h(l+1)=1;
while n<=length(h)-1;
t=n-1:0.001:n;
%Graficación de los CEROS (0)
if h(n) == 0
if h(n+1)==0
y=(t>n);
else
y=(t==n);
end
d=plot(t,y);grid on
title('Código de línea UNIPOLAR RZ');
set(d,'LineWidth',2.5);
hold on;
axis([0 length(h)-1 -1.5 1.5]);
disp('zero');
%Graficación de los UNOS (1)
else
if h(n+1)==0
y=(t<n-0.5);
else
y=(t<n-0.5)+1*(t==n);
end
d=plot(t,y);grid on;
title('Line code UNIPOLAR RZ');
set(d,'LineWidth',2.5);
hold on;
axis([0 length(h)-1 -1.5 1.5]);
disp('one');
end
n=n+1;
%pause;
end
end
FUNCIÓN PNRZ(h)
function PNRZ(h)
%Example:
%h=[1 0 0 1 1 0 1 0 1 0];
%PNRZ(h)
clf;
n=1;
l=length(h);
h(l+1)=1;
while n<=length(h)-1;
t=n-1:0.001:n;
if h(n) == 0
if h(n+1)==0
y=-(t<n)-(t==n);
else
y=-(t<n)+(t==n);
end %Example:
d=plot(t,y);grid on; %h=[1 0 0 1 1 0 1 0 1 0];
title('Código de línea POLAR NRZ'); %AMIRZ(h)
set(d,'LineWidth',2.5);
hold on; clf;
axis([0 length(h)-1 -1.5 1.5]); n=1;
disp('zero'); l=length(h);
else h(l+1)=1;
if h(n+1)==0 ami=-1;
y=(t<n)-1*(t==n); while n<=length(h)-1;
else t=n-1:0.001:n;
y=(t<n)+1*(t==n); if h(n) == 0
end if h(n+1)==0
d=plot(t,y);grid on; y=(t>n);
title('Código de línea POLAR NRZ'); else
set(d,'LineWidth',2.5); if ami==1
hold on; y=-(t==n);
axis([0 length(h)-1 -1.5 1.5]); else
disp('one'); y=(t==n);
end end
n=n+1; end
%pause; d=plot(t,y);grid on;
end title('Código de línea AMI RZ');
Como ejemplo ejecutamos los siguientes valores: set(d,'LineWidth',2.5);
hold on;
axis([0 length(h)-1 -1.5 1.5]);
disp('zero');
else
ami=ami*-1;
if h(n+1)==0
if ami==1
y=(t<n-0.5);
else
y=-(t<n-0.5);
end
else
if ami==1
y=(t<n-0.5)-(t==n);
else
y=-(t<n-0.5)+(t==n);
end
end
d=plot(t,y);grid on;
title('Código de línea AMI RZ');
set(d,'LineWidth',2.5);
hold on;
axis([0 length(h)-1 -1.5 1.5]);
disp('one');
end
n=n+1;
%pause;
FUNCIÓN AMIRZ(h) end
La función siguiente simula esta codificación:
function AMIRZ(h)
Como ejemplo ejecutamos los siguiente valores: d=plot(t,y);grid on;
title('Código de línea MANCHESTER');
set(d,'LineWidth',2.5);
hold on;
axis([0 length(h)-1 -1.5 1.5]);
disp('zero');
end
n=n+1;
%pause;
end
FUNCIÓN MANCHESTER(h)
function MANCHESTER(h)
%Example:
%h=[1 0 0 1 1 0 1 0 1 0];
%MANCHESTER(h)
clf;
n=1;
h=~h;
l=length(h);
h(l+1)=1;
while n<=length(h)-1;
t=n-1:0.001:n;
if h(n) == 0
if h(n+1)==0
y=-(t<n)+2*(t<n-0.5)+1*(t==n);
else
y=-(t<n)+2*(t<n-0.5)-1*(t==n);
end
d=plot(t,y);grid on; VI. CONCLUSIONES
title('Código de línea MANCHESTER');
• El matlab es una herramienta grafica muy útil en
set(d,'LineWidth',2.5);
este caso para poder entender el comportamiento
hold on;
de los distintos códigos de línea.
axis([0 length(h)-1 -1.5 1.5]);
disp('one'); • Los códigos de línea son muy útiles al transmitir
else la información debido a que buscan siempre
if h(n+1)==0 minimizar la cantidad de errores que pueden
y=(t<n)-2*(t<n-0.5)+1*(t==n); presentarse en una comunicación.
else
y=(t<n)-2*(t<n-0.5)-1*(t==n); • Siempre se busca tratar de transmitir la mayor
end cantidad de información con el menor número de
bits posibles, y los códigos de línea buscan ese
propósito.
VII. BIBLIOGRAFÍA
1. http://es.wikipedia.org/wiki/C%C3%B3digos_en_
l%C3%ADnea
2. Guía de Laboratorio de telecomunicaciones II.
Ing. Virginia Romero. Ciclo 2014-I.
3. Material de clase de Telecomunicaciones I. Ing.
César Narvaja. Ciclo 2013-II.