Vous êtes sur la page 1sur 13

1

Department of Information Science & Engineering


R.V. College of Engineering, Bengaluru -560059.
(An Autonomous Institution Affiliated to VTU, Belgaum)

Computer Communication and Networks


Course Code: 16CS55

An Assignment Report on

“Differential Manchester and Multilevel 8B6T Line Coding


Schemes”

Submitted By

Abdul Muqtadeer Ahmed 1RV16CS003


Avi Agarwal 1RV16CS195
Section ‘A’
2

Line Coding
In telecommunication, a line code is a pattern of voltage, current, or photons used to represent
digital data transmitted down a transmission line. This repertoire of signals is usually called a
constrained code in data storage systems. Some signals are more prone to error than others
when conveyed over a communication channel as the physics of the communication or storage
medium constrains the repertoire of signals that can be used reliably.

Need for Line Coding


Line coding is done for achieving many goals such as Introducing spectral nulls at dc frequency
when the channel is ac coupled, to attain self-clocking and in-service error monitoring features,
to modify the signal spectrum, thereby reducing the cross talk into foreign systems and radio-
frequency interferences, y/ to preserve bandwidth, and to reduce the complexity in equalization,
detection, echo cancellation & timing recovery circuits e.t.c.

Required characteristics of line code:


Some key characteristics in the line code are its power spectrum, probability of error & a
trade-off between symbol rate and no, of transmitting levels. Symbol rate relates directly to the
required channel bandwidth, while no of levels relates directly to the noise immunity. An
encoding scheme is chosen basing on the following characteristics of line code:

Dc-component: Eliminating the dc-component in the signal enables the channel to be


ac-coupled. Magnetic recording systems are systems using transformer coupling for electrical
isolation and less interference, have less sensitivity to low frequency signal components. Thus
the information could be lost.

Bandwidth: Since larger bandwidths result in larger noise contributions, it should be as low as
possible. However a large bandwidth may be needed to have timing information available in the
bit stream, i.e. a trade-off must be made between timing and noise bandwidth in selecting a line
code.

Self synchronization: With out synchronization, unless the timing clocks in a system are highly
stable, a long string of 'n' bits could be misinterpreted as either 'n-1' or 'n+1' bits. However the
use of highly stable clocks increases system cost and requires a long system startup time to
achieve synchronization.

Error detection: Though this is the responsibility of a layer of logic above the signaling level,
having some error detection capability built into the physical signaling scheme permits the errors
to be detected more quickly.
3

Differential encoding: In many cases if the leads from a device are accidentally inverted and
connected all the ones and zeros may be inverted; for this differential encoding is the best
solution. Because, it allows the polarity of a signal to be inverted with out affecting the data
detection. Another benefit of this scheme is that it may be more reliable to detect a polarity
change than to compare a value to a threshold in the presence of noise.

Transparency: In some protocols certain words are reserved for control sequences. A data
protocol is not transparent if-some of the words in a random data file being transferred resemble
these control sequences and might be intercepted by the receiver to perform defined actions
instead of passing the word to the destination.

The data protocol and line code have to be designed so that every possible sequence of data is
faithfully and transparently received.

Line Coding Schemes

Differential Manchester
Differential Manchester encoding Scheme is a line code in which data and clock signals
are combined to form a single 2-level self-synchronizing data stream. It is a differential
encoding, using the presence or absence of transitions to indicate logical value. It is not necessary
to know the polarity of the sent signal since the information is not kept in the actual values of the
voltage but in their change: in other words it does not matter whether a logical 1 or 0 is
received, but only whether the polarity is the same or different from the previous value;
this makes synchronization easier.
Differential Manchester encoding is not to be confused with biphase mark code (BMC) or FM1,
biphase space coding, and biphase level coding since these four lines codes are each unique.[1]
Differential Manchester encoding has the following advantages over some other line codes:
● A transition is guaranteed at least once every bit, allowing the receiving device to
perform clock recovery.
● Detecting transitions is often less error-prone than comparing against a threshold in a
noisy environment.
● Unlike with Manchester encoding, only the presence of a transition is important, not
the polarity. Differential coding schemes will work exactly the same if the signal is
4

inverted (wires swapped). Other line codes with this property include NRZI, bipolar
encoding, coded mark inversion, and MLT-3 encoding.
● If the high and low signal levels have the same voltage with opposite polarity, coded
signals have zero average DC voltage, thus reducing the necessary transmitting power
and minimizing the amount of electromagnetic noise produced by the transmission
line.
These positive features are achieved at the expense of doubling clock frequency - the symbol rate
is twice the bitrate of the original signal. Each bit period is divided into two half-periods: clock
and data. The clock half-period always begins with a transition from low to high or from high to
low. The data half-period makes a transition for one value and no transition for the other value.
One version of the code makes a transition for 0 and no transition for 1 in the data half-period;
the other makes a transition for 1 and no transition for 0. Thus, if a "1" is represented by
one transition, then a "0" is represented by two transitions and vice versa, making
Differential Manchester a form of frequency shift keying. Either code can be interpreted
with the clock half-period either before or after the data half-period.
Differential Manchester is specified in the IEEE 802.5 standard for token ring LANs, and is used
for many other applications, including magnetic and optical storage.
For Differential Manchester Coding Scheme:
SAVG = N
Where SAVG is the signal rate and N is the bit rate.
5

Multilevel Schemes
In these schemes we increase the number of data bits per symbol thereby increasing the bit rate.
Since we are dealing with binary data we only have 2 types of data element a 1 or a 0. We can
combine the 2 data elements into a pattern of “m” elements to create “2 m” symbols. If we have L
signal levels, we can use “n” signal elements to create Ln signal elements.
Code characteristics
Now we have 2m symbols and Ln signals. If 2 m > Ln then we cannot represent the data elements,
we don’t have enough signals. If 2 m = Ln then we have an exact mapping of one symbol on one
signal. If 2m < Ln then we have more signals than symbols and we can choose the signals that
are more distinct to represent the symbols and therefore have better noise immunity and error
detection as some signals are not valid.
Representing Multilevel Codes We use the notation mBnL, where m is the length of the binary
pattern, B represents binary data, n represents the length of the signal pattern and L the number of
levels. L = B binary, L = T for 3 ternary, L = Q for 4 quaternary.

Multilevel 8B6T Scheme


Stands for 8 Binary 6 Ternary. Encodes 8 bits as a pattern of 6 signal elements, where the signal
has three (ternary). Each signal pattern has a weight of 0 or +1 DC values. To make the whole
stream Dc-balanced, the sender keeps track of the weight. If two groups of weight 1
are encountered one after another, the first one is sent as is, while the next one is totally inverted
to give a weight of -1.
6
7

Source Code

Differential Manchester
data=[ 0 1 0 1 0 0 0 1 1 0 1 1 0 0 0 1 ];

i=1:length(data);
j=1.49:length(data)+0.49;
I=1.50:length(data)+0.50;
J=1.99:length(data)+0.99;
8

N=length(data);
time=[];
for k=1:length(data);
time=[time i(k),j(k),I(k),J(k)]; %Time vector

end
signal=[];
a=1;
prebit=1;
%Signal Generation
for t=1:length(data);
if(data(t)==0 && prebit==1)
signal(a:a+1)=-1;
signal(a+2:a+3)=1;
prebit=1;
elseif(data(t)==0 && prebit==-1)
signal(a:a+1)=1;
signal(a+2:a+3)=-1;
prebit=-1;
elseif(data(t)==1 && prebit==-1)
signal(a:a+1)=-1;
signal(a+2:a+3)=1;
prebit=1;
elseif(data(t)==1 && prebit==1)
signal(a:a+1)=1;
signal(a+2:a+3)=-1;
prebit=-1;
9

end
a=a+4;
end
plot(time,signal,'linewidth',1); %Plot signal
title('Differential Manchester');
xlabel('Time');
ylabel('Differential Manchester');

%constellation diagram
M = 4;
x = [0:M-1];
scatterplot(modulate(modem.pskmod(M),x));

Multilevel 8B6T
data=[ 0 1 0 1 0 0 0 1 1 0 1 1 0 0 0 1 ];

i=1:12;
J=1.99:24+0.99;
N=24;
time=[];
for k=1:12;
time=[time i(k),J(k)]; %Time vector

end signal=[];
signal(1:2)=-1;
signal(3:4)=1;
10

signal(5:6)=-1;
signal(7:8)=0;
signal(9:10)=1;
signal(11:12)=1;
signal(13:14)=0;
signal(15:16)=1;
signal(17:18)=0;
signal(19:20)=-1;
signal(21:22)=0;
signal(23:24)=0;

plot(time,signal,'linewidth',1); %Plot signal


title('8B6T');
xlabel('Time');
ylabel('8B6T');
11

Graphs

Differential Manchester
12

Multilevel 8B6T

Observations and results

● For differential Manchester, S (baud rate) = N (bit rate) whereas for multilevel 8B6T
S=3N/8
● For differntial Manchester r=½ whereas for multilevel 8B6T r=4/3
● The bandwidth for both schemes is proportional to the bit rates. For differential
Manchester, Bandwidth can be given by Bandwidth = 2 bit rate/(2*log22) whereas for
multilevel 8b6t it is given by Bandwidth = 2 bit rate/(2*log23)

Appendix
● plot(X,Y,LineSpec) sets the line style, marker symbol, and color.
● plot(X,Y) creates a 2-D line plot of the data in Y versus the corresponding values in X.
13

References
[1] G. Kennedy, Electronic Communication Systems. New York: Mc-Graw-Hill, 1985.
[2] K. K. Tse, H. Chung, S. Y. R. Hui, and H. C. So, “A comparative investigation on the use of
random modulation schemes for dc/dc converters,” IEEE Trans. Ind. Electron., vol. 47,
pp.
245–252, Apr. 2000.
[3] Cariolaro,G.L.,Pierobon,G.L and Pupolin,S.G. “Spectra of Blocked Coded Digital Signals”
IEEE Transactions on Information Theory, Vol IT-28,No.3, May 1982
[4] Cariolaro,G.L., and Tronca,G.P. “Spectral Analysis of variable length coded digital signals”
IEEE Transactions on communications, Vol COM-22, no.10,October 1974

Vous aimerez peut-être aussi