Line Encoding Techniques

Junaid Mujawar
13 min readMay 19, 2021

--

What is Line Encoding?

Line encoding refers to the process of converting digital data into digital signals. Whenever we transmit data it is in the form of digital signals, so with the help of line coding, we can convert a sequence of bits (or encoding) into a digital signal which is then again converted into bits by the receiver (or can be said as decoded by the receiver). For all this to happen we need line coding schemes which could also be able to avoid overlapping and distortion of signals.

Some necessary characteristics of line Encoding schemes:

  1. Less complexity.
  2. Should have noise and interference tolerance.
  3. No DC component (or say low-frequency component) should be there because it can’t be transferred to larger distances.
  4. Least baseline wandering should be there (baseline wander: low-frequency noise having nonlinear and non-stationary nature).
  5. Should have error detection capability.
  6. Should be self-synchronized.

For more characteristics refer site:

Line Encoding Requirements?

  1. Small transmission bandwidth.
  2. Power efficiency: as small as possible for required data rate and error probability.
  3. Error detection/correction.
  4. Suitable power spectral density, e.g., little low frequency content.
  5. Timing information: clock must be extracted from data.

Line Encoding Schemes

This Blog describes types of Encoding Schemes:

  1. Unipolar Line Encoding.
  2. Polar Line Encoding.
  3. Bipolar Line Encoding.
  4. Manchester Encoding.
  5. Digital-to-Digital Line Encoding.
  6. Multilevel Line Encoding.
  7. Multiline Transmission (ML3) Line Encoding.
  8. 8b/10b Line Encoding.
  9. Block Line Encoding.

Unipolar Line Encoding

In Unipolar we are simply representing a signal in a graphical form where positive voltage represents logical or binary 1 and zero voltage represents logical zero. We can say that it’s the simplest line code. The drawback of this scheme is that it is not self-clocking which means that it can’t be decoded without a separate clock signal or any other synchronization source.

In the characteristics section that there should be no DC component present which it significantly contains, which can be halved by returning to zero in the middle of the bit period.

NRZ (Non-Return to Zero):

  1. The term Non-Return to Zero (NRZ) means that the signal (the red line in the above diagram) will not return to zero in the middle of the bit (i.e. either 0 or 1). Unipolar schemes were generally designed as NRZ schemes.
  2. But if we compare it to the polar NRZ scheme, this scheme leads to wastage of power i.e. the normalized power (i.e. the power required to send 1-bit per resistance) is almost double as compared to polar NRZ.
  3. Because of all these reasons unipolar encoding is not normally used in data communications today.

Advantages:

The advantages of Unipolar NRZ are −

  • It is simple.
  • A lesser bandwidth is required.

Disadvantages:

The disadvantages of Unipolar NRZ are −

  • No error correction done.
  • Presence of low frequency components may cause the signal droop.
  • No clock is present.
  • Loss of synchronization is likely to occur (especially for long strings of 1s and 0s).

Polar Line Encoding

As it’s name suggests polar which means it will have both positive and negative values for voltages or amplitude, it is quite like NRZ scheme but, here we have NRZ-L (i.e. NRZ-Level) and NRZ-I (i.e. NRZ-Invert).

Let’s see how these are represented:

In this diagram, we can simply notice that high volt is for logical 0 and low volt is for logical 1.

This is the representation of NRZ-Level.

Now in this one, the idea is that whenever we encounter logical 1 then the signal will be inverted, but when it encounters logical 0 then it remains on the same side.

This is the NRZ-Invert.

The Baseline wandering is a problem for both of them, but for NRZ-L it is twice as bad as compared to NRZ-I, because of the transition at the boundary for NRZ-I. similarly, the self-synchronization problem is similar in both for a long sequence of 0’s, but for a long sequence of 1’s, it is more severe in NRZ-L.

Advantages Of Polar NRZ:

The advantages of Polar NRZ are −

  • It is simple.
  • No low-frequency components are present.

Disadvantages Of Polar NRZ:

The disadvantages of Polar NRZ are −

  • No error correction.
  • No clock is present.
  • The signal droop is caused at the places where the signal is non-zero at 0 Hz.

Polar Return to Zero (RZ):

Return to zero proved out to be a nice alternative or say a solution to NRZ drawbacks. Unlike NRZ, RZ uses three values of voltage i.e. positive, negative, zero. And as the name suggests it returns to zero in the middle of each bit.

The idea behind the above representation is that logical 1 is represented as half-positive and half-zero volts and the logical 0 is represented as half negative and half-zero volts.

Advantages Of RZ:

The advantages of Polar RZ are −

  • It is simple.
  • No low-frequency components are present.

Disadvantages Of RZ:

The disadvantages of Polar RZ are −

  • No error correction.
  • No clock is present.
  • Occupies twice the bandwidth of Polar NRZ.
  • The signal droop is caused at places where the signal is non-zero at 0 Hz.

Now, this scheme also has some drawbacks which are as follows:

  • Requires a large bandwidth for transmission.
  • Complex encoding as it uses three levels of voltages
  • This scheme is not used nowadays and is replaced by Manchester encoding & Differential-Manchester encoding.

Manchester & Differential-Manchester Encoding:

We can say that Manchester encoding is a combination of RZ and NRZ-L. here, instead of using three values of voltages we use only two, here logical 1 is represented in two halves, the first half consists of a negative voltage and the second-half is represented as positive voltage, and logical 0 is also represented in two halves, the first half consists of a positive voltage and the second-half is represented as negative voltage. The transition in the middle of the bit provides synchronization.

The Differential-Manchester encoding can be said as the combination of RZ & NRZ-I. here, we use the same logic as we used in NRZ-I i.e. inversion will take place when we encounter logical 1 and if we encounter logical 0 then no inversion.

Manchester encoding had a huge impact since it was able the solution for several problems related to NRZ-L and on the other hand Differential Manchester overcome the problems associated with NRZ-I, since there is no baseline wandering and no low frequency component or DC component, because every logical bit was having positive and negative voltage contribution.

The area where Manchester encoding, and Differential Manchester encoding are limited is the bandwidth. The minimum bandwidth of Manchester encoding, and Differential Manchester encoding is twice as that of NRZ.

Bipolar Line Coding

Bipolar consists of three voltage levels which are positive, negative and zero. While representing, the voltage level for one bit of data is at zero, and the other bit inverts or alternates between positive and negative voltage.

ALTERNATE MARK INVERSION(AMI): the representation here follows a simple logic that is, for representing logical 0 we use

zero voltage, and while representing logical 1 we use alternating positive and negative voltages, which can be seen in the image .

PESUDOTERNARY: this is the opposite of AMI, as we kept logical 0 at 0 volts or neutral in the above section, here we will be keeping logical 1 as neutral (i.e. at 0 volts) and we will keep alternating logical zero, we can see that in the image .

Advantages:

Following are the advantages −

  • It is simple.
  • No low-frequency components are present.
  • Occupies lower bandwidth than unipolar and polar NRZ schemes.
  • This technique is suitable for transmission over AC coupled lines, as signal drooping doesn’t occur here.
  • A single error detection capability is present in this.

Disadvantages:

Following are the disadvantages −

  • No clock is present.
  • Long strings of data cause loss of synchronization.

Digital-to-Digital Line Encoding:

The binary signals created by your computer (DTE) are translated into a sequence of voltage pulses that can be sent through the transmission medium.

• Binary signals have two basic parameters: amplitude and duration.

  • As the number of bits sent per unit of time increases, the bit duration decreases.

Multilevel Schemes:

The desire to increase the data speed or decrease the required bandwidth has resulted in the creation of many schemes. The goal is to increase the number of bits per baud by encoding a pattern of m data elements into a pattern of n signal elements. We only have two types of data elements(Os and 1s), which means that a group of m data elements can produce a combination of 2m data patterns.

If 2m =Ln, then each data pattern is encoded into one signal pattern. If 2m<Ln, data patterns occupy only a subset of signal patterns. The subset can be carefully designed to prevent baseline wandering, to provide synchronization, and to detect errors that occurred during data transmission. Data encoding is not possible if 2m > Ln because some of the data patterns cannot be encoded.

Types of Multilevel Schemes:

a) 2BIQ:

The first mBnL scheme we discuss, two binary, one quaternary (2BIQ), uses data patterns of size 2 and encodes the 2-bit patterns as one signal element belonging to a four-level signal.

In this type of encoding m =2, n =1, and L =4 (quaternary). The following figure shows an example of a 2B1Q signal.

Advantages of 2B1Q line coding:

➨It helps to increase number of bits per baud as desired in data communication.

➨It can send more than one data with signal and hence saves bandwidth required. Required average BW equals N/4.

➨There is no redundant signal patterns in this technique.

➨It is used in Digital Subscriber Line (DSL) to provide high speed internet.

➨Typical codes balance voltage leads to lesser baseline wandering.

Disadvantages of 2B1Q line coding:

➨It is complex as receiver has to distinguish four different thresholds as 2B1Q uses four different levels of signal.

➨No self synchronization for long pattern of similar double bits.

➨Long sequences of zeros or “01” will have constant DC output. Hence spectrum creates very low frequencies which present problems in certain systems.

b) 8B6T:

A very interesting scheme is eight binary, six ternary (8B6T). The idea is to encode a pattern of 8 bits as a pattern of 6 signal elements, where the signal has three levels (ternary). In this type of scheme, we can have 28=256 different data patterns and data patterns and 36=729 different signal patterns.

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. The following figure shows an example of three data patterns encoded as three signal patterns.

Advantages of 8B6T line coding:

➨Due to redundant data it provides synchronization and error detection.

➨The redundancy is used to provide DC balance using inverted pattern at the transmit end as shown.

➨It increases speed or baud rate as it increases number of bits per baud.

Disadvantages of 8B6T line coding:

➨It uses redundant data bits with increases bandwidth.

➨Receiver has to distinguish three levels in order to decode the data bits.

➨Sender is complex as it has to keep record of weight and also need to possess intelligence to determine weight of groups. If two groups of weight “1” are encountered consecutively, the first group is sent as it is whereas the second group is totally inverted to provide weight of “-1”.

C) 4D-PAM5:

The last signaling scheme we discuss in this category is called four dimensional five-level pulse amplitude modulation (4D-PAM5). The 4D means that data is sent over four wires at the same time. It uses five voltage levels, such as -2, -1, 0, 1, and 2.

The technique is designed to send data over four channels (four wires). This means the signal rate can be reduced to N/8, a significant achievement. All 8 bits can be fed into a wire simultaneously and sent by using one signal element. The point here is that the four signal elements comprising one signal group are sent simultaneously in a four-dimensional setting.

signal group are sent simultaneously in a four-dimensional setting.

The following figure shows the imaginary one-dimensional and the actual four-dimensional implementation.

Advantages of 4D-PAM5 line coding:

➨As it sends data over four channels, the signal rate is reduced by N/8.

➨It can be used in Gigabit LANs to transmit data simultaneously over four wires.

➨Redundant data is used for error detection.

➨It offers self synchronization.

➨There is no DC components in the encoded signal.

Disadvantage of 4D-PAM5 line coding:

➨4D-PAM5 maps 28 data patterns to 44 signal patterns. Hence this coding technique uses a lot of redundancy in the signal patterns.

Multiline Transmission: MLT-3:

The NRZ-I and differential Manchester are classified as differential encoding but use two transition rules to encode binary data (no inversion, inversion). If we have a signal with more than two levels, we can design a differential encoding scheme with more than two transition rules. MLT-3 is one of them. The multiline transmission, three level (MLT-3) scheme uses three levels (+V, 0 and -V) and three transition rules to move between the levels.

1. If the next bit is 0, there is no transition.

2. If the next bit is 1 and the current level is not 0, the next level is 0.

3. If the next bit is 1 and the current level is 0, the next level is the opposite of the last non zero level.

The behavior ofMLT-3 can best be described by the state diagram shown in the following figure. The three voltage levels (-V, 0, and +V) are shown by three states (ovals). The transition from one state (level) to another is shown by the connecting lines. The following figure also shows two examples of an MLT-3 signal.

Advantages of MLT-3 encoding:

➨It has signal rate which is (1/4)th of the bit rate.

➨Due to its signal shape, it reduces required bandwidth.

Disadvantages of MLT-3 encoding:

➨It does not support self-synchronization for long string of zeros (‘0’).

➨It is more complex than NRZ-I due to use of three levels and complex transition rules.

8b/10b encoding:

In telecommunications, 8b/10b is a line code that maps 8-bit words to 10-bit symbols to achieve DC-balance and bounded disparity, and yet provide enough state changes to allow reasonable clock recovery. This means that the difference between the counts of ones and zeros in a string of at least 20 bits is no more than two, and that there are not more than five ones or zeros in a row. This helps to reduce the demand for the lower bandwidth limit of the channel necessary to transfer the signal.

Technologies that use 8b/10b

After the above-mentioned IBM patent expired, the scheme became even more popular and was chosen as a DC-free line code for several communication technologies.

Among the areas in which 8b/10b encoding finds application are the following:

Characteristics of 8b/10b line encoding:

-> Encodes 8-Bit Bytes to 10-Bit Symbols

-> Code groups includes 256 data characters and 12 control characters

-> Data character named as Dx.y :- 8-bit width

-> Control character named as Kx.y :- 8-bit width

-> This coding scheme breaks data in to two blocks

-> 3 MSB Bits

-> 5 LSB bits

-> 3 Bit encoded to 4 Bits

-> 5 Bit encoded to 6 Bits

-> 4-Bit and 6-Bit blocks combined and encoded into 10-Bit symbol

Following are the benefits or advantages of 8B/10B encoding:

➨It uses disparity controller to keep track of excess 0s over 1s (or 1s over 0s). This helps to prevent long run of consecutive 0s or 1s.

➨The redundant groups can be used for disparity checking and error detection.

➨It is better than 4B/5B coding due to its built-in error checking capability and better synchronization.

Following are the drawbacks or disadvantages of 8B/10B encoding:

➨The redundant data is the overhead for this coding technique. This increases bandwidth requirements.

Block Coding:

For a code to be capable of error detection, we need to add redundancy, i.e., extra bits to the data bits. Synchronization also requires redundancy — transitions are important in the signal flow and must occur frequently. Block coding is done in three steps: division, substitution and combination. It is distinguished from multilevel coding by use of the slash — xB/yB. The resulting bit stream prevents certain bit combinations that when used with line encoding would result in DC components or poor sync. quality.

Comparison study of Line Encoding Techniques:

Blog Created By:

SY CS B Group N0. 34

Vedant Kolhe

Jay Mahamuni

Junaid Mujawar

Swaroom Muley

Satyam Muluk

--

--

Junaid Mujawar
Junaid Mujawar

Written by Junaid Mujawar

A descriptive information about PLC and SCADA for an amazing way of learning applied electronics

Responses (7)