Demodulate using OFDM method
OFDMDemodulator object demodulates
using the orthogonal frequency division demodulation method. The output
is a baseband representation of the modulated signal, which was input
OFDMModulator companion object.
To demodulate an OFDM signal:
Define and set up the OFDM demodulator object. See Construction.
step to demodulate a signal
according to the properties of
The behavior of
step is specific to each object in
Starting in R2016b, instead of using the
H = comm.OFDMDemodulator creates a demodulator System object,
that demodulates an input signal by using the orthogonal frequency
division demodulation method.
H = comm.OFDMDemodulator( creates
an OFDM demodulator object,
H, with each specified
property set to the specified value. You can specify additional name-value
pair arguments in any order as (
H = comm.OFDMDemodulator(hMod) creates
an OFDM demodulator object,
H, whose properties
are determined by the corresponding OFDM modulator object,
The length of the FFT, NFFT, is equivalent
to the number of subcarriers used in the modulation process.
Specify the number of subcarriers. The default is
The number of guard band subcarriers allocated to the left and right guard bands.
Specify the number of left and right subcarriers as nonnegative
integers in [0, NFFT/
The cyclic prefix length property specifies the length of the
OFDM cyclic prefix. If you specify a scalar, the prefix length is
the same for all symbols through all antennas. If you specify a row
vector of length Nsym, the prefix length can
vary across symbols but remains the same length through all antennas.
The default value is
This property specifies the number of symbols, Nsym.
Specify Nsym as a positive integer. The default
This property determines the number of antennas, Nr,
used to receive the OFDM modulated signal. Specify Nr as
a positive integer such that Nr ≤
|clone||Create OFDM demodulator object with same property values|
|info||Provide dimensioning information for the OFDM method|
|isLocked||Locked status for input attributes and nontunable properties|
|release||Allow property value and input characteristics changes|
|reset||Reset states of the |
|showResourceMapping||Show the subcarrier mapping of the OFDM symbols created by the OFDM demodulator System object|
|step||Demodulate using OFDM method|
Construct an OFDM demodulator System object™ with default properties. Modify some of the properties.
Construct the OFDM demodulator.
demod = comm.OFDMDemodulator
demod = comm.OFDMDemodulator with properties: FFTLength: 64 NumGuardBandCarriers: [2×1 double] RemoveDCCarrier: false PilotOutputPort: false CyclicPrefixLength: 16 NumSymbols: 1 NumReceiveAntennas: 1
Modify the number of subcarriers and symbols.
demod.FFTLength = 128; demod.NumSymbols = 2;
Verify that the number of subcarriers and the number of symbols changed.
demod = comm.OFDMDemodulator with properties: FFTLength: 128 NumGuardBandCarriers: [2×1 double] RemoveDCCarrier: false PilotOutputPort: false CyclicPrefixLength: 16 NumSymbols: 2 NumReceiveAntennas: 1
Create an OFDM demodulator System object™ from an existing OFDM modulator System object.
Construct an OFDM modulator using default parameters.
mod = comm.OFDMModulator('NumTransmitAntennas',4);
Construct the corresponding OFDM demodulator from the modulator,
demod = comm.OFDMDemodulator(mod);
Display the properties of the modulator and verify that they match those of the demodulator.
mod = comm.OFDMModulator with properties: FFTLength: 64 NumGuardBandCarriers: [2×1 double] InsertDCNull: false PilotInputPort: false CyclicPrefixLength: 16 Windowing: false NumSymbols: 1 NumTransmitAntennas: 4 demod = comm.OFDMDemodulator with properties: FFTLength: 64 NumGuardBandCarriers: [2×1 double] RemoveDCCarrier: false PilotOutputPort: false CyclicPrefixLength: 16 NumSymbols: 1 NumReceiveAntennas: 1
Note that the number of transmit antennas is independent of the number of receive antennas.
showResourceMapping method shows the time-frequency resource mapping for each transmit antenna.
Construct an OFDM demodulator.
demod = comm.OFDMDemodulator;
Remove the DC subcarrier.
demod.RemoveDCCarrier = true;
Show the resource mapping after removing the DC subcarrier.
Construct an OFDM modulator with an inserted DC null, seven guard-band subcarriers, and two symbols that have different pilot indices for each symbol.
mod = comm.OFDMModulator('NumGuardBandCarriers',[4;3],... 'PilotInputPort',true,'PilotCarrierIndices',cat(2,[12; 26; 40; 54],... [11; 27; 39; 55]),'NumSymbols',2,'InsertDCNull',true);
Determine input data, pilot, and output data dimensions.
modDim = info(mod)
modDim = struct with fields: DataInputSize: [52 2] PilotInputSize: [4 2] OutputSize: [160 1]
Generate random data symbols for the OFDM modulator. Determine the number of data symbols by using the structure variable,
dataIn = complex(randn(modDim.DataInputSize),randn(modDim.DataInputSize));
Create a pilot signal that has the correct dimensions.
pilotIn = complex(rand(modDim.PilotInputSize),rand(modDim.PilotInputSize));
Apply OFDM modulation to the data and pilot signals.
modSig = step(mod,dataIn,pilotIn);
Use the OFDM modulator object to create the corresponding OFDM demodulator.
demod = comm.OFDMDemodulator(mod);
Demodulate the OFDM signal and output the data and pilot signals.
[dataOut,pilotOut] = step(demod,modSig);
Verify that the input data and pilot symbols match the output data and pilot symbols.
isSame = (max(abs([dataIn(:) - dataOut(:); ... pilotIn(:) - pilotOut(:)])) < 1e-10)
isSame = logical 1
The Orthogonal Frequency Division Modulation (OFDM) Demodulator System object demodulates an OFDM input signal by using an FFT operation that results in N parallel data streams.
The figure shows an OFDM demodulator. It consists of a bank of N correlators with one assigned to each OFDM subcarrier followed by a parallel-to-serial conversion.
There are three types of OFDM subcarriers: data, pilot, and null. Data subcarriers are used for transmitting data while pilot subcarriers are used for channel estimation. There is no transmission on null subcarriers, which are used to provide a DC null as well as to provide buffers between OFDM resource blocks. These buffers are referred to as guard bands whose purpose is to prevent inter-symbol interference. The allocation of nulls and guard bands varies depending upon the standard, e.g., 802.11n differs from LTE. Consequently, the OFDM modulator object allows the user to assign subcarrier indices as required.
Analogous to the concept of guard bands, the OFDM modulator object supports guard intervals that provide temporal separation between OFDM symbols so that the signal does not lose orthogonality due to time-dispersive channels. As long as the guard interval is longer than the delay spread, each symbol does not interfere with other symbols. Guard intervals are created by using cyclic prefixes in which the last part of an OFDM symbol is copied and inserted as the first part of the OFDM symbol. The benefit of cyclic prefix insertion is maintained as long as the span of the time dispersion does not exceed the duration of the cyclic prefix. The OFDM modulator object enables the cyclic prefix length to be set. The drawback in using a cyclic prefix is increased overhead.
 Dahlman, E., S. Parkvall, and J. Skold. 4G LTE/LTE-Advanced for Mobile Broadband.London: Elsevier Ltd., 2011.
 Andrews, J. G., A. Ghosh, and R. Muhamed, Fundamentals of WiMAX, Upper Saddle River, NJ: Prentice Hall, 2007.
 I. E. E. E., "IEEE Standard 802.16TM-2009."