Differential coding is a technique used in digital communications and signal processing where the information to be transmitted is encoded as the difference between successive symbols or samples, rather than as the absolute value of the symbols themselves. The primary purpose of differential coding is to resolve phase ambiguity in coherent detection systems or to exploit correlation between successive samples for data compression.
Principles of Operation
In a typical differential encoding scheme, the current output symbol is generated by combining the current input symbol with the previous output symbol (or a delayed version of the output). For binary data, this is often implemented as an exclusive OR (XOR) operation between the current input bit and the previous encoded bit. At the receiver, a differential decoder performs the inverse operation (often another XOR with the previous received symbol) to recover the original data stream.
Mathematically, for a sequence of input symbols $d_k$ and encoded symbols $x_k$, the encoding rule is often: $$x_k = d_k \oplus x_{k-1}$$ where $\oplus$ denotes the group operation (e.g., addition modulo-$M$ for $M$-ary symbols, or XOR for binary). The decoding rule at the receiver (assuming no channel errors) is: $$d_k = x_k \ominus x_{k-1}$$ where $\ominus$ is the inverse group operation.
Applications
- Phase Ambiguity Resolution: In coherent modulation schemes such as Phase Shift Keying (PSK) or Quadrature Amplitude Modulation (QAM), the carrier recovery circuit at the receiver may lock onto the carrier with an arbitrary phase offset (e.g., 0°, 90°, 180°, 270° for QPSK). This rotates the constellation diagram, causing symbol errors if absolute encoding is used. Because differential coding encodes information in the transition between symbols (phase difference), the decoded data remains correct regardless of a fixed phase rotation of the received constellation. This is the basis for Differential Phase Shift Keying (DPSK) and is standard in protocols like DVB-S, Wi-Fi (IEEE 802.11), and Bluetooth.
- Differential Pulse Code Modulation (DPCM): In source coding, differential coding is used to reduce redundancy. If a signal is highly correlated (e.g., audio or video), the difference between a sample and its predicted value (based on previous samples) has a smaller variance than the sample itself. This difference signal can be quantized with fewer bits, achieving compression. DPCM is a precursor to modern predictive codecs like ADPCM and is a component of standards such as G.726 and JPEG (lossless mode).
- Delta Modulation (DM): A simplified form of DPCM using a 1-bit quantizer, where the step size is fixed. It encodes whether the current sample is higher or lower than the previous reconstructed sample.
- Magnetic Recording: Differential encoding (often called Modified Frequency Modulation or Miller coding) is used to ensure clock synchronization and DC balance in magnetic storage media.
Error Propagation
A significant characteristic of differential coding in communication channels is error propagation. If a single symbol error occurs during transmission (e.g., due to noise), the differential decoder will produce two consecutive symbol errors: one for the corrupted symbol and one for the subsequent symbol which uses the corrupted symbol as its reference. This effectively doubles the bit error rate (BER) compared to absolute encoding at high signal-to-noise ratios, although the penalty is often accepted to gain the phase ambiguity immunity.
Variants
- Absolute Phase Encoding with Differential Decoding: Some systems (e.g., IEEE 802.11a/g/n/ac) use absolute constellation mapping (e.g., BPSK, QAM) but apply differential coding to the phase of the pilot tones or specific subcarriers to aid channel estimation and phase tracking, while data symbols are encoded absolutely.
- Precoding: In channels with intersymbol interference (ISI), differential coding (specifically Tomlinson-Harashima precoding) can be applied at the transmitter to pre-equalize the signal, moving the modulo operation to the transmitter side to avoid noise enhancement at the receiver.