comnum.awgn_ebn0#
- comnum.awgn_ebn0(x, ebn0_db, bits_per_symbol, rng, *, sps=1.0)#
Add noise for an
E_b/N_0ofebn0_db:σ² = P_x · sps / (b · E_b/N_0)forbbits per symbol atspssamples per symbol.- Parameters:
- Returns:
the noisy signal (complex128).
- Return type:
- Raises:
ValueError – for an input that is not an array of numbers of the expected shape.
Examples
>>> import comnum >>> c = comnum.Constellation("qam", 4).normalized() >>> b = comnum.bits(2 * 50_000, comnum.Rng(1)) >>> y = comnum.awgn_ebn0(c.map_bits(b), 6.0, 2, comnum.Rng(2)) >>> abs(comnum.ber(c.demap_bits(y), b) / comnum.theory_ber(4, 6.0) - 1) < 0.15 True