Skip to main content

Theoretical vs. simulated BER vs. SNR for ASK, FSK, and PSK (MATLAB Code + Simulator)



Overview

BER vs. SNR denotes how many bits in error are received for a given signal-to-noise ratio, typically measured in dB. Common noise types in wireless systems:

AWGN adds random noise; Rayleigh fading attenuates the signal variably. A good SNR helps reduce these effects.

Bit Error Rate (BER) Equations

BER formulas for ASK, FSK, and PSK modulation schemes.

ASK

BER = 0.5 × erfc(0.5 × √SNR)
= Q(√(SNR / 2))

FSK

BER = 0.5 × erfc(√(SNR / 2))
= Q(√SNR)

PSK

BER = 0.5 × erfc(√SNR)
= Q(√(2SNR))
View BER Derivation for ASK, FSK, and PSK in details →

erfc / Q-function (Click here)

Live BER Simulator (Theoretical)

Calculate Bit Error Rate for Binary ASK, FSK, and PSK Modulations instantly.

Binary ASK Modulation
BER: 7.864e-2
Binary FSK Modulation
BER: 7.864e-2
Binary PSK Modulation
BER: 7.864e-2

BER vs. SNR Performance Curves (using MATLAB)

BER vs SNR

Figure 1: Theoretical BER curves

BER vs SNR

Figure 2: Simulated BER curves

MATLAB Code: Theoretical BER

MATLAB Script
% The code is written by SalimWireless.Com clc; clear; close all; % SNR values in dB for ASK, BFSK, and BPSK SNRdB_ask = 0:1:20; SNRdB_bfsk = 0:1:20; SNRdB_bpsk = 0:1:20; % Convert SNR from dB to linear scale SNR_ask = 10.^(SNRdB_ask/10); SNR_bfsk = 10.^(SNRdB_bfsk/10); SNR_bpsk = 10.^(SNRdB_bpsk/10); % Theoretical BER for ASK BER_th_ask = (1/2) * erfc(0.5 * sqrt(SNR_ask)); % Theoretical BER for BFSK BER_th_bfsk = (1/2) * erfc(sqrt(SNR_bfsk / 2)); % Theoretical BER for BPSK BER_th_bpsk = 0.5 * erfc(sqrt(SNR_bpsk)); % Plotting figure; hold on; semilogy(SNRdB_ask, BER_th_ask, '-rh', 'LineWidth', 2.5); semilogy(SNRdB_bfsk, BER_th_bfsk, '-kh', 'LineWidth', 2.5); semilogy(SNRdB_bpsk, BER_th_bpsk, '-bh', 'LineWidth', 2.5); xlabel('SNR (dB)'); ylabel('Bit Error Rate (BER)'); title('Theoretical BER vs. SNR for Binary ASK, FSK, and PSK'); grid on; legend('BASK Theoretical', 'BFSK Theoretical', 'BPSK Theoretical'); set(gca, 'YScale', 'log'); yticks([1e-6 1e-5 1e-4 1e-3 1e-2 1e-1 1]); ylim([1e-6 1]); xlim([0 20]); hold off; web('https://www.salimwireless.com/search?q=ask%20fsk%20psk', '-browser');

MATLAB Code: Simulated BER (with AWGN)

MATLAB Simulation
% Simulation Parameters clc; clear; close all; numBits = 1e6; SNRdB = 0:1:20; SNR = 10.^(SNRdB/10); BER_sim_ask = zeros(1, length(SNRdB)); BER_sim_fsk = zeros(1, length(SNRdB)); BER_sim_psk = zeros(1, length(SNRdB)); for i = 1:length(SNRdB) % ASK bits = randi([0 1], 1, numBits); txASK = bits; noise = sqrt(1/(2*SNR(i))) * randn(1, numBits); rxASK = txASK + noise; bits_rxASK = rxASK > 0.5; BER_sim_ask(i) = sum(bits ~= bits_rxASK) / numBits; % FSK txFSK = (bits == 1) + 1j*(bits == 0); noise = sqrt(1/(2*SNR(i))) * (randn(1, numBits) + 1j*randn(1, numBits)); rxFSK = txFSK + noise; dist1 = abs(rxFSK - (1 + 1j*0)); dist0 = abs(rxFSK - (0 + 1j*1)); bits_rxFSK = dist1 < dist0; BER_sim_fsk(i) = sum(bits ~= bits_rxFSK) / numBits; % PSK txPSK = 2*bits - 1; noise = sqrt(1/(2*SNR(i))) * randn(1, numBits); rxPSK = txPSK + noise; bits_rxPSK = rxPSK > 0; BER_sim_psk(i) = sum(bits ~= bits_rxPSK) / numBits; end figure; semilogy(SNRdB, BER_sim_ask, '-r', 'LineWidth', 2); hold on; semilogy(SNRdB, BER_sim_fsk, '-g', 'LineWidth', 2); semilogy(SNRdB, BER_sim_psk, '-b', 'LineWidth', 2); grid on; xlabel('SNR (dB)'); ylabel('Bit Error Rate (BER)'); title('Simulated BER vs. SNR'); legend('BASK', 'BFSK', 'BPSK'); axis([0 20 1e-5 1]); web('https://www.salimwireless.com/search?q=ask%20fsk%20psk', '-browser');

BER vs SNR Simulation (Theoretical vs Simulated with AWGN)






Theoretical vs Simulated BER vs SNR for Binary ASK (with AWGN)

Higher bits = More accuracy but slower.

Example: -10:2:20 or 5

Observation Table

SNR (dB) Simulated BER


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...

MATLAB Code for 8-PSK, 16-PSK, ...

📘 Overview & Theory 🧮 MATLAB Code for BPSK, QPSK, 8-PSK, 16-PSK, 32-PSK 🧮 Simulator for m-ary PSK 📚 Further Reading   MATLAB Code for BPSK, QPSK, 8-PSK, 16-PSK, 32-PSK clc; clear all; close all; rng(10) M = 8; % M = 2, 4, 8, 16, 32, etc. N_Bits = 2520; Phase = 0; data_info_bit = randi([0,1],N_Bits,1); data_temp = bi2de(reshape(data_info_bit,N_Bits/log2(M),log2(M))); modData = pskmod(data_temp,M,Phase); figure(1); scatterplot(modData); channelAWGN = 15; rxData2 = awgn(modData, channelAWGN); figure(2); scatterplot(rxData2); demodData = pskdemod(rxData2,M,Phase);   for BPSK, Constellation Size, M = 2 for QPSK, M = 4 for 8-PSK, M = 8, and so on    Output Figure: 8-PSK Modulation Figure: 8-PSK Demodulation after adding AWGN Noise Using the above MATLAB code you'll able be to modulate and demodulate 2-PSK, 4-PSK, 8-PSK, 16-PSK, 32-PSK and so on.  16-PSK   Fig: 16-PSK In this above code ' M ' is the number of the conste...

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 ...

MIMO Channel Matrix | Rank and Condition Number

MIMO / Massive MIMO MIMO Channel Matrix | Rank and Condition...   The channel matrix in wireless communication is a matrix that describes the impact of the channel on the transmitted signal. The channel matrix can be used to model the effects of the atmospheric or underwater environment on the signal, such as the absorption, reflection or scattering of the signal by surrounding objects. When addressing multi-antenna communication, the term "channel matrix" is used. Let's assume that only one TX and one RX are in communication and there's no surrounding object. Here, in our case, we can apply the proper threshold condition to a received signal and get the original transmitted signal at the RX side. However, in real-world situations, we see signal path blockage, reflections, etc.,  (NLOS paths [↗]) more frequently. The obstruction is typically caused by building walls, etc. Multi-antenna communication was introduced to address this issue. It makes diversity app...

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...