Photonica

Pseudo-random binary sequence (PRBS)

A deterministic, repeating bit pattern generated by a linear feedback shift register that looks statistically random, used to drive transmitters and count errors in link testing. A PRBS of order n repeats every 2ⁿ − 1 bits: 127 bits for PRBS7, 2,147,483,647 for PRBS31.

Fiber & telecomLab practiceUpdated October 2026

A pseudo-random binary sequence is the standard test pattern for digital links: a pattern generator sends it through the transmitter, channel and receiver, and an error detector running the same sequence compares every received bit, giving the bit error rate. A PRBS of order nn (PRBSn) has period 2n−12^n - 1 and contains every nonzero nn-bit word exactly once per period, so it exercises all short bit patterns while being reproducible and trivial to generate at any rate. The eye diagram entry describes how the pattern length affects what an eye measurement reveals.

Generation

A linear feedback shift register of nn stages produces the sequence: on each clock the register shifts by one, and the new bit is the exclusive-OR of two (sometimes more) tapped stages. When the taps correspond to a primitive polynomial over GF(2), the register cycles through all 2n−12^n - 1 nonzero states before repeating. The widely used choices are

PatternPolynomialPeriod (bits)
PRBS7x7+x6+1x^7 + x^6 + 1127
PRBS9x9+x5+1x^9 + x^5 + 1511
PRBS15x15+x14+1x^{15} + x^{14} + 132,767
PRBS23x23+x18+1x^{23} + x^{18} + 18,388,607
PRBS31x31+x28+1x^{31} + x^{28} + 12,147,483,647

The error detector synchronizes by loading nn received bits into its own register, then runs freely; a detector that kept feeding back received bits would count each error once per tap plus once, three times for two-tap feedback.

Run lengths and spectrum

In one period there are 2n−12^{n-1} ones and 2n−1−12^{n-1} - 1 zeros. The longest run of ones is nn bits and the longest run of zeros n−1n - 1; half of all runs have length 1, a quarter length 2, and so on.

The spectrum of a non-return-to-zero PRBS is a set of lines spaced by the bit rate divided by the period, under a sinc2\mathrm{sinc}^2 envelope with its first null at the bit rate. At 25.78125 Gbit/s, PRBS7 has lines every 203 MHz and nothing below that apart from its small DC term; PRBS31 has lines every 12 Hz, an effectively continuous spectrum down to low frequency. A long pattern therefore probes AC-coupling capacitors, baseline wander, thermal effects in lasers and the low-frequency response of clock and data recovery loops, none of which a short pattern excites.

Pattern dependence

Because a link's errors depend on the bit history (intersymbol interference, laser thermal transients, equalizer and baseline behavior), the measured error rate can differ by orders of magnitude between PRBS7 and PRBS31. Results should state the pattern. Short patterns suit quick eye and jitter measurements, since an oscilloscope can lock to a 127-bit pattern and average each bit position; long patterns suit error counting.

For PAM4 signals, quaternary patterns are built by pairing bits of a binary PRBS into symbols (PRBS13Q and PRBS31Q are common), and the short stress patterns used for TDECQ are designed to contain the worst-case transitions explicitly.

Common questions

Why is PRBS31 used for bit error rate testing?

Its period is long enough to contain runs of up to 31 identical bits and every nonzero 31-bit word, which approximates the low-frequency content and worst-case patterns of real scrambled traffic. Shorter patterns overestimate link margin when the receiver has low-frequency impairments.

How long does one PRBS31 period last?

The period is 231−12^{31} - 1 = 2,147,483,647 bits: 0.21 s at 10.3125 Gbit/s and 0.040 s at 53.125 Gbit/s. A test of a few seconds therefore covers many complete periods.

References: S. W. Golomb, Shift Register Sequences, revised ed. (Aegean Park Press, 1982); G. P. Agrawal, Fiber-Optic Communication Systems, 4th ed. (Wiley, 2010).