Problems with Repetitive Bit Sequences
In digital transmission, data is sent as a long bit stream. Raw data can make the physical link harder to operate when it contains few transitions. Long, monotonous sequences of the same bit ( or ) are troublesome for three reasons:
- Loss of synchronization: A receiver needs transitions between signal levels to recover the clock and keep its phase aligned with the transmitter. A long, unchanging signal carries too little timing information, so the receiver clock can drift and increase the risk of bit-reading errors. The required density of 0-to-1 and 1-to-0 transitions depends on the clock-recovery circuit.
- DC component: Many communication systems block the direct-current (DC) component. A long sequence of identical bits can give the signal a non-zero average value, which is a . This can disrupt the operation of network equipment.
- Spectrum concentration: Repetitive data patterns can concentrate signal power at specific frequencies. This distribution can increase the risk of interference with other services and leave part of the available bandwidth unused.
Scrambling (Randomization)
Scrambling is a technique for conditioning the transmission stream. It changes the stream so its properties depend less on the source content and so that transitions needed for clock recovery occur. It distributes repetitive patterns, but it does not introduce cryptographic randomness.
A scrambler does not encrypt data. It combines the input stream with a locally generated pseudo-random sequence, usually with XOR. With the polynomial and initial state specified for a given system, the result typically limits long runs of identical bits and increases transition density, but it does not guarantee equal numbers of zeros and ones in every finite segment.
- The scrambling process: The original data stream () is combined with a pseudo-random sequence () using XOR. The result () is sent through the channel.
- The descrambling process: At the receiver, the incoming scrambled stream () is combined with an identical, synchronized pseudo-random sequence () using the same XOR operation. The original data () is recovered when the sequence and its synchronization match.
XOR Operation in a Scrambler
The scrambling and descrambling process uses the logical operation .
Scrambling:
Descrambling:
XOR Truth Table
| A | B | A ⊕ B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
PRBS Generator and LFSR
Scrambling uses a pseudo-random sequence whose bits follow a deterministic generation rule. The receiver reproduces the same sequence to recover the original data. This Pseudo-Random Binary Sequence (PRBS) is generated by a deterministic device called a .
The feedback structure, meaning the cells combined by XOR, is described by a primitive polynomial. An -bit LFSR using such a polynomial and a non-zero initial state generates a PRBS with the maximum period . The sequence then repeats; during one period it can provide the transitions required by the transmission link.
Properties and Limitations of Scrambling
Advantages
- Simple implementation: Hardware based on an LFSR and XOR gates is simple and inexpensive.
- Fewer repetitive patterns: Under typical conditions, scrambling breaks up long sequences of identical bits and supports clock recovery.
- No additional bits: Unlike some line codes, such as Manchester, scrambling does not change the number of bits in the stream. The output bit rate remains the same as the input bit rate.
- No cryptographic function: A scrambler does not provide confidentiality. Its purpose is to shape the stream for the transmission link without the overhead of encryption.
Limitations
- Synchronization sensitivity: In the additive synchronous scrambler shown here, a single channel bit error remains a single error after descrambling when the PRBS is synchronized. Loss of LFSR synchronization can cause a sequence of errors until the receiver is synchronized again.
- Possible correlation: For a particular data segment, XOR with the PRBS can produce an unwanted output pattern, such as a longer run of zeros. A scrambler does not guarantee specific statistics for every short segment.