comnum.theory_ber_rayleigh_mrc#

comnum.theory_ber_rayleigh_mrc(ebn0_db, *, branches=1)#

BER of BPSK (or Gray QPSK, per bit) with maximal-ratio combining of branches independent Rayleigh-faded branches (J. G. Proakis and M. Salehi, Digital Communications, 5th ed., eq. (13.4-15)): P_b = ((1 - μ)/2)^L Σ_{k<L} C(L-1+k, k) ((1 + μ)/2)^k, μ = √(γ/(1 + γ)), with γ the mean E_b/N_0 of one branch; one branch is the flat Rayleigh channel, P_b = (1 - μ)/2.

Parameters:
  • ebn0_db (float | array_like) – the mean E_b/N_0 of one branch (dB).

  • branches (int) – the number of branches L (at least 1).

Returns:

the bit error probability at every E_b/N_0.

Return type:

float | numpy.ndarray

Raises:

ValueError – for no branch.

Examples

>>> import comnum, math
>>> g = comnum.db2lin(10.0)
>>> round(comnum.theory_ber_rayleigh_mrc(10.0) / (0.5 * (1 - math.sqrt(g / (1 + g)))), 12)
1.0
>>> bool(comnum.theory_ber_rayleigh_mrc(10.0, branches=4) < 1e-5)
True