comnum.theory_ber_dpsk#

comnum.theory_ber_dpsk(m, ebn0_db, *, detection='noncoherent')#

Bit error rate of Gray-labelled M-DPSK over AWGN.

With noncoherent detection (the default): ½ exp(-Eb/N0) for DBPSK (Proakis & Salehi, Digital Communications, 5th ed., 2008, Sec. 4.5); for M >= 4 the average number of wrong bits over the decision sectors of the differential phase, whose probabilities come from the distribution of the phase angle between two vectors of the same SNR Es/N0 = Eb/N0 log2 M perturbed by Gaussian noise (Pawula, Rice & Roberts, IEEE Trans. Commun. 30(8), 1982, Sec. IV; see theory_differential_phase_tail). For DQPSK, Pb = ½ [P(|dθ| > π/4) + P(|dθ| > 3π/4)].

With coherent detection and differential decoding (DBPSK only): an isolated symbol error spoils two differences, so Pb = 2p(1 - p) with p = Q(sqrt(2 Eb/N0)) (Proakis & Salehi, 5th ed., Sec. 3.2-2).

Parameters:
  • m (int) – the order, a power of two.

  • ebn0_db (float | array_like) – Eb/N0 (dB).

  • detection (str) – "noncoherent" or "coherent" (with differential decoding, defined for m = 2).

Returns:

the bit error probability at every Eb/N0.

Return type:

float | numpy.ndarray

Raises:

ValueError – for an unknown detection, or coherent detection with m != 2.

Examples

>>> import comnum, math
>>> round(comnum.theory_ber_dpsk(2, 8.0) / (0.5 * math.exp(-comnum.db2lin(8.0))), 12)
1.0
>>> comnum.theory_ber_dpsk(4, 8.0) > comnum.theory_ber_dpsk(2, 8.0)
True
>>> p = comnum.qfunc(math.sqrt(2 * comnum.db2lin(6.0)))
>>> round(comnum.theory_ber_dpsk(2, 6.0, detection="coherent") / (2 * p * (1 - p)), 12)
1.0