v2.0 // Interactive Module

Line Coding

The translation of digital data into digital signals. Master the art of baseband transmission for efficient, error-free communication.

Spectral Efficiency

Understanding Power Spectral Density (PSD) and bandwidth constraints.

Clock Recovery

Ensuring sufficient transitions for receiver synchronization.

Error Detection

DC component analysis and baseline wandering immunity.

01

Fundamentals & Properties

Line coding is the process of converting binary data (a sequence of bits) into a digital signal. Unlike analog modulation (AM/FM), here both the information and the signal are digital.

A good line code must satisfy several conflicting requirements:

  • Transmission Bandwidth: Should be as small as possible.
  • Power Efficiency: Low power for a given BW and detection error probability.
  • Error Detection: Ability to detect errors in the received signal.
  • Timing: Adequate timing content (transitions) for clock recovery.

Signal Components

High Frequency (Pulse) Fast transitions

Represents the bit boundaries and timing.

Low Frequency (DC) Constant level

Causes baseline wandering; should be minimized.

02

Unipolar Signaling

In unipolar schemes, binary 1 is represented by a pulse (e.g., +A volts) and binary 0 is represented by no pulse (0 volts). It is the simplest form but has significant drawbacks.

Unipolar NRZ Simulator

Data:
Time (t) → Amplitude (A) ↑

Drawbacks

  • DC Component: Average is non-zero, wasting power and causing baseline wander.
  • No Clock Recovery: Long strings of 0s or 1s result in no transitions.
  • No Error Detection: Inversion of bits is not easily detectable.

Mathematical Representation

s(t) = A for bit '1'
s(t) = 0 for bit '0'
// Over one bit period Tb
03

Polar Signaling

Polar schemes use opposite voltage levels for 1 and 0 (e.g., +A for 1, -A for 0). This eliminates the DC component if the number of 1s and 0s is balanced.

NRZ-Level (NRZ-L)

Voltage = Bit

Voltage level determines the bit value. Constant level for whole bit duration.

NRZ-Invert (NRZ-I)

Transition = 1

Change in level represents 1, no change represents 0. Differential encoding.

Return-to-Zero (RZ)

Mid-bit Transition

Signal returns to zero halfway through the bit interval. Requires 2x bandwidth.

Manchester

IEEE 802.3

Mid-bit transition is clock. Low-to-High = 0, High-to-Low = 1.

Key Insight: Manchester Coding

Manchester coding is self-clocking. There is always a transition in the middle of the bit, guaranteeing clock recovery. However, this comes at the cost of bandwidth (2x NRZ). It is used in traditional Ethernet (10BASE-T).

04

Bipolar (Pseudoternary)

Three voltage levels are used: +V, 0, -V. Binary 0 is represented by zero voltage, but binary 1 is represented by alternating +V and -V.

AMI (Alternate Mark Inversion)

  • No DC component (Good for AC coupling).
  • Long runs of zeros are a problem (no transitions).
  • Baseline wandering is reduced compared to NRZ.

Scrambling: HDB3

To prevent loss of synchronization during long strings of zeros, HDB3 (High Density Bipolar 3) replaces strings of 4 zeros with a special pattern containing a "violation pulse" to intentionally break the alternating rule and force a transition.

AMI Visualizer

Notice alternating polarity for '1's

05

Comparative Analysis

Scheme Signal Levels DC Component Clocking Bandwidth Error Detection
Unipolar NRZ 2 High Poor fb/2 No
Polar NRZ-L 2 None (if balanced) Poor fb/2 No
Manchester 2 None Good fb Possible
AMI 3 None Fair fb/2 Yes (Violation)
06

Power Spectral Density (PSD)

The Power Spectral Density shows how the power of a signal is distributed over frequency. It helps us determine the bandwidth required for transmission.

Characteristics

  • NRZ Main lobe extends from 0 to fb. Significant power at DC (0 Hz).
  • Manchester Main lobe extends from 0 to 2fb. Null at DC.
  • RZ Main lobe extends from 0 to 2fb. Concentrated power at clock frequency.

Conceptual PSD Plot

Frequency (f) Power NRZ fb Manchester fb

Simplified qualitative representation