Version 1.0.0 (160 KB) by Darel
MATLAB code that teaches principles and intricacies of OFDM


Updated 28 Oct 2021

From GitHub

View License on GitHub

OFDM Explained

View <File Exchange Title> on File Exchange

OFDM explained: Cyclic prefix, equalization, synchronization and oversampling Orthogonal Frequency Division Multiplexing (OFDM) is the primary digital modulation technique used by modern wireless communications systems such as 5G cellular and WiFI. The advantages of OFDM over previously used techniques like single carrier QAM are primarily related to the ability to support high speed bit data rates with a simple receiver design.

Equalization and synchronization are both simplified by the use of FFT based OFDM with a cyclic prefix (CP). The code included below first explains basic OFDM, then shows how to augment OFDM with a cyclic prefix. The latter case allows easy use of OFDM in an environment that includes a nonideal channel and unknown propagation delay. In the last section of the code, we illustrate how OFDM+CP can be modified to efficiently yield an oversampled waveform out of the modulator. For more information, a conceptual explanation of OFDM can be seen at What Is OFDM?

MathWorks® toolboxes such as 5G Toolbox™ include customized OFDM functions that conveniently support data packing and customization of waveforms as prescribed in each of those protocols. 5G OFDM is described at Generate OFDM modulated waveform - nrOFDMModulate. In addition, basic OFDM modulation and demodulation functions are built into the Communications Toolbox™.

No setup is required. Just run ofdmpub_final from the MATLAB command line or from the editor toolstrip. For best experience, open the the file in the MATLAB editor and run a section at a time while observing outputs from that section. If you open the file in the MATLAB editor, you can also take advantage of several embedded live editor controls to enable/disable equalization, as well as to tweak parameters like time offset and observe impact on the algorithm.

This example requires MATLAB release R2020b or newer and the Communications Toolbox.

The license for OFDM Explained is available in the LICENSE.TXT file in this GitHub repository.

Community Support

MATLAB Central

Copyright 2021 The MathWorks, Inc.

Cite As

Darel (2023). OFDM-Explained (https://github.com/dlinebarger/OFDM-Explained/releases/tag/v1.0.0), GitHub. Retrieved .

MATLAB Release Compatibility
Created with R2021b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes

To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.