0% found this document useful (0 votes)
33 views20 pages

PBL Digital

The document discusses Manchester line coding which is a line coding technique that encodes clock and data information for synchronous transmission. It ensures self-clocking and has no DC component, allowing for galvanic isolation. While it facilitates synchronization, it reduces the effective data rate to half compared to non-coded signals.

Uploaded by

Deepesh Rajpoot
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views20 pages

PBL Digital

The document discusses Manchester line coding which is a line coding technique that encodes clock and data information for synchronous transmission. It ensures self-clocking and has no DC component, allowing for galvanic isolation. While it facilitates synchronization, it reduces the effective data rate to half compared to non-coded signals.

Uploaded by

Deepesh Rajpoot
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

PROJECT BASED LEARNING

DIGITAL COMMUNICATION
(KEC-601)
A Project on

Manchester Line Coding


using
MATLAB Simulink

Under the guidance of

Prof. D.K. Srivastava

Submitted by
RATNESH SIMOLIA (2200430319004)
In partial fulfillment of the
requirements for the award of the
degree of

BACHELOR OF TECHNOLOGY

DEPARTMENT OF ELECTRONICS AND COMMUNICATION


ENGINEERING

BUNDELKHAND INSTITUTE OF ENGINEERING AND


TECHNOLOGY, JHANSI, INDIA 2023-2024
DEPARTMENT
OF
ELECTRONICS & COMMUNICATION ENGINEERING
BUNDELKHAND
INSTITUTE OF ENGINEERING & TECHNOLOGY,
JHANSI

CERTIFICATE
This is to certify that the project entitled “Manchester Line Coding using MATLAB
Simulink”, submitted by Ratnesh Simolia, in partial fulfillment for the award of Bachelor of
Technology in “Electronics & Communication Engineering” during session 2023-2024 at
Bundelkhand Institute of Engineering & Technology, Jhansi. An authentic record of research work
carried out by him under my supervision and guidance. The student has fulfilled all the
recommended requirements.
The project is based on candidate’s own work, has not submitted elsewhere for a degree/diploma.
In our opinion, this project is of standard required for the award of a bachelor of technology degree
in Electronics & Communication Engineering.

Prof. D.K. Srivastava

Department of
Electronics & Communication Engineering,
Bundelkhand Institute of Engineering & Technology,
Jhansi
1
DECLARATION

I declare that this project report titled Manchester Line Coding using MATLAB Simulink submitted
in partial fulfillment of the degree of B. Tech in Electronics & Communication Engineering is a record
of original work carried out by me under the supervision of Prof. D.K. Srivastava, and has not formed
the basis for the award of any other degree or diploma, in this or any other Institution or University. In
keeping with the ethical practice in reporting scientific information, due acknowledgements have been
made wherever the findings of others have been cited.

 Ratnesh Simolia

3
2
ACKNOWLEDGEMENT

On submission of the project entitled “Manchester Line Coding using MATLAB Simulink”, as a
project based learning in Digital Communication, I would like to extend my appreciation & sincere
thanks to my project supervisor, a very generous guide in fact, Prof. D.K. Srivastava, Department of
Electronics & Communication Engineering for his ceaseless encouragement and support during the
course of my work. We verily appreciate and value his prestigious guidance and motivation from the
beginning to the end of this work. His knowledge and support at the time of crisis will be remembered
lifelong. He has been great source of inspiration to my and I thank him from the bottom of our hearts.

I would also like to thank the staff of Electronics & Communication engineering department
for constant support and providing place to work during project period. Last but not the least I would
also like thank our friends who were with me during thick and thin.

Ratnesh Simolia
B. Tech (Electronics & Communication Engineering)

4
3
ABSTRACT

Manchester encoding is a synchronous clock encoding technique used by the physical layer of the Open
System Interconnection [OSI] to encode the clock and data of a synchronous bit stream. The idea of RZ
and the idea of-L are combined in Manchester, Different encoding techniques are used in data
communication to ensure data security and transmission speed.

Manchester encoding is an example of digital encoding. Because each data bit length is defined by default,
it differs from other digital encoding schemes. The bit state is defined by the direction of the transition.
Bit status is represented in various ways by different systems, although most systems use 1 bit for low to
high transitions and 0 bit for high to low transitions.

In Manchester, duration of a bit is divided into two halves. The voltage remains the same at one level
during the first half & moves to the other level. The transition at the middle of the bit provides
synchronization. Differential Manchester, on the other hand, combines the idea of RZ and NRZ-I. There
is always a transition at the middle of the bit, but the bit values are determined at the beginning of the bit.
if next bit is zero there is transition if next bit is 1 there is none.

5
CONTENTS
Page No.

1. Acknowlegment……………………………………………………………...4

2. Abstract………………………………………………………………………5

3. Introduction…………………………………………………………………..7

4. Manchester line codes………………………………………………………..8-9

5. Generation of Manchester Line Codes………………………..…...…………10-19

 Project Initialization
 Schematic Design
 Simulation and Results
 Code Generation
 Output of the Code
 Representation
 Advantages and Disadvantages
 Characteristics of Manchester Encoding

6. Conclusion…………………………………………………………………...20

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

Transmission and Storage

After line coding, the signal is put through a physical communication channel, either a transmission
medium or data storage medium. The most common physical channels are:

 the line-coded signal can directly be put on a transmission line, in the form of variations of the voltage
or current (often using differential signalling).
 the line-coded signal (the baseband signal) undergoes further pulse shaping (to reduce its frequency
bandwidth) and then is modulated (to shift its frequency) to create an RF signal that can be sent through
free space.
 the line-coded signal can be used to turn on and off a light source in free-space optical communication,
most commonly used in an infrared remote control.
 the line-coded signal can be printed on paper to create a bar code.
 the line-coded signal can be converted to magnetized spots on a hard drive or tape drive.
 the line-coded signal can be converted to pits on an optical disc.

Each line code has advantages and disadvantages. Line codes are chosen to meet one or more of the
following criteria:

 Minimize transmission hardware


 Facilitate synchronization
 Ease error detection and correction
 Achieve a target spectral density
 Eliminate a DC component 7
MANCHESTER LINE CODES

In telecommunication and data storage, Manchester code (also known as phase encoding, or PE) is
a line code in which the encoding of each data bit is either low then high, or high then low, for equal
time. It is a self-clocking signal with no DC component. Consequently, electrical connections using a
Manchester code are easily galvanically isolated.

Manchester code derives its name from its development at the University of Manchester, where the
coding was used for storing data on the magnetic drums of the Manchester Mark 1 computer.

Manchester code was widely used for magnetic recording on 1600 bpi computer tapes before the
introduction of 6250 bpi tapes which used the more efficient group-coded recording. Manchester code
was used in early Ethernet physical layer standards and is still used in consumer
IR protocols, RFID and near-field communication.

Features

Manchester coding is a special case of binary phase-shift keying (BPSK), where the data controls
the phase of a square wave carrier whose frequency is the data rate. Manchester code ensures frequent
line voltage transitions, directly proportional to the clock rate; this helps clock recovery.

The DC component of the encoded signal is not dependent on the data and therefore carries no
information. Therefore connections may be inductively or capacitively coupled, allowing the signal to
be conveyed conveniently by galvanically isolated media (e.g., Ethernet) using a network isolator—a
simple one-to-one pulse transformer which cannot convey a DC component.

Limitations

Manchester coding's data rate is only half that of a non-coded signal, which limits its usefulness to
systems where bandwidth is not an issue, such as a local area network (LAN).

Manchester encoding introduces difficult frequency-related problems that make it unsuitable for use at
higher data rates.

There are more complex codes, such as 8B/10B encoding, that use less bandwidth to achieve the same
data rate but may be less tolerant of frequency errors and jitter in the transmitter and receiver reference
clocks.

8
Flow Chart

Figure 1: Flowchart for the Manches-ter code-generation script

9
Generation of Manchester Line Codes:

1) Project Initialization:

● Launch the MATLAB Simulink Software and create a new project with an
appropriate name and settings based on you are using.

2) Schematic Design:

MATLAB Simulink Design

Figure 2: Circuit Diagram

10
3) Simulation and Results:

Figure 3: Signal for generation of 1s

11
Figure 4: Signal for generation of 0s

12
Figure 5: Output of both 1s and 0s

13
Figure 6: Final Manchester Line Code

14
4) Generation of Manchester Line using MATLAB Code

Code:

clc;
clear all;
close all;
b=input('Enter bit sequence: ');
l=length(b);
b(l+1)=0;
n=1;
while n<=l
t=(n-1):.001:n;
if b(n)==1
if b(n+1)==0
y=(t<(n-0.5))+(-1)*(t>=n-0.5&t<=n);
else
y=(t<(n-0.5)|t==n)+(-1)*(t>=n-0.5&t<n);
end
else
if b(n+1)==1
y=(-1)*(t<(n-0.5))+(t>=n-0.5&t<=n);
else
y=(-1)*(t<(n-0.5)|t==n)+(t>=n-0.5&t<n);
end
end
plot(t,y)
hold on;
axis([0 l -1.5 1.5]);
n=n+1;
end
title('Manchester');
xlabel('Time');
ylabel('Amplitude');
grid on;

15
5) OUTPUT of code:

Figure 7: Output of Code

6) Representation

There are two ways to represent a Manchester code:

1. A falling signal flank represents a logical 1 and ascending flank is a logical 0. This is the original
definition given by G.E. Thomas
2. A falling signal flank is a logical 0, the ascending one a logical 1. This is the definition used by the
original Ethernet standard.

To rule out ambiguities, Manchester codes use a preamble. A preamble is a fixed sequence that is known
beforehand.

16
Figure 8: Representation

7) Advantages and Disadvantages

One of the advantages of Manchester code is that the DC component of the signal carries no information.
This makes it possible that standards that usually do not carry power can transmit this information. One
of the drawbacks of the encoding is that it needs more bandwidth than other encodings, such as NRZ.

 Self-clocking: Manchester encoding is self-clocking, which means that the receiver can
synchronize its clock with the transmitter’s clock. This ensures that the data is transmitted and
received at the same rate, and there is no need for a separate clock signal.

 Reduced DC component: Manchester encoding eliminates the DC component in the transmitted


signal, which reduces the risk of errors due to interference from external sources.

 Error detection: Manchester encoding provides a mechanism for detecting errors in the
transmitted data. Any change in the voltage level within a time interval indicates a bit error,
which can be detected and corrected.

 Simplicity: Manchester encoding is a relatively simple encoding scheme that can be implemented
using simple digital circuits.

Disadvantages of Manchester Encoding:


 Lower data rate: Manchester encoding has a lower data rate than other encoding schemes, such
as non-return-to-zero (NRZ) encoding, which means that it takes more time to transmit the same
amount of data.

 Higher bandwidth requirement: Manchester encoding requires a higher bandwidth than other
encoding schemes, as each bit requires two voltage transitions within each time interval.

 Clock synchronization: Although Manchester encoding is self-clocking, it still requires the


receiver to synchronize its clock with the transmitter’s clock, which can be a challenge in some
situations.

17
 Reduced transmission distance: Manchester encoding has a reduced transmission distance
compared to other encoding schemes, as the signal loses strength over long distances due to the
need for frequent voltage transitions.

8) Characteristics of Manchester Encoding

 A logic 0 is indicated by a 0 to 1 transition at the center of the bit and logic 1 by 1 to 0 transition.
 The signal transitions do not always occur at the ‘bit boundary’ but there is always a transition at
the center of each bit.
 The Differential Physical Layer Transmission does not employ an inverting line driver to convert
the binary digits into an electrical signal. And therefore the signal on the wire is not opposite the
output by the encoder.
 The following are the properties of Manchester encoding:
 Each bit is sent at a predetermined rate.
 When a high to low transition happens, a ‘1’ is recorded; when a low to high transition occurs, a
‘0’ is recorded.
 At the mid-point of a period, the transition that is utilized to precisely note 1 or 0 happens.
 The Manchester Encoding is also called Biphase code as each bit is encoded by a positive 90
degrees phase transition or by negative 90 degrees phase transition.
 The Digital Phase Locked Loop (DPLL) extracts the clock signal and deallocates the value and
timing of each bit. The transmitted bitstream must contain a high density of bit transitions.
 The Manchester Encoding consumes twice the bandwidth of the original signal.
 The advantage of the Manchester code is that the DC component of the signal carries no
information. This makes it possible that standards that usually do not carry power can transmit
this information.
 It is a self-clocking protocol, meaning that the receiver can determine the clock frequency from
the incoming data.
 The Manchester encoding ensures a constant transition density, making it easier to detect the start
and end of a data frame.
 It provides a simple and reliable way to detect errors in the data transmission by checking for a
violation of the encoding rules.

18
 The encoding process adds a redundant bit to the data, enabling error correction in some
applications.
 Manchester encoding can also be used for multi-level signaling, where multiple voltage levels are
used to represent different data states.
 Only drawback is the signal rate. The signal rate is Manchester and differential is double that for
NRZ. The reason is that there is always one transition at the middle of the bit and maybe one
transition at the end of each bit.

19
Conclusion

Manchester encoding was developed in the late 1940s at the Victoria University of Manchester
in the United Kingdom and put into service in their Mark 1 computer for the first time. There it was
used for storing data on the computer’s magnetic drums. Since then, this coding method has become
very popular as the modulation technique for low-cost radio-frequency transmission of digital data. For
example, it is employed for the two NASA space probes Voyager 1 and Voyager 2, launched in 1977.
Here it is used for control signals consisting of 16-bit/s Manchester-encoded commands, which are
biphase modulated to a square-wave sub-carrier with a frequency of 512Hz. Both probes are now active
for 44 years and are currently flying in the interstellar medium.

Technically, the Manchester code is a self-clocking binary code, which encodes the clock signal and
the data of a synchronous bitstream in a single signal. In contrast to other techniques, Manchester
encoding uses transitions from a low to a high voltage level, or from a high to a low voltage level, to
represent the bit value, instead of using voltage levels. In other words, the state of a bit is determined
by the direction of the transition and not by the level.

20

You might also like