Skip to main content

MATLAB code for BER vs SNR for M-QAM, M-PSK, QPSK, BPSK (with Simulation)


MATLAB Script for BER vs. SNR for M-QAM, M-PSK, QPSK, BPSK

Output

BER vs SNR for PSK & QAM

Fig: BER vs SNR graph for Various PSK and QAM

MATLAB Code for BER vs SNR for m-ary QAM

MATLAB Code for BER vs SNR for m-ary PSK

Error Probability Formulas

Digital Modulation Schemes (AWGN Channel)

Bit Error Rate (BER)

Pb

BPSK & QPSK (Gray Coded)

\[ P_b = Q\left(\sqrt{\frac{2E_b}{N_0}}\right) \]

8-PSK (Approximation)

\[ P_b \approx \frac{2}{3} Q\left(\sqrt{\frac{2E_s}{N_0}} \sin\frac{\pi}{8}\right) \]

16-QAM (Gray Coded)

\[ P_b \approx \frac{3}{4} Q\left(\sqrt{\frac{4}{5}\frac{E_b}{N_0}}\right) \]

64-QAM (Gray Coded)

\[ P_b \approx \frac{7}{12} Q\left(\sqrt{\frac{2}{7}\frac{E_b}{N_0}}\right) \]

256-QAM (Gray Coded)

\[ P_b \approx \frac{15}{32} Q\left(\sqrt{\frac{8}{85}\frac{E_b}{N_0}}\right) \]

Symbol Error Rate (SER)

Ps

M-PSK (General Form)

\[ P_s \approx 2Q\left(\sqrt{\frac{2E_s}{N_0}} \sin\frac{\pi}{M}\right) \]

M-QAM (General Form)

\[ P_s \approx 4\left(1 - \frac{1}{\sqrt{M}}\right) Q\left(\sqrt{\frac{3}{M-1}\frac{E_s}{N_0}}\right) \]

Need help calculating the integral?

Understanding the Q-function and erfc

Implementation Notes

  • BER formulas assume Gray coding mapping.
  • Transmission is modeled over an AWGN channel.
  • E_s = E_b \log_2 (M) (Energy per symbol vs. energy per bit).
  • Q(x) is the area under the tail of a Gaussian PDF.
  • QAM formulas are high-SNR approximations.
  • For BPSK, P_b = P_s as k=1.


Try Interactive Online Simulators

Further Reading

  1. QPSK vs BPSK and QAM
  2. MATLAB Code for BER vs SNR for binary ASK, FSK, and PSK



Contact Us

Name

Email *

Message *