Differential coding


In digital communications, differential coding is a technique used to provide unambiguous signal reception when using some types of modulation. It makes data to be transmitted to depend not only on the current signal state, but also on the previous one.
The common types of modulation that require differential coding include phase shift keying and quadrature amplitude modulation.

Purposes of differential coding

When data is transmitted over twisted-pair wires, it is easy to accidentally insert an extra half-twist in the cable between the transmitter and the receiver. When this happens, the received signal is inverted.
Similarly for BPSK. To demodulate BPSK, one needs to make a local oscillator synchronous with the remote one. This is accomplished by a carrier recovery circuit. However, the integer part of the recovered carrier is ambiguous. There are n valid but not equivalent phase shifts between the two oscillators. For BPSK, n = 2; the symbols appear inverted or not.
Differential encoding prevents inversion of the signal and symbols, respectively, from affecting the data.
Assuming that is a bit intended for transmission and was the symbol just transmitted, then the symbol to be transmitted for is
where indicates binary or modulo-2 addition. On the decoding side, is recovered as
That is, depends only on a difference between the symbols and and not on their values.
There are several different line codes designed to be polarity insensitive -- whether the data stream is inverted or not, the decoded data will always be correct.
The line codes with this property include differential Manchester encoding, bipolar encoding, NRZI, biphase mark code, coded mark inversion, and MLT-3 encoding.

Conventional differential coding

A method illustrated above can deal with a data stream inversion. Sometimes it is enough and sometimes it isn't.
Generally speaking, a differential coding applies to symbols. To resolve 180° ambiguity only, bits are used as these symbols. When dealing with 90° ambiguity, pairs of bits are used, and triplets of bits are used to resolve 45° ambiguity.
A differential encoder provides the operation, a differential decoder - the operation.
Both differential encoder and differential decoder are discrete linear time-invariant systems. The former is recursive and IIR, the latter is non-recursive and thus FIR. They can be analyzed as digital filters.
A differential encoder is similar to an analog integrator. It has an impulse response
and a transfer function
A differential decoder is thus similar to an analog differentiator, its impulse response being
and its transfer function
Note that in binary arithmetic, addition and subtraction are equivalent.

Generalized differential coding

Using the relation is not the only way of carrying out differential encoding. More generally, it can be any function provided that an equation has one and only one solution for any and.

Applications

Differential coding is widely used in satellite and radio relay communications together with PSK and QAM modulations.

Drawbacks

Differential coding has one significant drawback: it leads to error multiplication. That is, if one symbol such as was received incorrectly, two incorrect symbols and would be at the differential decoder's output, see:
and. This approximately doubles the BER at signal-to-noise ratios for which errors rarely occur in consecutive symbols.

Other techniques to resolve a phase ambiguity

Differential coding is not the only way to deal with a phase ambiguity. The other popular technique is to use syncwords for this purpose. That is, if a frame synchronizer detects repeated inverted sync-words, it inverts the whole stream. This method is used in DVB-S.