Coding

RZ Codes

The principles of Return-to-Zero codes and their effect on clock recovery.

Loss of Synchronization with Constant Levels

Simple line codes such as NRZ (Non-Return-to-Zero) are easy to implement, but a long, uninterrupted sequence of identical bits (1111111111111111) creates a constant voltage level on the line. With no signal changes, the receiver can lose its timing reference, a condition described as loss of .

In the unipolar form described here, Return-to-Zero (RZ) coding forces the signal to return to zero after a pulse representing a logical one. This shortens the pulse and can increase the number of transitions in a stream containing ones.

How Unipolar RZ Works

The simplest variant is unipolar RZ. It modifies the NRZ signal by shortening the pulse for a logical '1' to part 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 TT is the bit duration:

  • Logical '1': Represented by a positive pulse +V+V from 0 to half the bit duration (0.5T0.5T), followed by a 0V0V level until the period ends.
    Formula for 0≤t<T0 \le t < T: g1(t)={+V,0≤t<T/20,T/2≤t<Tg_1(t) = \begin{cases} +V, & 0 \le t < T/2 \\ 0, & T/2 \le t < T \end{cases}
  • Logical '0': Represented by a zero level for the entire bit duration.
    Formula for 0≤t<T0 \le t < T: g0(t)=0g_0(t) = 0

The RZ Spectrum

Shorter pulses change the frequency spectrum of RZ. They can support clock recovery while increasing the required bandwidth.

Spectrum analysis

  • Clock recovery: In the unipolar RZ model described here, when the stream contains a nonzero fraction of ones, it produces a discrete line at the clock frequency (fclk=1/Tf_{clk} = 1/T). The receiver can extract it with a band-pass filter and use it for synchronization. Clock recovery is then easier than from an NRZ waveform.
  • Required bandwidth: With rectangular pulses lasting half a bit period, the first null of the main lobe occurs at 2fclk2f_{clk}. This is twice the frequency obtained for an NRZ pulse lasting TT, so RZ occupies a wider band.
  • DC component: The unipolar version of RZ has a data-dependent . This component complicates transmission through AC-coupled elements.
  • Long zero sequences: A long string of zeros still produces a flat 0V line, which can lead to a loss of synchronization, just as in NRZ. HDB3 limits this problem in systems that use it by replacing selected zero sequences with patterns containing pulses. AMI preserves alternating marks for ones but does not eliminate long zero runs.

Related articles