FIVRA AcademyAll lessonsSimulatorsGlossaryРусский

In depth: the physics of light, fiber and signal · 25 min · basics

Analog and digital, coding

Explain how a signal becomes a bit stream and why that stream is re-encoded before transmission.

Take it interactively: simulators and problems

An analog signal changes continuously: a microphone voltage, the brightness of a pixel. A digital signal is a sequence of numbers written in bits. Fiber communication carries almost only digital: a bit error can be detected and corrected, while analog distortion accumulates.

Sampling and quantization

To digitize a signal, it is measured at equal time intervals (sampling) and each measurement is rounded to the nearest of 2N2^N levels (quantization). By the Kotelnikov (Nyquist–Shannon) theorem, a signal with bandwidth up to fmaxf_{max} is restored without loss if the sampling rate is at least twice the bandwidth.

fs≥2fmaxf_s \ge 2 f_{max}

Kotelnikov (Nyquist–Shannon) theorem

R=fs⋅N⋅kR = f_s \cdot N \cdot k

Uncompressed digital stream rate

SQNR≈6.02 N+1.76 dB\mathrm{SQNR} \approx 6.02\,N + 1.76\ \text{dB}

Quantization signal-to-noise ratio for a full-scale sine wave

Example: Telephone channel

Given: speech band 300–3400 Hz; sampling rate 8 kHz; 8 bits per sample

  1. fs=8000≥2⋅3400=6800f_s = 8000 \ge 2 \cdot 3400 = 6800 Hz — the condition is met with a margin for a non-ideal filter.
  2. R=8000⋅8=64 000R = 8000 \cdot 8 = 64\,000 bit/s.

Answer: One telephone channel is 64 kbit/s. This is the basic digital channel (DS0) of the PDH and SDH hierarchies.

NRZ — the simplest code

In NRZ (non-return-to-zero) code the level is held for the whole bit period: "1" means light, "0" means little light. The fundamental frequency of NRZ is half the bit rate, so NRZ is bandwidth-efficient. Its weak spot: a long run of identical bits looks like a constant level with no edges.

10110010NRZRZ (50 %)Manchesterperiod = 1 bit; Manchester code has a transition in the middle of every period
The sequence 10110010 in NRZ, RZ and Manchester codes.

Why a line code is needed

8b/10b, 64b/66b and scrambling

The 8b/10b code replaces each byte with a 10-bit word with an almost equal number of ones and zeros: a run of identical bits is no longer than 5, and the running disparity stays within ±1. The price is 25 % overhead. The 64b/66b code adds a two-bit header to 64 data bits and passes the data through a self-synchronizing scrambler: the overhead is only 3.125 %. SDH, OTN and GPON use frame scrambling without overhead: the stream is added modulo 2 to a pseudo-random sequence known to both sides.

Rline=Rdata⋅nmR_{line} = R_{data} \cdot \frac{n}{m}

Line rate of an mB/nB code

Line codes of optical interfaces
CodeOverheadWhere it is usedExample line rate
8b/10b25 %1000BASE-X (SX/LX), Fibre Channel up to 8G, XAUI1.25 GBd for 1 Gbit/s
64b/66b3,125 %10GBASE-R (SR/LR/ER), 25G, 100G Ethernet10.3125 GBd for 10 Gbit/s
Frame scrambler0 %SDH (G.707), OTN, GPON (G.984.3, polynomial x7+x6+1x^7+x^6+1)GPON downstream 2.48832 Gbit/s

Lesson problems

  1. Compact disc: sampling rate 44.1 kHz, 16 bits per sample, 2 channels. What is the uncompressed digital stream rate? (kbit/s)
  2. What is the theoretical quantization signal-to-noise ratio of a 12-bit ADC (full-scale sine wave)? (dB)
  3. A 1000BASE-LX interface carries 1 Gbit/s of payload with 8b/10b code. What is the line rate? (GBd)
  4. A 10GBASE-LR interface carries 10 Gbit/s with 64b/66b code. What is the line rate? (GBd)
  5. The XAUI interface has 4 lanes of 3.125 GBd each with 8b/10b code. What total payload rate does it carry? (Gbit/s)
  6. Why are GPON and SDH streams scrambled before transmission?
    1. So that the stream has no long runs of identical bits and the receiver holds the clock
    2. So that subscribers on one tree cannot read each other's data
    3. To narrow the signal spectrum and reduce fiber attenuation
    4. To add check bits for error correction
  7. How does the required channel bandwidth change if NRZ is replaced by Manchester code at the same data rate?
    1. It roughly doubles
    2. It halves, because every bit is a transition
    3. It does not change: bandwidth is set only by the data rate
    4. It does not change: bandwidth is set by the laser wavelength

Sources

Solve the lesson problems · Next: Intensity modulation