-
sdr.diff_decode(y: ArrayLike, y_prev: int =
0
) NDArray[int_] Differentially decodes the input data \(y[k]\).
\[x[k] = y[k] \oplus y[k-1]\]Notes
+------+ y[k-1] y[k] --+-->| z^-1 |--------->@--> x[k] | +------+ ^ | | +---------------------+ y[k] = Encoded data x[k] = Decoded data z^-1 = Unit delay @ = Adder
Examples
In [1]: sdr.diff_decode([0, 1, 1, 1, 0, 1]) Out[1]: array([0, 1, 0, 0, 1, 1]) In [2]: sdr.diff_encode([0, 1, 0, 0, 1, 1]) Out[2]: array([0, 1, 1, 1, 0, 1])