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

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 (Simulated)
Error Probability Formulas
Digital Modulation Schemes (AWGN Channel)
Bit Error Rate (BER)
PbBPSK & 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)
PsM-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 erfcImplementation 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
- Interactive BER vs SNR Simulator for m-ary PSK & QAM
- Advanced M-ary Modulation Simulator: Constellation, min dist, Efficiency, SER, EVM (RMS)
Further Reading
- MATLAB Code for BER vs SNR for binary ASK, FSK, and PSK
- Theoretical BER vs SNR for ASK, FSK, and PSK
- Theoretical BER vs SNR for m-ary PSK and QAM
- m-ary PSK & m-ary QAM Online Simulator
- QPSK vs BPSK and QAM