RZ Codes
Understanding Return-to-Zero codes and how they improve clock recovery.
The Problem with Non-Stop Signals
While simple line codes like NRZ (Non-Return-to-Zero) are easy to implement, they suffer from a major flaw: a long, uninterrupted sequence of identical bits () creates a constant voltage level on the line. With no changes in the signal, the receiver can lose its timing reference, a phenomenon known as loss of .
Return-to-Zero (RZ) coding was developed to solve this very problem by forcing a change in the signal during each bit that carries energy.
How Unipolar RZ Works
The simplest variant is Unipolar RZ. It modifies the NRZ signal by making the pulse for a logical '1' last for only a fraction of the bit duration, typically one-half. After the pulse, the signal "returns to zero" for the remainder of the bit period.
Encoding Rules
The signals representing the symbols are defined as follows, where is the bit duration:
- Logical '1': Represented by a positive pulse for the first half of the bit duration (), followed by a return to for the second half.
Formula: - Logical '0': Represented by a zero voltage level for the entire bit duration.
Formula:
Interactive RZ Encoding Example
Enter binary sequence (0s and 1s only)
DC Component
Spectral Information
The RZ Spectrum: A Double-Edged Sword
The unique structure of the RZ signal has a profound impact on its frequency spectrum, bringing both a significant advantage and a major disadvantage.
Spectrum Analysis
- Advantage - Clock Recovery (++): The spectrum of an RZ signal contains a distinct, discrete spectral line (a spike) at the clock frequency (). This acts like a built-in "metronome" that the receiver's circuitry can easily lock onto using a simple filter. This makes clock recovery from an RZ signal much more reliable than from an NRZ signal.
- Disadvantage - Increased Bandwidth (--): The price for this improved synchronization is a wider bandwidth requirement. Because the pulses are shorter (half the bit duration), the signal's main spectral lobe is twice as wide as that of an NRZ signal, extending to . This makes RZ coding less spectrally efficient.
- Disadvantage - DC Component (-): The unipolar version of RZ has a data-dependent , which can be problematic for some transmission systems.
- Limitation - Long Zero Sequences (-): A long string of zeros still produces a flat, zero-voltage line, which can lead to a loss of synchronization, just like in NRZ. More advanced codes like AMI and HDB-3 were created to solve this specific issue.