OFDM Modulator Baseband
Modulate using OFDM method
Libraries:
Communications Toolbox /
Modulation /
Digital Baseband Modulation /
OFDM
Description
The OFDM Modulator Baseband block modulates a frequency domain signal by using the orthogonal frequency division multiplexing (OFDM) method. For more information, see Orthogonal Frequency Division Multiplexing. The output is a baseband representation of the OFDMmodulated signal.
This icon shows the block with all ports enabled.
Examples
Filter Oversampled OFDM Signal Through SISO Channel in Simulink
The model filters an oversampled OFDM modulated signal through a singleinput singleoutput (SISO) channel. After channel filtering, it demodulates the signal and compares the original data to the demodulated output.
The cm_oversample_ofdm_siso
model:
Generates random integer data and pilot input symbols.
16QAM modulates the data and pilot symbols.
OFDMmodulates the QAMmodulated signal. The OFDM modulator and demodulator pair process three symbols, with different pilot subcarrier indices and cyclic prefix lengths for each symbol. The OFDM signal contains data and pilots that the model generates at four times the sample rate.
Filters the OFDMmodulated signal through a SISO AWGN channel.
OFDMdemodulates and separately outputs the data and pilot signals.
16QAM demodulates to the data and pilot symbols.
Computes symbol error rates for the data and pilot signals by using Error Rate Calculation blocks.
The model initializes variables used to configure block parameters by using the PreLoadFcn
callback function. For more information, see Model Callbacks (Simulink).
Display the data and pilot symbol error rates.
The data had a 0.014533 symbol error rate for 126126 samples. The pilots had a 0.014902 symbol error rate for 12012 samples.
The RMS block measures the OFDMmodulated signal scaled by a value proportional to the number of active subcarriers relative to the FFT size to confirm the signal power is approximately unity.
The measured RMS value is 0.98499.
Ports
Input
In — Input baseband signal
array
Input baseband signal, specified as a N_{Data}byN_{Sym}byN_{T} array.
N_{Data} is the number of data subcarriers, such that N_{Data} = N_{FFT} − N_{leftG} − N_{rightG} − N_{DCNull} − N_{Pilot} − N_{CustNull}.
N_{FFT} is the number of subcarriers, as specified by FFT length.
N_{leftG} is the number of subcarriers in the left guard band, as specified by the first element of Number of guard bands.
N_{rightG} is the number of subcarriers in the right guard band, as specified by the second element of Number of guard bands.
N_{DCNull} is the number of subcarriers in the DC null, specified as
0
or1
based on the selection of Insert DC null.N_{Pilot} is the number of pilot subcarriers in each symbol.
When you select Pilot input port, N_{Pilot} =
size
(Pilot subcarrier indices,1
).When you do not select Pilot input port, N_{Pilot} =
0
.
N_{CustNull} is the number of subcarriers used for custom nulls. To use custom nulls, you must specify Pilot subcarrier indices as a 3D array.
N_{Sym} is the number of symbols, as specified by Number of OFDM symbols.
N_{T} is the number of transmit antennas, as specified by Number of transmit antennas.
For more information, see Subcarrier Allocation, Guard Bands, and Guard Intervals.
Data Types: double
Complex Number Support: Yes
Pilot — Pilot signal
array
Pilot signal, specified as an N_{Pilot}byN_{Sym}byN_{T} array.
N_{Pilot} is the number of pilot subcarriers in each symbol, determined by
size
(Pilot subcarrier indices,1
).N_{Sym} is the number of OFDM symbols, as specified by Number of OFDM symbols.
N_{T} is the number of transmit antennas, as specified by Number of transmit antennas.
For more information, see Subcarrier Allocation, Guard Bands, and Guard Intervals.
Dependencies
This port appears when you select Pilot input port.
Data Types: double
Complex Number Support: Yes
Output
Out — OFDMmodulated baseband signal
matrix
OFDMmodulated baseband signal, returned as an (N_{CPTotal} + (N_{FFT} × N_{Sym}))byN_{T} matrix of the same data type as the input signal.
N_{CPTotal} is the cyclic prefix length over all the symbols.
N_{CP} is the cyclic prefix length as specified by Cyclic prefix length.
When Cyclic prefix length is a scalar, N_{CPTotal} = N_{CP} × N_{Sym}.
When Cyclic prefix length is a row vector, N_{CPTotal} = ∑ N_{CP}.
N_{FFT} is the number of subcarriers, as specified by FFT length.
N_{Sym} is the number of symbols, as specified by Number of OFDM symbols.
N_{T} in the number of transmit antennas, as specified by Number of transmit antennas.
Parameters
To edit block parameters interactively, use the Property Inspector. From the Simulink^{®} Toolstrip, on the Simulation tab, in the Prepare gallery, select Property Inspector.
FFT length — Number of FFT points
64 (default)  positive integer
Number of FFT points, specified as a positive, integer scalar. The length of the FFT must be greater than or equal to 8 and is equivalent to the number of subcarriers.
Number of guard bands — Number of subcarriers allocated to left and right guard bands
[6; 5]
(default)  2by1 integervalued vector
Number of subcarriers allocated to the left and right guard bands, specified as a 2by1 integervalued vector. The number of left and right guardband subcarriers, [N_{leftG}; N_{rightG}], must fall within [0,⌊N_{FFT}/2⌋ − 1], where N_{FFT} is the total number of subcarriers in the OFDM signal specified by FFT length. For more information, see Subcarrier Allocation, Guard Bands, and Guard Intervals.
Insert DC null — Option to insert DC null
off
(default)  on
Select this parameter to insert a null on the DC subcarrier. When inserted, the null DC subcarrier is at the center of the frequency band and has the index value:
(N_{FFT} / 2) + 1 when N_{FFT} is even.
(N_{FFT} + 1) / 2 when N_{FFT} is odd.
N_{FFT} is the total number of subcarriers in the OFDM signal, as specified by FFT length.
Pilot input port — Option to input pilot subcarriers
off
(default)  on
Select this parameter to add a port to input pilot subcarriers. When you set this parameter to:
off
— The input data port, In, may include embedded pilot information but the block does not assign pilot subcarrier indices.on
— The block assigns subcarriers specified by Pilot subcarrier indices for pilot modulation of the signal at the Pilot input port.
Pilot subcarrier indices — Indices of pilot subcarrier locations
[12; 26; 40; 54]
(default)  column vector  matrix  3D array
Indices of the pilot subcarrier locations, specified as a column vector, matrix, or 3D array with integerelement values in the range
$$\left[{N}_{\text{leftG}}+1,\text{\hspace{0.17em}}{N}_{\text{FFT}}/2\right]\cup \left[{N}_{\text{FFT}}/2+2,\text{\hspace{0.17em}}{N}_{\text{FFT}}{N}_{\text{rightG}}\right],$$
where N_{FFT} is the total number of subcarriers specified by FFT length, and N_{leftG} and N_{rightG} are the left and right guard bands specified by Number of guard bands.
You can assign the N_{Pilot} pilot carrier indices to the same or different N_{Sym} subcarriers for each symbol, and across N_{T} transmit antennas.
When the pilot indices are the same for every symbol and transmit antenna, the parameter has dimensions N_{Pilot}by1.
When the pilot indices vary across symbols, the parameter has dimensions of N_{Pilot}byN_{Sym}.
If the Pilot port has only one symbol but the block configuration assigns multiple transmit antennas, the parameter has dimensions of N_{Pilot}by1byN_{T}.
If the indices vary across the number of symbols and transmit antennas, the parameter has dimensions of N_{Pilot}byN_{Sym}byN_{T}.
Tip
To minimize interference between transmissions across more than one transmit antenna, the pilot indices per symbol must be mutually distinct across the antennas.
Dependencies
This parameter applies when you select Pilot input port.
Cyclic prefix length — Length of cyclic prefix
16 (default)  positive integer  row vector
Length of the cyclic prefix for each OFDM symbol, specified as a positive, integervalued scalar or row vector containing Number of OFDM symbols elements. When you specify the cyclic prefix length as a:
Scalar — The cyclic prefix length is the same for all symbols through all antennas.
Row vector — The cyclic prefix length may vary across symbols but does not vary across antennas.
Apply raised cosine windowing between OFDM symbols — Option to apply raised cosine window between OFDM symbols
off
(default)  on
Select this parameter to apply raised cosine windowing between OFDM symbols.
To reduce the power of outofband subcarriers caused by spectral regrowth, apply windowing. For more information, see OFDM Raised Cosine Windowing.
Window length — Length of raised cosine window
1 (default)  positive integer
Length of raised cosine window, specified as a positive, integer scalar. This value must be less than or equal to the minimum cyclic prefix length specified by Cyclic prefix length. For example, in a configuration of four symbols with cyclic prefix lengths 12, 14, 16, and 18, the window length must be less than or equal to 12.
Dependencies
This parameter applies when you select Apply raised cosine windowing between OFDM symbols.
Oversampling factor — Oversampling factor
1
(default)  positive scalar
Oversampling factor, specified as a positive scalar. The oversampling factor must satisfy these constraints:
(Oversampling factor×FFT length) must be an integer value.
(Oversampling factor×Cyclic prefix length) must be an integer value.
If you select Apply raised cosine windowing between OFDM symbols, (Oversampling factor×Window length) must be an integer value.
Tip
If you set the oversampling factor to an irrational number, specify the fractional value. For
example, with an FFT length of 12
and an oversampling factor of
4/3
, their product is the integer 16
. However,
rounding 4/3
to 1.333
when setting the oversampling
factor results in a noninteger product of 15.9960
, which results in a
code error.
Number of OFDM symbols — Number of OFDM symbols
1 (default)  positive integer
Number of OFDM symbols in the timefrequency grid, specified as a positive, integer scalar.
Number of transmit antennas — Number of transmit antennas
1 (default)  positive integer
Number of transmit antennas, specified as a positive, integer scalar less than or equal
to 64
.
Simulate using — Type of simulation to run
Code 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 model reuses the C code for subsequent simulations unless the model changes. This option requires additional startup time, but the speed of the subsequent simulations is faster than with theInterpreted execution
option.Interpreted execution
— Simulate the model by using the MATLAB^{®} interpreter. This option shortens startup time, but the speed of subsequent simulations is slower than with theCode generation
option. In this mode, you can debug the source code of the block.
Block Characteristics
Data Types 

Multidimensional Signals 

VariableSize Signals 

Algorithms
Orthogonal Frequency Division Multiplexing
OFDM belongs to the class of multicarrier modulation schemes. Because the operation can transmit multiple carriers simultaneously, noise does not influence OFDM to the same degree as singlecarrier modulation.
OFDM operation divides a highrate data stream into lowrate data substreams by decomposing the transmission frequency band into a number of contiguous individually modulated subcarriers. This set of parallel and orthogonal subcarriers carry the data stream occupying almost the same bandwidth as a wideband channel. By using narrow orthogonal subcarriers, the OFDM signal gains robustness over a frequencyselective 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.
This image shows a frequency domain representation of orthogonal subcarriers in an OFDM waveform.
The transmitter applies inverse fast Fourier transform (IFFT) to N symbols at a time. Typically, the output of the IFFT is the sum of the N orthogonal sinusoids:
$$x(t)={\displaystyle \sum _{k=0}^{N1}{X}_{k}{e}^{j2\pi k\Delta ft}},\text{\hspace{1em}}0\le t\le T,$$
where {X_{k}} are data symbols, and T is the OFDM symbol time. The data symbols X_{k} are typically complex and can be from any digital modulation alphabet (for example, QPSK, 16QAM, 64QAM, etc.).
Note
The MATLAB implementation of the discrete Fourier transform normalizes the output of
the IFFT by 1/N. For more information, see Discrete Fourier Transform of Vector
on the ifft
reference page.
The subcarrier spacing is Δf = 1/T, ensuring that the subcarriers are orthogonal over each symbol period:
$$\frac{1}{T}{\displaystyle {\int}_{0}^{T}{\left({e}^{j2\pi m\Delta ft}\right)}^{*}\left({e}^{j2\pi n\Delta ft}\right)}\text{\hspace{0.17em}}dt=\frac{1}{T}{\displaystyle {\int}_{0}^{T}{e}^{j2\pi (mn)\Delta ft}}\text{\hspace{0.17em}}dt=0\text{\hspace{1em}}\text{for}\text{\hspace{0.17em}}m\ne n.$$
An OFDM modulator consists of a serialtoparallel conversion followed by a bank of N complex modulators, individually corresponding to each OFDM subcarrier.
Subcarrier Allocation, Guard Bands, and Guard Intervals
Individual OFDM subcarriers are allocated as data, pilot, or null subcarriers.
As shown here, subcarriers are designated as data, DC, pilot, or guardband subcarriers.
Data subcarriers transmit user data.
Pilot subcarriers are for channel estimation.
Null subcarriers transmit no data. Subcarriers with no data 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) ifnfft
is even, or ((nfft
+ 1) / 2) ifnfft
is odd.The guard bands provide buffers between adjacent signals in neighboring bands to reduce interference caused by spectral leakage.
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 protect the integrity of transmitted signals in OFDM 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 timedispersive channels. You create guard intervals by using cyclic prefixes. Cyclic prefix insertion copies the last part of an OFDM symbol as the first part of the OFDM symbol.
OFDM benefits from the use of cyclic prefix insertion as long as the span of the time dispersion does not exceed the duration of the cyclic prefix.
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.
OFDM Raised Cosine Windowing
OFDM raised cosine windowing applies techniques described in [3] to limit spectral regrowth by creating a smooth transition between the last sample of one symbol and the first sample of the next symbol.
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 that it exhibits at the end of the prior OFDM symbol, which causes spectral regrowth and, therefore, spreads the signal bandwidth due to intermodulation distortion. To limit this spectral regrowth, you can create a smooth transition between the last sample of a symbol and the first sample of the next symbol by using a cyclic suffix and raised cosine windowing.
To create the cyclic suffix, the operation appends the first N_{WIN} samples of a given symbol to the end of that symbol. However, to comply with the IEEE^{®} 802.11g standard, for example, the operation cannot arbitrarily lengthen the symbol. Instead, the cyclic suffix must overlap in time and is effectively summed with the cyclic prefix of the following symbol. The operation applies two, mathematically inverse, windows in this overlapped segment. The first raised cosine window applies to the cyclic suffix of symbol k and decreases from 1 to 0 over its duration. The second raised cosine window applies 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:
$$w(t)=\{\begin{array}{l}1,\text{\hspace{0.17em}}\text{}0\le \leftt\right<T\frac{{T}_{W}}{2}\\ \frac{1}{2}\left\{1+\mathrm{cos}\left[\frac{\pi}{{T}_{W}}\left(\leftt\right\left(T\frac{{T}_{W}}{2}\right)\right)\right]\right\},\text{}T\frac{{T}_{W}}{2}\le \leftt\right\le T+\frac{{T}_{W}}{2}\\ 0,\text{}\text{otherwise}\end{array}$$
where:
T is the OFDM symbol duration including the guard interval.
T_{W} is the duration of the window.
Adjust the length of the cyclic suffix by setting the window length, 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 because of reduced redundancy in the guard band due to guard band sample values changes to implement intersymbol transition smoothing.
These figures display the application of raised cosine windowing.
References
[1] Dahlman, E., S. Parkvall, and J. Skold. 4G LTE/LTEAdvanced 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.
[3] Agilent Technologies, Inc., "OFDM Raised Cosine Windowing", https://rfmw.em.keysight.com/wireless/helpfiles/n7617a/ofdm_raised_cosine_windowing.htm.
[4] Montreuil, L., R. Prodan, and T. Kolze. "OFDM TX Symbol Shaping 802.3bn", https://www.ieee802.org/3/bn/public/jan13/montreuil_01a_0113.pdf. Broadcom, 2013.
[5] IEEE Standard 802.162017. "Part 16: Air Interface for Broadband Wireless Access Systems." March 2018.
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.
Version History
Introduced in R2014aR2023a: Adds support for oversampling
OFDM Modulator Baseband
now supports oversampling.
See Also
Blocks
Objects
Functions
MATLAB 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
 América Latina (Español)
 Canada (English)
 United States (English)
Europe
 Belgium (English)
 Denmark (English)
 Deutschland (Deutsch)
 España (Español)
 Finland (English)
 France (Français)
 Ireland (English)
 Italia (Italiano)
 Luxembourg (English)
 Netherlands (English)
 Norway (English)
 Österreich (Deutsch)
 Portugal (English)
 Sweden (English)
 Switzerland
 United Kingdom (English)