Main Content

OFDM Modulator

Modulate frequency-domain OFDM subcarriers to time-domain samples for custom communication protocols

Since R2020a

  • OFDM Modulator block

Libraries:
Wireless HDL Toolbox / Modulation

Description

The OFDM Modulator block modulates frequency-domain orthogonal frequency division multiplexing (OFDM) subcarriers to time-domain samples based on the OFDM parameters. The block supports 5G new radio (NR) standard, long term evolution (LTE) [1], wireless local area network (WLAN 802.11a/g/n/ac) [2], WiMAX, digital video broadcast (DVB), and digital audio broadcast (DAB) standards.

The block accepts input data along with a valid control signal and these OFDM parameters: FFT length, CP length, and the number of right and left guard subcarriers. The block outputs modulated data along with valid and ready controls signals. The block samples the corresponding OFDM parameters only when the ready port is 1 (high) and when the first valid port of each OFDM symbol is 1 (high).

The block supports scalar and vector inputs. You can use a vector input to increase the data throughput and achieve a giga-sample-per-second (GSPS) throughput. The block supports windowing for scalar and vector inputs to reduce the spectral regrowth, or adjacent channel leakage ratio (ACLR), of an OFDM signal. The block provides an interface and architecture suitable for HDL code generation and hardware deployment.

Examples

Ports

Input

expand all

Input data, specified as a scalar or column vector of real or complex values. The vector size must be a power of 2 and in the range from 1 to 64, and less than or equal to the FFT length. For more information on how to specify vector inputs, see Specifying Vector Input.

The software supports double and single data types for simulation, but not for HDL code generation.

Data Types: single | double | int8 | int16 | int32 | signed fixed point
Complex Number Support: Yes

Indicates valid input data, specified as a scalar.

This port is a control signal that indicates when the sample from the data input port is valid. When this value is 1, the block captures the values on the data input port. When this value is 0, the block ignores the values on the data input port.

Data Types: Boolean

Length of the FFT, specified as a scalar. The FFT length must be power of 2 and in the range from 8 to 65,536. This value must be less than or equal to the Maximum FFT length parameter value.

To support the minimum FFT length of 8, the FFTLen data type must be fixdt(0,k,0), where k is greater than or equal to 4.

Dependencies

To enable this port, set the OFDM parameters source parameter to Input port.

Data Types: single | double | uint8 | uint16 | uint32 | unsigned fixed point

Length of the cyclic prefix, specified as a scalar in the range from 0 to FFTLen.

To support the minimum FFT length of 8, the CPLen data type must be fixdt(0,k,0), where k is greater than or equal to 4.

Dependencies

To enable this port, set the OFDM parameters source parameter to Input port.

Data Types: single | double | uint8 | uint16 | uint32 | unsigned fixed point

Number of left guard carriers of the OFDM symbol, specified as a scalar in the range from 0 to (FFTLen/2) – 1.

To support the minimum FFT length of 8, the numLgSc data type must be fixdt(0,k,0), where k is greater than or equal to 2.

Dependencies

To enable this port, set the OFDM parameters source parameter to Input port.

Data Types: single | double | uint8 | uint16 | uint32 | unsigned fixed point

Number of right guard carriers of the OFDM symbol, specified as a scalar in the range from 0 to (FFTLen/2) – 1.

To support the minimum FFT length of 8, the numRgSc data type must be fixdt(0,k,0), where k is greater than or equal to 2.

Dependencies

To enable this port, set the OFDM parameters source parameter to Input port.

Data Types: single | double | uint8 | uint16 | uint32 | unsigned fixed point

Clear internal states, specified as a Boolean scalar. When this value is 1, the block stops the current calculation and clears all internal states.

Dependencies

To enable this port, select the Enable reset input port parameter.

Data Types: Boolean

Length of the window for overlap-adding of adjacent OFDM symbols, specified as a scalar in the range from 1 to Maximum window length.

Dependencies

To enable this port, set the OFDM parameters source parameter to Input port.

Data Types: single | double | uint8 | uint16 | uint32 | unsigned fixed point

Output

expand all

Modulated output data, returned as a complex-valued scalar or a column vector. The data type of the output is dependent on the data type of the input data port.

  • When you set the OFDM parameters source parameter to Property and clear the Divide butterfly outputs by two parameter, the output word length increases by log2(FFT length) bits.

  • When you set the OFDM parameters source parameter to Input port and clear the Divide butterfly outputs by two parameter, the output word length increases by log2(Maximum FFT length) bits.

To avoid overflow, select the Divide butterfly outputs by two parameter.

Data Types: single | double | int8 | int16 | int32 | signed fixed point
Complex Number Support: Yes

Indicates valid output data, returned as a scalar.

This port is a control signal that indicates when the data output port is valid. The block sets this value to 1 when the data samples are available on the data output port.

Data Types: Boolean

Indicates block is ready, returned as a scalar.

This is a control signal that indicates when the block is ready for new input data. When this value is 1, the block accepts input data in the next time step. When this value is 0, the block ignores input data in the next time step.

Data Types: Boolean

Parameters

expand all

Main

You can set OFDM parameters with an input port or by selecting a value for the parameter.

Select Property to enable the FFT length, Cyclic prefix length, Number of left guard subcarriers, and Number of right guard subcarriers parameters.

Select Input port to enable the FFTLen, CPLen, numLgSc, and numRgSc input ports and the Maximum FFT length parameter. The Maximum FFT length parameter sets the upper bound of the range of valid values for the FFTLen input port.

Specify the maximum length of the FFT.

Dependencies

To enable this parameter, set the OFDM parameters source parameter to Input port.

Specify the FFT length.

When you set the OFDM parameters source parameter to Property, the block uses the FFT length value as the maximum FFT length.

Dependencies

To enable this parameter, set the OFDM parameters source parameter to Property.

Specify the length of the cyclic prefix.

Dependencies

To enable this parameter, set the OFDM parameters source parameter to Property.

Specify the number of left guard subcarriers.

Dependencies

To enable this parameter, set the OFDM parameters source parameter to Property.

Specify the number of right guard subcarriers.

Dependencies

To enable this parameter, set the OFDM parameters source parameter to Property.

Select this parameter to insert a null on the DC subcarrier.

Select this parameter to enable the reset input port.

Select this parameter to perform a windowing operation that reduces spectral growth based on the specified window length. Clear this parameter to disable the windowing operation. For more information about windowing, see Windowing.

Specify the window length to overlap-add adjacent OFDM symbols.

Dependencies

To enable this parameter, set the OFDM parameters source parameter to Property and select the Windowing parameter.

Specify the maximum window length.

Dependencies

To enable this parameter, set the OFDM parameters source parameter to Input port and select the Windowing parameter.

IFFT Parameters

This parameter controls the scaling option of the IFFT block inside the OFDM Modulator block.

When you select this parameter, the FFT implements an overall 1/N scale factor by dividing the output of each butterfly multiplication by two. This adjustment keeps the output of the IFFT in the same amplitude range as its input. If you clear this parameter, the block avoids overflow by increasing the word length by one bit after each butterfly multiplication.

This parameter specifies the type of rounding mode for internal fixed-point calculations. For more information about rounding modes, see Rounding Modes. When the input is any integer data type or fixed-point data type, the FFT algorithm uses fixed-point arithmetic for internal calculations. This parameter does not apply when the input is of data type single or double. Rounding applies to twiddle-factor multiplication and scaling operations.

More About

expand all

Algorithms

expand all

The OFDM Modulator block operation sequence is implemented using these blocks: Ready Generator, Symbol Formation, Sample Repeater, IFFT, FFT Shifter, Down Sampler, CP Addition, and Windowing. The windowing feature is supported for scalar and vector inputs. The parameters shown in this figure configure the behavior of the block.

OFDM Modulator Block Diagram

References

[1] 3GPP TS 36.211 version 14.2.0 Release 14. "Physical channels and modulation." LTE - Evolved Universal Terrestrial Radio Access (E-UTRA).

[2] "Wireless LAN Medium Access Control (MAC) and Physical layer (PHY) Specifications." IEEE Std 802.11 – 2012.

[3] Stefania Sesia, Issam Toufik, and Matthew baker. LTE - THE UMTS Long Term Evolution from theory to practice.

[4] Erik Dahlman, Stefan Parkvall, and Johan Skold. 4G - LTE/LTE - Advanced for Mobile broadband Second edition.

Extended Capabilities

Version History

Introduced in R2020a