Wk3 - LineCoding - v2
Wk3 - LineCoding - v2
Line coding
Block coding
Scrambling
Line Coding
process of converting digital data to digital signal
Example of digital data: text, numbers, graphical images, audio, or
video, stored in computer memory as sequences of bits
Line coding converts a sequence of bits to a digital signal.
At the sender, digital data are encoded into a digital signal
At the receiver, the digital data are recreated by decoding the
digital signal
Signal elements vs. data elements
𝒅𝒅𝒅𝒅𝒅𝒅𝒅𝒅 𝒆𝒆𝒆𝒆𝒆𝒆𝒆𝒆𝒆𝒆𝒆𝒆𝒆𝒆
𝒓𝒓 =
𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔𝒔 𝒆𝒆𝒆𝒆𝒆𝒆𝒆𝒆𝒆𝒆𝒆𝒆𝒆𝒆
Data Rate vs. Signal Rate
Data rate (N): number of data elements (bits) sent in 1s.
Unit: bps
Common terminologies: bit rate
Signal rate (S): number of signal elements sent in 1s. Unit:
baud.
Common terminologies: pulse rate, modulation rate or the baud rate.
Goal in data communications:
increase data rate: increases the speed of transmission
decrease signal rate: decreases the bandwidth requirement
Control by r (data/signal element ratio) or c (case factor) i.e. the
varying data pattern
Example: Data Rate vs. Signal Rate
Min. BW (Hz):
Solution
A signal with L levels actually can carry log2 L bits per
level. If each level corresponds to one signal element and we
assume the average case (c = 1/2), then we have
Desirable line coding capabilities:
Prevention of Baseline Wandering:
Baseline: receiver calculates a running average received signal power
when decoding a digital signal. The incoming signal power is evaluated
against this baseline to determine the value of the data element.
Baseline wandering: A long string of 0s or 1s that causes a drift in the
baseline and make it difficult for the receiver to decode correctly
Suppression of DC Components:
DC (direct-current) components: when the voltage level in a digital
signal is constant for a while, the spectrum creates very low around 0
frequencies (results of Fourier analysis).
present problems for a system that cannot pass low frequencies or a
system that uses electrical coupling (via a transformer) especially for
long distance link.
With no dc component, ac coupling via transformer is possible; this
provides excellent electrical isolation, reducing interference.
Desirable line coding capabilities:
Self-synchronization:
To correctly interpret the signals received from the sender, the receiver’s bit
intervals must correspond exactly to the sender’s bit intervals. If the receiver
clock is faster or slower, the bit intervals are not matched and the receiver
might misinterpret the signals.
Self-synchronizing digital signal includes timing information in the data
being transmitted. This can be achieved if there are transitions in the signal
that alert the receiver to the beginning, middle, or end of the pulse. If the
receiver’s clock is out of synchronization, these points can reset the clock.
Built-in Error Detection
desirable capability in the generated code to detect some or all of the
errors that occurred during transmission
Immunity to Noise and Interference
Cost vs. complexity
A complex scheme is more costly to implement. E.g. a scheme that uses 4
signal levels is more difficult to interpret than one that uses only 2 levels.
Encoding Schemes
• A good signal design should concentrate
Signal spectrum the transmitted power in the middle of the
transmission bandwidth
Signal interference
• Certain codes perform better (BER) in the
and noise presence of noise
immunity
Cost and • The higher the signaling rate the greater the
complexity cost
Types of Line Coding Schemes
NRZ-L/I
Unipolar: Non-return to Zero (NRZ)
Easiest way to transmit digital signals is to use two different voltages
for 0 and 1 bits
Voltage level is constant during a bit interval
No transition (no return to a zero voltage level at the middle of the bit)
Absence of voltage = 0, constant positive voltage = 1
Costly: normalized power (the power needed to send 1 bit per unit line
resistance) is double polar NRZ not used in data comm today
Polar: NRZ-L and NRZ-I
NRZ-L: A negative voltage represents one binary value and a positive
voltage represents the other
NRZ-I: Non-return to zero, invert on ones
Maintains a constant voltage pulse for duration of a bit time
Data are encoded as presence or absence of signal transition at the
beginning of the bit time
Transition (low to high, high to low) denotes binary 1
No transition denotes binary 0
An example of differential encoding
Data are represented by changes rather than levels
More reliable to detect a transition in the presence of noise than to compare a
value to a threshold
Overcome lose sense of polarity e.g. multidrop the twisted pair are accidentally
inverted
Polar schemes: NRZ-L and NRZ-I
NRZ-L and NRZ-I both have an average signal rate of N/2 Bd.
Baseline wandering is a problem for both variations, but twice severe in NRZ-L
vs. NRZ-I. If there is a long sequence of 0s or 1s in NRZ-L, the average signal
power becomes skewed. The receiver might have difficulty discerning the bit
value. In NRZ-I this problem occurs only for a long sequence of 0s. Similar trend
for synchronization problem.
NRZ-L and NRZ-I both have a DC component problem: power spectral density
is very high around frequencies 0 and N/2 i.e. DC components carry a high
level of energy.
Example: NRZ-I
Solution
The average signal rate is 𝑆𝑆𝑎𝑎𝑎𝑎𝑎𝑎 = N/2 = 500 kbaud. The
minimum bandwidth for this average baud rate is
Bmin = 𝑆𝑆𝑎𝑎𝑎𝑎𝑎𝑎 = 500 kHz.
Polar schemes: RZ
Main problem with NRZ: sender and receiver clocks are not synchronized.
The receiver does not know when one bit has ended and the next bit is
starting.
Return-to-zero (RZ) scheme uses three values: positive, negative, and zero,
change in the middle of the bit
Pros: solve synchronization & DC component problem
Cons: requires two signal changes to encode a bit i.e. occupies greater
bandwidth, higher complexity with 3 levels of voltage no longer used today
Polar biphase
Improves RZ, only 2 voltage levels, transition at the middle of the bit
is used for synchronization
Manchester = RZ + NRZ-L
Differential Manchester = RZ + NRZ-I
Manchester Encoding
MLT-3 maps 1 bit data to 1 signal element: signal rate similar to NRZ-I, but
with greater complexity (3 levels and complex transition rules). However, it
helps to reduce the required bandwidth.
E.g. worst-case scenario (sequence of 1s): signal element pattern +V 0 −V 0
is repeated every 4 bits. A non-periodic signal has changed to a periodic
signal with period of 4 times the bit duration. This worst-case situation can
be simulated as an analog signal with a frequency (signal rate) of N/4.
suitable to send 100 Mbps on a copper wire that cannot support more than
32 MHz (frequencies above this level create electromagnetic emissions).
Types of Line Coding Schemes
NRZ-L/I
2B1Q, 8B6T
Summary of line coding schemes
Digital-to-digital conversion
Line coding
Block coding
Scrambling
Block Coding
Block coding offers redundancy to ensure synchronization and provide
inherent error detecting
improve the performance of line coding
Block coding is normally referred to as mB/nB coding; it replaces each m-
bit group with an n-bit group.
i.e. changes a block of m bits into a block of n bits, where n > m
3 steps: division, substitution, and combination
Block coding: 4B/5B with NRZ-I
slash in block encoding (e.g. 4B/5B) distinguishes block encoding from
multilevel encoding (e.g. 8B6T)
NRZ-I has a good signal rate, 1/2 of biphase, but has synchronization
problem (long sequence of 0s can make the receiver clock lose
synchronization)
4B/5B change the bit stream, prior to encoding with NRZ-I, so that it does
not have a long stream of 0s
no more than 1 leading 0 (left bit) and no more than 2 trailing 0s (right bits), does
not have more that 3 consecutive 0s (refer mapping table)
Block coding: 4B/5B mapping codes
Solution
First 4B/5B block coding increases the bit rate to 1.25 Mbps. The
minimum bandwidth using NRZ-I is N/2 or 625 kHz. The
Manchester scheme needs a minimum bandwidth of 1.25 MHz.
The 4B/5B NRZ-I needs a lower bandwidth, but has a DC
component problem; the 4B/5B Manchester needs a higher
bandwidth, but does not have a DC component problem.
Block coding 8B/10B