Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

UNIPOLAR SCHEME

INTRODUCTION

UNIPOLAR SCHEME
In this scheme, all signal levels are on one side of the time axis either above or below.

Non Return to Zero (NRZ) - It is an example of unipolar line coding scheme in which
positive voltage defines bit 1 and the zero voltage defines bit 0. The signal level does not
return to zero during a symbol transmission (at the middle of the bit).

Scheme is prone to baseline wandering and DC components. It has no synchronization or any


error detection. It is simple but costly in power consumption.

Dept. of CSE, S.I.T., Tumakuru-3 Page 1


UNIPOLAR SCHEME

IMPLEMENTATION

%Line code UNIPOLAR NRZ.


h=[0 1 0 1 0 1];
%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-1)-2*(t==n);
y=(t<n)-0*(t==n);
else
%y=(t>n-1)+(t==n-1);
y=(t<n)+1*(t==n);
end
%y=(t>n-1)+(t==n-1);
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('one');
end
n=n+1;
%pause;
end

Dept. of CSE, S.I.T., Tumakuru-3 Page 2


UNIPOLAR SCHEME

OUTPUT

Dept. of CSE, S.I.T., Tumakuru-3 Page 3

You might also like