def diff_decode(x):
"""Decode phase differential baseband signal.
:param x: complex baseband differential data to decode
:returns: decoded complex baseband data of length len(x)-1
>>> import arlpy
>>> d1 = arlpy.comms.random_data(100, 4)
>>> qpsk = arlpy.comms.psk(4)
>>> x = arlpy.comms.modulate(d1, qpsk)
>>> y = arlpy.comms.diff_encode(x)
>>> z = arlpy.comms.diff_decode(y)
>>> d2 = arlpy.comms.demodulate(z, qpsk)
>>> arlpy.comms.ser(d1, d2)
0.0
"""
x = _np.asarray(x)
y = _np.array(x)
y[1:] *= x[:-1].conj()
return y[1:]
评论列表
文章目录