sdr.plot.shannon_limit_ebn0(rho: float, ax: Axes | None = None)

Plots the Shannon limit for the bit energy-to-noise PSD ratio \(E_b/N_0\).

Parameters:
rho: float

The nominal spectral efficiency \(\rho\) of the modulation in bits/2D.

ax: Axes | None = None

The axis to plot on. If None, the current axis is used.

Examples

Plot the absolute Shannon limit on \(E_b/N_0\) and the Shannon limit for \(\rho = 2\) bits/2D. Compare these to the theoretical BER curve for BPSK modulation, which has spectral efficiency \(\rho = 2\) bits/2D.

In [1]: bpsk = sdr.PSK(2)

In [2]: ebn0 = np.linspace(-2, 10, 201)

In [3]: plt.figure(); \
   ...: sdr.plot.ber(ebn0, bpsk.ber(ebn0), label="BPSK theoretical"); \
   ...: plt.ylim(1e-6, 1e0); \
   ...: sdr.plot.shannon_limit_ebn0(0); \
   ...: sdr.plot.shannon_limit_ebn0(2); \
   ...: plt.title("Bit error rate curve for PSK modulation in AWGN");
   ...: 
../../_images/sdr_plot_shannon_limit_ebn0_1.png