sdr.plot.ser(esn0: ArrayLike, ser: ArrayLike, ax: Axes | None = None, **kwargs)

Plots the symbol error rate (SER) as a function of \(E_s/N_0\).

Parameters:
esn0: ArrayLike

The symbol energy \(E_s\) to noise PSD \(N_0\) ratio (dB).

ser: ArrayLike

The symbol error rate \(P_{se}\).

ax: Axes | None = None

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

**kwargs

Additional keyword arguments to pass to matplotlib.pyplot.semilogy().

Examples

Plot theoretical SER curves for BPSK, QPSK, 8-PSK, and 16-PSK in an AWGN channel.

In [1]: bpsk = sdr.PSK(2); \
   ...: qpsk = sdr.PSK(4); \
   ...: psk8 = sdr.PSK(8); \
   ...: psk16 = sdr.PSK(16); \
   ...: esn0 = np.linspace(-2, 10, 100)
   ...: 

In [2]: plt.figure(); \
   ...: sdr.plot.ser(esn0, bpsk.ser(esn0), label="BPSK"); \
   ...: sdr.plot.ser(esn0, qpsk.ser(esn0), label="QPSK"); \
   ...: sdr.plot.ser(esn0, psk8.ser(esn0), label="8-PSK"); \
   ...: sdr.plot.ser(esn0, psk16.ser(esn0), label="16-PSK"); \
   ...: plt.title("SER curves for PSK modulation in an AWGN channel");
   ...: 
../../_images/sdr_psk_ser_1.png