Line code

from Wikipedia, the free encyclopedia

In digital telecommunications , the line code or line code defines how the symbols used to transmit information are transmitted on the physical plane . Certain level sequences , such as light intensities on glass fibers or voltages or currents on electrical lines , are assigned to binary bit sequences in the data stream.

General

Use of source , channel and line coding to transmit a signal

The task of line coding (or line coding) is to spectrally shape the signal to be transmitted in order to adapt it as optimally as possible to the properties of a transmission medium. For example, the direct voltage component can be suppressed. In addition, clock recovery is possible. Some line codes reduce the line bandwidth required . This way, transmission links can be better utilized, because the transmission range is causally related to the operational attenuation. For a metallic cable, it is approximately the case that the attenuation constant is proportional to the square root of the frequency: higher frequencies are attenuated more strongly than lower frequencies. For this reason, the code should have the maximum power density at the lowest possible frequency and the spectral profile should have a narrow bandwidth .

The line coding is not to be confused with the channel coding or the source coding : The task of the channel coding is to be able to detect and correct transfer or storage errors during data transmission or data storage through additional redundancy, while the source coding provides redundant information Data source is reduced and is also known as data compression.

Some line codes are free of equal components; This means that their mean value over time is 0. This is important if, in a particular application, the electrical transmission of direct voltage via the channel is not possible. The need to be free of DC components can be specified , for example, by pulse transformers for galvanic isolation in the transmission path, which do not allow any DC voltage to pass.

Binary line codes

Binary line coding

In the simplest case in terms of circuitry, the logic states 0 and 1 are assigned a logic level on the physical line. This is also known as Non Return to Zero (NRZ). i.e., there is no state on the line which carries no information.

For example, with the serial EIA-232 interface (RS-232) from the 1960s, a negative voltage roughly corresponds to a logical one, a positive voltage to a logical zero; this is also known as antipodal coding. If all ones are now transmitted, nothing happens on the line. This means that only a few bits can be transmitted in a block with an asynchronous clock, which are identified with a start sequence, or an additional clock line is required for synchronization . EIA-232 prescribes a 0-bit (start bit) at the beginning of each sequence of 5 to 8 bits of user data (plus a possible parity bit ) and one to two 1-bits (stop bits) at the end. The stop bits can be extended as required; a constant 1 therefore means "no data transmission". This coding is not free of DC voltage (depending on the data content, 1-bits or 0-bits can clearly predominate), which makes long cables impossible. EIA-232 partially compensates for this disadvantage by using very high voltages (usually ± 12 V), which, however, has its own problems and has therefore not been implemented in newer standards.

Serial transmission (EIA-232)
  begin stop
Data bits: 1 1 0 1 0 0 0 1  
Line bits: . . . . 0 1 1 0 1 0 0 0 1 1 1 . . . .
Voltage level: - - - - + - - + - + + + - - - - - - -

Manchester encoding

Manchester coding

With Manchester coding, a zero-one sequence corresponds to a logical zero (rising edge), a one-zero sequence (falling edge) corresponds to a logical one:

This ensures that

1. There are always level changes for clock recovery,
2. The average constant component is always zero.

The required symbol rate on the transmission channel is doubled .

With the differential Manchester code, a polarity change at the beginning of the clock cycle stands for a logical zero (two edge changes per bit), with a logical one there is no polarity change at the clock start (one edge change per bit).

Clock recovery

The permanent level change makes clock recovery possible. A separate line for the clock is therefore not necessary. In the case of Manchester coding, a start sequence with a sequence of many one-zero data sequences (approx. 10–30) - 1010101010 ... on the line - which effectively corresponds to an 11111 sequence at the encoder input - is a phase locked loop (PLL) synchronized in the receiver. A one-zero sequence (1001 on the line) starts the actual data transmission. This is followed by a data packet with several thousand bits.

Clock recovery by PLL with Manchester encoding:

                  PLL wird synchr.   | PLL bleibt synchronisiert
                                          Start
Datenbits:                                     0 1 1 0 0 0 0 0 0 1 ...
Sync/Daten:       1 1 1 1 1 ...1 1 1 1 0  1 0  0 1 1 0 0 0 0 0 0 1 ...
Leitungsbits:     1010101010...1010101001 1001 01101001010101010110...
Pegel:            +-+-+-+-+-...+-+-+-+--+ +--+ -++-+--+-+-+-+-...

Coding with blocks of several bits long

With Manchester coding, the line code has twice as many bits as the data stream, it is unfavorable in terms of the required data rate , the bandwidth only depends on the edge of a bit, the steeper this edge, the more bandwidth is required. Binary transmissions are therefore not suitable for channels with limited bandwidth (e.g. air); a channel coder must be connected downstream. Other codings, such as 4 data bits to 5 code bits ( 4B5B ), are better here, and error detection is possible with several bits:

3. Reduction of the required line data rate
4. Error detection

Instead of two (+/-, binary), three (+ / = / -, ternary) or even more voltage levels can be used for electrical transmission.

Block code (4 bits at 3 ternary levels, 4B3T ):

 Datenbits:          0   1   1   0   0   0   1   0
 Datenblöcke:      |     0110      |     0010      |
 Ternärcode:       |      ==+      |      -=+      |
 Spannungspegel:      0    0    +     -    0    +

Block codes

So-called block codes are usually referred to as pBqX. "P" bits of a binary word are combined and coded into a block of length q in an X representation. The advantage of this approach is that this coding reduces the step speed by the factor "p", which also reduces the damping constant and enables a greater transmission range. However, as the number of steps increases, the signal also becomes more susceptible to interference.

  • 4B5B is a code that each 4 B its on 5 B depicts its, or 16 (2 4 ) block code to 32 (2 5 ) line codes. The code is not DC free. With Fast-Ethernet 100BASE-TX, the use of MLT-3 with three voltage levels and the use of a scrambler achieve freedom from direct current under favorable circumstances. With MLT-3, the required bandwidth of the transmission channel is reduced compared to simpler methods such as Manchester coding. A 4B5B coding plus subsequent MLT-3 coding without further measures can not achieve freedom from direct current. This can be checked by trying out the 32 possible 5-bit code words.
  • 4B3T accordingly forms depending 4 B its a 3 He group having three voltage steps from ( T ernäres signal ), and 16 (2 4 ) block codes 27 (3 3 ) line codes. Some block codes are mapped onto several line codes, so that the current direct current component can be reduced by selecting the “better” code. For this purpose, the sign of the component is added up during transmission; the total influences the choice of the line code. Features of 4B3T are clock recovery, low DC component and bandwidth reduction. This coding is s to 34 Mbit / (E3) and 140 Mbit / s (E4) Koaxialübertragungsstrecken and also for the UK0 interface of ISDN - based terminal used.
  • The Manchester code is called 1B2B ( 1 B it to 2 B its), namely, 2 (2 1 ) Block Codes to 4 (2 2 ) line codes, but is used by the four only two line codes, 01 and 10, since the other two no voltage changes included. The coding is simple, there is no direct current and it allows clock recovery. However, the required line bandwidth is greater than without code.
  • 2B1Q respectively forms 2 (2 2 ) B its on a voltage level of 4 (4 1 ) stages from ( Q uaternärer code). The code enables bandwidth reduction, but no clock recovery and no freedom from direct current.

Implementation on voltage or intensity level

Coding a line code such as 4B5B or 8B10B converts one binary sequence into another binary sequence. The coded bit sequence then has to be converted to intensities. The simple assignment of logical values ​​(0 and 1) to two levels is called NRZ ( English non return to zero ). With NRZ-I only two levels are used, the logical 1 is assigned to a level change , while a logical 0 keeps the level constant. For example, FDDI uses 4B5B first and then NRZ-I when transmitting over fiber optics . 4B5B is also used initially for the electrical transmission of Ethernet at 100 Mbit / s via twisted pair cable (100BASE-TX). The three-level code MLT-3 is added to this to reduce the DC voltage component (pseudo-ternary signal). The less common Ethernet over fiber optics (100BASE-FX) uses 4B5B / NRZ-I.

Known line codes (selection)

Multi-carrier process

Web links

Commons : line code  - collection of images, videos and audio files