diff_encode

Differential encoder (polynomial = \(1/(1+X)\)), MSB first.

Namespace: dsp::telecom

Prototype

void diff_encode(BitStream &y, const BitStream &x)

Parameters

xInput binary sequence ( \(n\) bits)
yOutput binary sequence ( \(n\) bits)

Description

This function build a differentially encoded binary sequence: \[ y_n = x_n \oplus y_{n-1} \]

That is, the transfert function is: \[ P = \frac{1}{1+X} \]

This can be used for instance in DBPSK modulation: in this case, the phase is unchanged for \(x_n=0\), and shifted of 180° for \(x_n=1\).

See also

diff_decode()