sdr.PSK.ber(ebn0: ArrayLike, diff_encoded: bool = False) NDArray[float_]

Computes the bit error rate (BER) at the provided \(E_b/N_0\) values.

Parameters:
ebn0: ArrayLike

Bit energy \(E_b\) to noise PSD \(N_0\) ratio in dB.

diff_encoded: bool = False

Indicates whether the input symbols were differentially encoded.

Returns:

The bit error rate \(P_{be}\).

References

  • Simon and Alouini, Digital Communications over Fading Channels, Chapter 8: Performance of Single-Channel Receivers.

  • John Proakis, Digital Communications, Chapter 4: Optimum Receivers for AWGN Channels.

Examples

See the Phase-shift keying example.

Plot theoretical BER 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); \
   ...: ebn0 = np.linspace(-2, 10, 100)
   ...: 

In [2]: plt.figure(figsize=(8, 4)); \
   ...: sdr.plot.ber(ebn0, bpsk.ber(ebn0), label="BPSK"); \
   ...: sdr.plot.ber(ebn0, qpsk.ber(ebn0), label="QPSK"); \
   ...: sdr.plot.ber(ebn0, psk8.ber(ebn0), label="8-PSK"); \
   ...: sdr.plot.ber(ebn0, psk16.ber(ebn0), label="16-PSK"); \
   ...: plt.title("BER curves for PSK modulation in an AWGN channel"); \
   ...: plt.tight_layout();
   ...: 
../../_images/sdr_psk_ber_1.png

Compare the bit error rate of QPSK and DE-QPSK in an AWGN channel.

In [3]: plt.figure(figsize=(8, 4)); \
   ...: sdr.plot.ber(ebn0, qpsk.ber(ebn0), label="QPSK"); \
   ...: sdr.plot.ber(ebn0, qpsk.ber(ebn0, diff_encoded=True), label="DE-QPSK"); \
   ...: plt.title("BER curves for PSK and DE-PSK modulation in an AWGN channel"); \
   ...: plt.tight_layout();
   ...: 
../../_images/sdr_psk_ber_2.png