Main Content

nrOFDMInfo

Get OFDM information

Description

example

info = nrOFDMInfo(carrier) provides dimensional information relevant to orthogonal frequency-division multiplexing (OFDM) modulation for the specified carrier configuration parameters.

info = nrOFDMInfo(nrb,scs) provides OFDM information for nrb, the specified number of resource blocks, and subcarrier spacing scs.

example

info = nrOFDMInfo(nrb,scs,'cyclicPrefix',cpl) specifies cyclic prefix length cpl in addition to the input arguments from the previous syntax.

example

info = nrOFDMInfo(___,Name,Value) specifies options by using one or more name-value pair arguments in addition to any combination of input arguments from the previous syntaxes.

Examples

collapse all

Generate a waveform by performing OFDM modulation of a resource array that contains sounding reference signals (SRSs). The resource array spans an entire frame.

Set carrier configuration parameters, specifying a subcarrier spacing of 30 kHz and 24 resource blocks (RBs) in the carrier resource array.

carrier = nrCarrierConfig('SubcarrierSpacing',30,'NSizeGrid',24);

Configure SRS parameters, setting the slot periodicity to 2 and the offset to zero.

srs = nrSRSConfig('SRSPeriod',[2 0]);

Get OFDM information for the specified carrier configuration.

info = nrOFDMInfo(carrier);

Produce the frame resource array by creating and concatenating individual slot resource arrays.

grid = [];
for nslot = 0:(info.SlotsPerFrame - 1)
    carrier.NSlot = nslot;
    slotGrid = nrResourceGrid(carrier);
    ind = nrSRSIndices(carrier,srs);
    sym = nrSRS(carrier,srs);
    slotGrid(ind) = sym;
    grid = [grid slotGrid];
end

Perform OFDM modulation on the resource array for the specified carrier configuration.

[waveform,info] = nrOFDMModulate(carrier,grid);

Set carrier configuration parameters, specifying a subcarrier spacing of 60 kHz and extended cyclic prefix.

scs = 60;
cpl = 'Extended';

Set the number of resource blocks to 150.

Generate and display OFDM information.

nrb = 150;
info = nrOFDMInfo(nrb,scs,'CyclicPrefix',cpl)
info = struct with fields:
                   Nfft: 4096
             SampleRate: 245760000
    CyclicPrefixLengths: [1x48 double]
          SymbolLengths: [1x48 double]
              Windowing: 116
           SymbolPhases: [1x48 double]
         SymbolsPerSlot: 12
       SlotsPerSubframe: 4
          SlotsPerFrame: 40

Set carrier configuration parameters, specifying 106 RBs in the carrier resource array.

carrier = nrCarrierConfig('NSizeGrid',106);

Generate and display OFDM information for the specified sample rate.

sr = 1e8;
info = nrOFDMInfo(carrier,'SampleRate',sr)
info = struct with fields:
                   Nfft: 3200
             SampleRate: 100000000
    CyclicPrefixLengths: [1x14 double]
          SymbolLengths: [1x14 double]
              Windowing: 112
           SymbolPhases: [0 0 0 0 0 0 0 0 0 0 0 0 0 0]
         SymbolsPerSlot: 14
       SlotsPerSubframe: 1
          SlotsPerFrame: 10

Input Arguments

collapse all

Carrier configuration parameters for a specific OFDM numerology, specified as an nrCarrierConfig object. The function uses only these properties of this input.

Number of RBs in the carrier resource grid, specified as an integer from 1 to 275. The default value of 52 corresponds to the maximum number of RBs of a 10 MHz carrier with 15 kHz SCS.

Data Types: double

Subcarrier spacing in kHz, for all channels and reference signals of the carrier, specified as 15, 30, 60, 120, or 240.

Data Types: double

Cyclic prefix length, specified as one of these options.

  • 'normal' — Use this value to specify normal cyclic prefix. This option corresponds to 14 OFDM symbols in a slot.

  • 'extended' — Use this value to specify extended cyclic prefix. This option corresponds to 12 OFDM symbols in a slot. For the numerologies specified in TS 38.211 Section 4.2, extended cyclic prefix length applies for only 60 kHz subcarrier spacing.

Data Types: char | string

Number of resource blocks, specified as an integer from 1 to 275.

Data Types: double

Subcarrier spacing, in kHz, specified as 15, 30, 60, 120, or 240.

Data Types: double

Cyclic prefix length, specified as one of these options:

  • 'normal' — Use this value to specify normal cyclic prefix. This option corresponds to 14 OFDM symbols in a slot.

  • 'extended' — Use this value to specify extended cyclic prefix. This option corresponds to 12 OFDM symbols in a slot. For the numerologies specified in TS 38.211 Section 4.2, the extended cyclic prefix length only applies to 60 kHz subcarrier spacing.

Data Types: char | string

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: 'SampleRate','1e9' specifies a sample rate of 1×109 Hz.

Number of fast Fourier transform (FFT) points, specified as the comma-separated pair consisting of 'Nfft' and either a nonnegative integer greater than 127, or []. The value you specify must result in integer-valued cyclic prefix lengths and a maximum occupancy, defined as the value of (12 × NRB)/Nfft, where NRB is the number of resource blocks, of 100%.

If you do not specify this input, or if you specify 'Nfft',[], the function sets a default value satisfying these conditions.

  • The value of this input is an integer power of 2.

  • The maximum occupancy is 85%.

  • The minimum value of this input is 128.

Data Types: double

Waveform sample rate, specified as the comma-separated pair consisting of 'SampleRate' and either a positive scalar or [].

If you do not specify this input, or if you specify 'SampleRate',[], then the function sets this input to the value of Nfft × SCS.

  • Nfft is the value of the 'Nfft' input.

  • SCS is the subcarrier spacing specified in the SubcarrierSpacing property of the config input for the first function syntax, or the scs input for the other syntaxes.

Data Types: double

Number of time-domain samples over which the function applies raised cosine windowing and overlapping of OFDM symbols, specified as the comma-separated pair consisting of 'Windowing' and either a nonnegative integer or [].

If you do not specify this input, or if you specify 'Windowing',[], the function sets this input to the maximum value E that does not impact error vector magnitude (EVM) tests, as specified in Annexes F.5.3 and F.5.4 of TS 38.101-1 [1], Annexes F.5.3 and F.5.4 of TS 38.101-2, [2], and Annexes B.5.2 and C.5.2 of TS 38.104 [3]. E is equal to value of floor((NCPW) × info.NfftNFFT, nominal), where NCP, W, and NFFT, nominal are the values in the table columns labeled "Cyclic prefix length", "EVM window length", and "FFT size", respectively.

Data Types: double

Carrier frequency, in Hz, specified as the comma-separated pair consisting of 'CarrierFrequency' and a nonnegative scalar. This input corresponds to f0, defined in Section 5.4 of [4].

Data Types: double

Output Arguments

collapse all

OFDM information, returned as a structure containing these fields.

FieldsValuesDescription
NfftPositive integerNumber of FFT points
SampleRatePositive scalarWaveform sample rate
CyclicPrefixLengths1-by-N vector of positive integers, where N is the number of OFDM symbols in a subframe.Cyclic prefix lengths of each OFDM symbol, in samples
SymbolLengths1-by-N vector of positive integersOFDM symbol lengths, in samples
WindowingPositive integerNumber of time-domain samples over which the function applies raised cosine windowing and overlapping of OFDM symbols
SymbolPhases1-by-N vector of numbers in the interval [-π, π]

Phase compensation of each OFDM symbol, in radians

The nrOFDMModulate function applies this compensation during modulation to account for phase terms per OFDM symbol, as specified in Section 5.4 of [4]. The nrOFDMDemodulate function inverts this phase compensation during demodulation.

SymbolsPerSlotPositive integerNumber of OFDM symbols in a slot
SlotsPerSubframePositive integerNumber of slots in a 1 ms subframe
SlotsPerFramePositive integerNumber of slots in a 10 ms frame

Data Types: struct

References

[1] 3GPP TS 38.101-1. “NR; User Equipment (UE) radio transmission and reception; Part 1: Range 1 Standalone.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.

[2] 3GPP TS 38.101-2. “NR; User Equipment (UE) radio transmission and reception; Part 2: Range 2 Standalone.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.

[3] 3GPP TS 38.104. “NR; Base Station (BS) radio transmission and reception.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.

[4] 3GPP TS 38.211. “NR; Physical channels and modulation.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.

Extended Capabilities

Introduced in R2020b