Line coding is the process of converting digital data to digital signals.
Source | Description |
---|---|
Sender | Digital data are encoded into a digital signal. |
Receiver | Digital data are recreated by decoding the digital signal. |
Data element | Signal element |
---|---|
The smallest entity that can represent a piece of information; this is the bit. | The shortest unit of a digital signal. |
What we need to send. | What we can send. |
Are being carried. | Are the carriers. |
The data rate defines the number of data elements sent in 1s (bit rate). The signal rate is called the baud rate.
A baud is a signaling event or the change in the amplitude or the frequency or phase of the carrier wave.
Baud rate refers to the number of signaling events that can be generated in a 1s interval.
The relationship between data rate and signal rate:
Most digital signals we encounter in real life have a bandwidth with finite values. The bandwidth is theoretically infinite but many components have such a small aplitude that they canb be ignored. The effective bandwidth is finite.
The baud rate are not bit rate determines the required bandwidth for a signal.
The receiver calculates a running average of the received signal power. This average is called the baseline. The incoming signal power is evaluated against this baseline to determine the value of the data element.
The voltage level of a signal is constant.
A Direct Current (DC) component presents a problem for a system that can not low frequencies or a system that uses electrical coupling via a transformer.
To correctly interpret the signal received from the server, the receiver's bit intervals must correspond exactly to the sender's bit intervals. If the receiver's clock is faster or slower, the bit intervals are not matched and the receiver might misinterpret the signals.
Self-synchronization can be achieved if there are transitions in the signal that alert the receiver to the beginning, middle, or the end of the pulse.
In a unipolar scheme, all the signal levels are on one side of the time axis, either above or below.
A unipolar scheme was designed as a Non-Return-to-Zero (NRZ) scheme in which
the positive voltage defines bit
In a polar scheme, the voltages are on both sides of the same axis. For
example, the voltage level for
Variant | Description |
---|---|
NRZ-Level | The level of voltage determines the value of the bit. |
NRZ-Invert | The change or lack of change in the level of the voltage determines the value of the bit. If there is no change the bit is |
The Return-to-Zero (RZ) scheme uses three values: positive, negative, and zero. In RZ, the signal changes not between but during the bit.
In Manchester encoding the duration of the bit is divided into two values. The voltage remains at one level during the first half and moves to the other level in the second half.
In Differential Manchester, there is always a transition at the middle of
the bit but the bit values are determined at the beginning of the bit. If the
next bit is
0 |
1 |
|
---|---|---|
Manchester | ||
Differential Manchester |
There are three voltage levels: positive, negative, and zero. The voltage level for one data element is zero, while the voltage level for the other element alternates between positive and negative.
Alternate Mark Inversion (AMI) a zero voltage represents binary
Let's increase the number of bits per baud by encoding a pattern of
If we have
Data encoding is not possible if
Two Binary, One Quarterary (2B1Q) uses data patterns of size
Eight Binary, Six Ternary (8B6T), the idea is to encode a pattern of
Each signal pattern has a weight of
Block coding can give us redundancy and improve the performance of line coding.
Normally referred to as
In 4B/5B, the 5-bit output that replaces the 4-bit input has no more than one leading zero (left bit) and no more than two trailing zeros (right bits). There are no more than 3 consecutive zeros.
- The analog signal is sampled.
- The sampled signal is quantized.
- The quantized values are encoded as streams of bits.
The analog signal is sampled every
In order to reproduce the original analog signal the sampling rate must be at least twice the highest frequency in the original signal.
Analog signal | Bandwidth value |
---|---|
Low-pass | The same as the highest frequency. |
Bandpass | Lower than the value of maximum frequency. |
$$ \begin{array}{rcl} f_\textsf{max} & = & 4 \sf \ KHz \\\ f_S & = & 4 . 4000 \\\ & = & 8000 . \frac{\textsf{samples}}{S} \\\ & = & 8000 . 8 \\\ & = & \bf 64 \sf \ Kbps \end{array} $$
- We assume that the original analog signal has ranges from
$V_\textsf{min}$ to$V_\textsf{max}$ . - We divide this range into
$L$ zones each of height$\Delta$ .
- We assign quantized values of
$0$ to$L-1$ to the midpoint of each zone. - We approximate the value of each sample by the quantized values.
The choice of
The output values are chosen to be the middle value in the zone which implies a quantization error.
The quantization error affects the signal-to-noise ratio of the signal.
The decoder first converts the code words into a pulse that holds the amplitude until the next pulse. The staircase signal is then passed through a low-pass filter. It smooths the staircase signal into an analog signal.