A complete end-to-end Orthogonal Frequency Division Multiplexing (OFDM) transceiver simulation implemented in Matlab or GNU Octave, featuring BPSK, QPSK, and 8-PSK modulation schemes with AWGN and Rayleigh fading channel models.
This project simulates a full PHY (Physical Layer) pipeline of a modern wireless communication system, closely modelled after the IEEE 802.11a (Wi-Fi) standard. It demonstrates the entire transmitter–channel–receiver chain from random bit generation to BER analysis.
The simulation covers:
- M-PSK Modulation with Gray coding (BPSK, QPSK, 8-PSK)
- IFFT-based OFDM signal generation with subcarrier allocation
- Cyclic prefix insertion and removal to combat Inter-Symbol Interference (ISI)
- AWGN and Rayleigh fading channel models
- Pilot-based LS (Least Squares) channel estimation with linear interpolation
- Frequency-domain equalization (one-tap per subcarrier)
- BER vs SNR performance analysis with theoretical overlay curves
- EVM (Error Vector Magnitude) analysis
- Spectral efficiency comparison against Shannon bound
- Constellation diagram visualization at multiple SNR points
The simulated BER curves closely match the theoretical formulas, confirming the correctness of the implementation:
| Modulation | Bits/Symbol | SNR for BER < 10⁻³ (AWGN) | Spectral Efficiency |
|---|---|---|---|
| BPSK | 1 | ~8 dB | Low — most robust |
| QPSK | 2 | ~12 dB | 2× BPSK throughput, same BER |
| 8-PSK | 3 | > 30 dB | High throughput, noise-sensitive |
┌─────────────────────────────── TRANSMITTER ───────────────────────────────┐
│ │
│ Random Bits → M-PSK Mod → S2P + Subcarrier Map → IFFT → CP Insert → TX │
│ │
└─────────────────────────────────────────────────────────────────────────────┘
│
┌───────────▼───────────┐
│ CHANNEL MODEL │
│ AWGN / Rayleigh │
└───────────┬───────────┘
│
┌─────────────────────────────── RECEIVER ──────────────────────────────────┐
│ │
│ RX → CP Remove → FFT → LS Channel Est. → Equalize → M-PSK Demod → Bits │
│ │
└─────────────────────────────────────────────────────────────────────────────┘
| Parameter | Value | Description |
|---|---|---|
| FFT Size (N) | 64 | Total subcarriers |
| Cyclic Prefix | 16 samples | 25% of FFT size (ISI guard) |
| Data Subcarriers | 48 | Active data-carrying subcarriers |
| Pilot Subcarriers | 4 | At indices 7, 21, 43, 57 |
| Guard Bands + DC | 12 | Prevent aliasing and DC offset |
| OFDM Symbols/SNR | 80 | Per simulation point |
| SNR Range | 0 to 30 dB | Step size: 2 dB |
| Modulation Schemes | BPSK, QPSK, 8-PSK | M = 2, 4, 8 |
| Channel Models | AWGN, Rayleigh | With LS equalization |
All output figures are saved as .png files in the ofdm_results/ folder:
ofdm_results/
├── fig1_ber_awgn.png ← BER vs SNR (AWGN)
├── fig2_ber_rayleigh.png ← BER vs SNR (Rayleigh + equalization)
├── fig3_awgn_vs_rayleigh.png ← Side-by-side channel comparison
├── fig4_constellations.png ← 3×3 constellation grid
├── fig5_evm.png ← Error Vector Magnitude vs SNR
├── fig6_signal_analysis.png ← Time domain, PSD, CP verification
├── fig7_spectral_efficiency.png ← Spectral efficiency vs Shannon bound
├── fig8_ber_heatmap.png ← BER heatmap (log scale)
└── fig9_snr_requirements.png ← SNR targets bar chart
Expected runtime: 1–3 minutes depending on hardware.
ofdm-transceiver-simulation/
│
├── ofdm_transceiver.m ← Main simulation script
│
├── images/ ← (Add your output PNGs here for README)
│ ├── fig1_ber_awgn.png
│ ├── fig2_ber_rayleigh.png
│ ├── fig3_awgn_vs_rayleigh.png
│ ├── fig4_constellations.png
│ ├── fig5_evm.png
│ ├── fig6_signal_analysis.png
│ ├── fig7_spectral_efficiency.png
│ ├── fig8_ber_heatmap.png
│ └── fig9_snr_requirements.png
│
├── ofdm_results/ ← Output folder (auto-created by script)
│
└── README.md ← This file
OFDM converts a high-speed serial data stream into many parallel low-speed streams transmitted on orthogonal subcarriers. Orthogonality is enforced by the IFFT/FFT pair — at the peak of each subcarrier's frequency, all other subcarriers have zero amplitude.
The last N_cp = 16 samples of each IFFT output are copied and prepended. This absorbs multipath-induced Inter-Symbol Interference (ISI) and converts linear channel convolution into circular convolution, enabling simple one-tap frequency-domain equalization.
Adjacent constellation points differ by exactly 1 bit. A noise-induced wrong decision to the nearest neighbor causes only 1 bit error instead of multiple — critical for achieving theoretical BER performance.
Four pilot subcarriers at known positions transmit 1+0j. The receiver computes Ĥ = Y_pilot / X_pilot = Y_pilot. Linear interpolation then estimates the channel at all 64 subcarrier positions for equalization.
Error Vector Magnitude measures the RMS deviation of received symbols from ideal constellation points — the industry-standard quality metric used in Wi-Fi and cellular hardware certification.
Modulation | SNR @ BER<1e-3 | Throughput | Robustness
-----------|----------------|-------------|------------
BPSK | ~8 dB | 48 bits/sym | ★★★★★
QPSK | ~12 dB | 96 bits/sym | ★★★★☆
8-PSK | >30 dB | 144 bits/sym | ★★☆☆☆
Key findings:
- BPSK and QPSK achieve identical BER per bit — QPSK doubles throughput at no BER cost
- 8-PSK requires excessively high SNR for reliable communication in this channel
- Rayleigh fading causes severe performance degradation; advanced equalization (MMSE) or channel coding is needed
- Simulated BER matches theoretical predictions with high accuracy, validating the implementation
[Nandhini V]
- Department of Electronics and Communication Engineering
- Project: OFDM Transceiver System Simulation
- Tools: Matlab or GNU Octave 8.x