Modulate using orthogonal frequency division modulation
Communications Toolbox / Modulation / Digital Baseband Modulation / OFDM
The OFDM Modulator Baseband block applies Orthogonal Frequency Division Multiplexing modulation to an incoming data signal. The output is a baseband representation of the OFDM modulated signal.
In
— Input signalInput signal, specified as a 3D vector. The block accepts one or two inputs depending on the state of the Pilot input port. The input signal dimensions are :
Pilot Input Port | Signal Input | Pilot Input |
---|---|---|
off | N data -by-N sym -by-N t | N/A |
on | N pilot -by-N sym -by-N t |
where
Ndata represents the number of data subcarriers. For
further information on how Ndata is
determined, see the info
reference
page.
Nsym represents the number of symbols determined by Number of OFDM symbols.
Nt represents the number of transmit antennas determined by Number of transmit antennas.
Npilot represents the number of pilot symbols determined by the first dimension size in the Pilot subcarrier indices array.
NCP represents the cyclic prefix length as determined by Cyclic prefix length.
NCPTotal represents the cyclic prefix length over all the symbols. When NCP is a scalar, NCPTotal = NCP × Nsym. When NCP is a row vector, NCPTotal = ∑ NCP.
NFFT represents the number of subcarriers as determined by FFT length.
Data Types: double
Complex Number Support: Yes
Out
— Baseband modulated signalBaseband modulated signal, returned as a 2D array. The datatype of the output follows the input datatype. The output signal has dimension (N CP +N FFT) ×N sym -by-N t.
FFT Length
— Number of DFT pointsNumber of DFT points, specified as a positive integer. The length of the FFT, NFFT, must be greater than or equal to 8 and is equivalent to the number of subcarriers.
Number of guard bands
— Number of subcarriers to the left and right guard bands[6;5]
(default) | 2-by-1 integer-valued vectorNumber of subcarriers allocated to the left and right guard bands, specified as a 2-by-1 integer-valued vector. The number of subcarriers must fall within [0,⌊NFFT/2⌋ − 1] where you specify the left, NleftG, and right, NrightG, guard bands independently in a 2-by-1 column vector.
Insert DC null
— Option to insert DC nulloff
(default) | on
Select this parameter to insert a null on the DC subcarrier.
Pilot input port
— Option to specify pilot input portoff
(default) | on
Select this parameter to allow the specifying of pilot input port.
Pilot subcarrier indices
— Pilot subcarrier indices[12; 26; 40; 54]
(default) | column vectorPilot subcarrier indices, specified as a column vector. This field is available only when the Pilot input port check box is selected. You can assign the indices to the same or different subcarriers for each symbol. Similarly, the pilot carrier indices can differ across multiple transmit antennas. Depending on the desired level of control for index assignments, the dimensions of the indices array vary. Valid pilot indices fall in the range
where the index value cannot exceed the number of
subcarriers. When the pilot indices are the same for every symbol and
transmit antenna, the property has dimensions Npilot-by-1. When the pilot indices vary across symbols, the
property has dimensions of Npilot-by-Nsym. If there is only one symbol but multiple transmit
antennas, the property has dimensions of Npilot-by-1-by-Nt. If the indices vary across the number of symbols and
transmit antennas, the property will have dimensions of Npilot-by-Nsym-by-Nt. If the number of transmit antennas is greater than one,
ensure that the indices per symbol are mutually distinct across antennas to
minimize interference. The default value is [12; 26; 40;
54]
.
Cyclic prefix length
— Length of cyclic prefixLength of cyclic prefix, specified as a positive integer. 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 through all antennas.
Apply raised cosine windowing between OFDM symbols
— Option to apply raised cosine window between OFDM symbolsoff
(default) | on
Select this parameter to apply raised cosine windowing between OFDM symbols. Windowing is the process in which the OFDM symbol is multiplied by a raised cosine window before transmission to reduce the power of out-of-band subcarriers, which serves to reduce spectral regrowth.
Window length
— Length of raised cosine windowLength of raised cosine window, specified as a positive scalar. This field is available
only when Apply raised cosine windowing between OFDM
symbols is selected. Use positive integers having a maximum
value no greater than the minimum cyclic prefix length. For example, in a
configuration in which there are four symbols with cyclic prefix lengths of
[12 16 14 18]
, the window length cannot exceed 12.
Number of OFDM symbols
— Number of OFDM symbolsNumber of OFDM symbols in the time-frequency grid, specified as a positive scalar.
Number of transmit antennas
— Number of transmit antennasNumber of transmit antennas, specified as a real positive scalar. Specify the number of transmit antennas, Nt, as a positive integer such that Nt ≤ 64.
Simulate using
— Type of simulation to runCode generation
(default) | Interpreted execution
Type of simulation to run, specified as Code generation
or
Interpreted execution
.
Code generation
–– Simulate the model by using
generated C code. The first time you run a simulation, Simulink® generates C code for the block. The C code is reused for
subsequent simulations unless the model changes. This option requires
additional startup time, but the speed of the subsequent simulations is
faster than Interpreted execution
.
Interpreted execution
–– Simulate the model by
using the MATLAB® interpreter. This option requires less startup time than the
Code generation
method, but the speed of
subsequent simulations is slower. In this mode, you can debug the source
code of the block.
Data Types |
|
Multidimensional Signals |
|
Variable-Size Signals |
|
OFDM operation divides a high-rate data stream into lower data rate substreams by decomposing the transmission frequency band into N contiguous individually modulated subcarriers. Multiple parallel and orthogonal subcarriers carry the samples with almost the same bandwidth as a wideband channel. By using narrow orthogonal subcarriers, the OFDM signal gains robustness over a frequency-selective fading channel and eliminates adjacent subcarrier interference. Intersymbol interference (ISI) is reduced because the lower data rate substreams have symbol durations larger than the channel delay spread.
The Frequency domain representation of orthogonal subcarriers in an OFDM waveform looks as follows:
The transmitter applies inverse fast Fourier transform (IFFT) to N symbols at a time. The output of the IFFT is the sum of the N orthogonal sinusoids:
where {Xk} are data symbols, and T is the OFDM symbol time. The data symbols Xk are typically complex and can be from any digital modulation alphabet (for example, QPSK, 16-QAM, 64-QAM).
The subcarrier spacing is Δf = 1/T; ensuring that the subcarriers are orthogonal over each symbol period, as shown below:
An OFDM modulator consists of a serial-to-parallel conversion followed by a bank of N complex modulators, individually corresponding to each OFDM subcarrier.
Individual OFDM subcarriers are allocated as data, pilot, or null subcarriers.
As shown here, subcarriers are designated as data, DC, pilot, or guard band subcarriers.
Data subcarriers transmit user data.
Pilot subcarriers are used for channel estimation.
Null subcarriers transmit no data. Subcarriers with no data are used to provide a DC null and serve as buffers between OFDM resource blocks.
The null DC subcarrier is the center of the frequency band with an index value of
(nfft
/2 + 1) if nfft
is even, or
((nfft
+ 1) / 2) if nfft
is odd.
The guard bands provide buffers between consecutive OFDM symbols to protect the integrity of transmitted signals by reducing intersymbol interference.
Null subcarriers enable you to model guard bands and DC subcarrier locations for specific standards, such as the various 802.11 formats, LTE, WiMAX, or for custom allocations. You can allocate the location of nulls by assigning a vector of null subcarrier indices.
Similar to guard bands, guard intervals are used in OFDM to protect the integrity of transmitted signals by reducing intersymbol interference.
Assignment of guard intervals is analogous to the assignment of guard bands. You can model guard intervals to provide temporal separation between OFDM symbols. The guard intervals help preserve intersymbol orthogonality after the signal passes through time-dispersive channels. Guard intervals are created by using cyclic prefixes. Cyclic prefix insertion copies the last part of an OFDM symbol as the first part of the OFDM symbol.
As long as the span of the time dispersion does not exceed the duration of the cyclic prefix, the benefit of cyclic prefix insertion is maintained.
Inserting a cyclic prefix results in a fractional reduction of user data throughput because the cyclic prefix occupies bandwidth that could be used for data transmission.
While the cyclic prefix creates a guard period in time domain to preserve orthogonality, an OFDM symbol rarely begins with the same amplitude and phase exhibited at the end of the prior OFDM symbol causing spectral regrowth and therefore, spreading of signal bandwidth due to intermodulation distortion. To limit this spectral regrowth, it is desired to create a smooth transition between the last sample of a symbol and the first sample of the next symbol. This can be done by using a cyclic suffix and raised cosine windowing.
To create the cyclic suffix, the first NWIN samples of a given symbol are appended to the end of that symbol. However, in order to comply with the 802.11g standard, for example, the length of a symbol cannot be arbitrarily lengthened. Instead, the cyclic suffix must overlap in time and is effectively summed with the cyclic prefix of the following symbol. This overlapped segment is where windowing is applied. Two windows are applied, one of which is the mathematical inverse of the other. The first raised cosine window is applied to the cyclic suffix of symbol k and decreases from 1 to 0 over its duration. The second raised cosine window is applied to the cyclic prefix of symbol k+1 and increases from 0 to 1 over its duration. This process provides a smooth transition from one symbol to the next.
The raised cosine window, w(t), in the time domain can be expressed as:
where:
T is the OFDM symbol duration including the guard interval.
TW is the duration of the window.
Adjust the length of the cyclic suffix via the window length setting property, with suffix lengths set between 1 and the minimum cyclic prefix length. While windowing improves spectral regrowth, it does so at the expense of multipath fading immunity. This occurs because redundancy in the guard band is reduced because the guard band sample values are compromised by the smoothing.
The following figures display the application of raised cosine windowing.
[1] Dahlman, E., S. Parkvall, and J. Skold. 4G LTE/LTE-Advanced for Mobile Broadband .London: Elsevier Ltd., 2011.
[2] Andrews, J. G., A. Ghosh, and R. Muhamed. Fundamentals of WiMAX .Upper Saddle River, NJ: Prentice Hall, 2007.