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 (web-based)

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 *

Popular Posts

Hybrid Beamforming | Page 1

Beamforming Techniques Hybrid Beamforming... Page 1 | Page 2 | Hybrid Beamforming: Hybrid beam formation was developed to address some of the limitations of digital pre-coding approaches. Every antenna element is connected to an RF chain in digital pre-coding (beam forming) method. We also know that each RF chain is in charge of providing a separate data stream between the transmitter and the receiver. We know that a larger number of independent data streams leads to higher data rates. It has a spatial multiplexing feature for MIMO. As a result, we may assume that switching from MIMO to massive MIMO will benefit us more in terms of spatial multiplexing in massive MIMO, where each antenna is coupled to a single RF chain. We'll proceed with a definition of hybrid beam forming. Overview of hybrid beam forming with example: Unlike digital beam forming, more than one antenna element is connected to a single RF chain in hybr...

UGC NET Electronic Science Previous Year Question Papers with Solutions

Home / Engineering & Other Exams / UGC NET 2026 PYQ ⬇️ Download Papers and Solutions 📋 Exam Pattern 💡 Preparation Tips ❓ FAQs 📊 Exam Highlights: Electronic Science (88) Feature Details Junior Research Fellowship (JRF) ₹37,000 + HRA per month Eligibility M.Sc/M.Tech in Electronics (55%) Validity of Certificate JRF (3 Years) | Lectureship (Lifetime) 📥 Download UGC NET Electronics PDFs Complete collection of previous year question papers, answer keys and explanations for Subject Code 88. Start Downloading 📂 View All Question Papers June 2025 - Question Paper Download PDF June 2025 - Solved Paper + Explanation ...

MATLAB Code for Rms Delay Spread

RMS delay spread is crucial when you need to know how much the signal is dispersed in time due to multipath propagation, the spread (variance) around the average. In high-data-rate systems like LTE, 5G, or Wi-Fi, even small time dispersions can cause ISI. RMS delay spread is directly related to the amount of ISI in such systems. RMS Delay Spread [↗] Delay Spread Calculator Enter delays (ns) separated by commas: Enter powers (dB) separated by commas: Calculate   The above calculator Converts Power to Linear Scale: It correctly converts the power values from decibels (dB) to a linear scale. Calculates Mean Delay: It accurately computes the mean excess delay, which is the first moment of the power delay profile. Calculates RMS Delay Spread: It correctly calculates the RMS delay spread, defined as the square root of the second central moment of the power delay profile.   MATLAB Code  clc...

Comparisons among ASK, PSK, and FSK (with MATLAB + Simulator)

Modulation ASK, FSK & PSK Constellation MATLAB Simulink MATLAB Code Comparisons among ASK, PSK, and FSK 📘 Comparisons among ASK, FSK, and PSK 🧮 Online Simulator Bandwidth 🧮 MATLAB Code BER Analysis 📚 Further Reading 📂 View Other Topics on Comparisons among ASK, PSK, and FSK ... 🧮 Comparisons of Noise Sensitivity, Bandwidth, Complexity, etc. 🧮 MATLAB Code for Constellation Diagrams of ASK, FSK, and PSK 🧮 Online Simulator for ASK, FSK, and PSK Generation 🧮 Online Simulator for ASK, FSK, and PSK Constellation 🧮 Some Questions and Answers Comparisons among ASK, PSK, and FSK Comparison among ASK, FSK, and PSK Parameters ASK FSK PSK Variable Characteristics Amplitude ...

Phase Shift Keying (PSK) Modulation & Demodulation (with Simulation)

Phase Shift Keying (PSK) Theoretical Framework: Phase Shift Keying (PSK) is a digital modulation paradigm where information is encoded by modulating the instantaneous phase of a continuous-wave carrier. In Binary PSK (BPSK), the most fundamental implementation, the bitstream is mapped onto two discrete phases separated by $\pi$ radians—typically representing binary '1' and '0'—resulting in an antipodal signaling scheme where each state change induces a phase reversal in the carrier. BPSK Transmitter Synthesis: The analytic representation of a BPSK signal $s(t)$ is defined as: \[ s(t) = \begin{cases} A_c \cos(2\pi f_c t), & \text{for symbol } m_1 \\ A_c \cos(2\pi f_c t + \pi) = -A_c \cos(2\pi f_c t), & \text{for symbol } m_0 \end{cases} \] NRZ-L m(t) × ...

Amplitude Shift Keying (ASK) Modulation & Demodulation (with Simulation)

Amplitude Shift Keying (ASK): Signal Analysis and Characterization Theoretical Overview: Amplitude Shift Keying (ASK) represents a primary digital modulation technique wherein information is encoded through discrete variations in the carrier signal's instantaneous amplitude. In a Binary ASK (BASK) framework, the modulation process maps binary data onto two distinct amplitude levels. Specifically, the binary '1' (mark) is conveyed by a sinusoidal carrier with amplitude A c and frequency f c over a bit interval T b , while the binary '0' (space) is represented by a null signal state. This particular signaling method is widely recognized as On-Off Keying (OOK) . It is technically realized by gating a carrier oscillator with a unipolar baseband sequence, effectively performing a product modulation that shifts the baseband spectrum to the carrier frequency. ASK Transmitter Architecture: ...

OFDM Symbols and Subcarriers Explained

This article explains how OFDM (Orthogonal Frequency Division Multiplexing) symbols and subcarriers work. It covers modulation, mapping symbols to subcarriers, subcarrier frequency spacing, IFFT synthesis, cyclic prefix, and transmission. Step 1: Modulation First, modulate the input bitstream. For example, with 16-QAM , each group of 4 bits maps to one QAM symbol. Suppose we generate a sequence of QAM symbols: s0, s1, s2, s3, s4, s5, …, s63 Step 2: Mapping Symbols to Subcarriers Assume N sub = 8 subcarriers. Each OFDM symbol in the frequency domain contains 8 QAM symbols (one per subcarrier): Mapping (example) OFDM symbol 1 → s0, s1, s2, s3, s4, s5, s6, s7 OFDM symbol 2 → s8, s9, s10, s11, s12, s13, s14, s15 … OFDM sym...