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 the specified number of resource blocks,nrb, and subcarrier spacingscs.

example

info= nrOFDMInfo(___,Name,Value)specifies options by using one or more name-value pair arguments in addition to the input arguments in any of 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 to2and 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 = [];fornslot = 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 to150.

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 annrCarrierConfigobject. Only these object properties are relevant for this function.

Number of RBs in the carrier resource grid, specified as an integer from 1 to 275. The default value of52corresponds 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 as15,30,60,120, or240.

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 as15,30,60,120, or240.

Data Types:double

Name-Value Pair Arguments

Specify optional comma-separated pairs ofName,Valuearguments.Nameis the argument name andValueis the corresponding value.Name必须出现在引号。你可以specify several name and value pair arguments in any order asName1,Value1,...,NameN,ValueN.

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

Cyclic prefix length, specified as the comma-separated pair consisting of'CyclicPrefix'and one of these values:

  • ' 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.

Note

If you specify thecarrierinput, use theCyclicPrefixproperty of thecarrierinput to specify the cyclic prefix length. You cannot use this name-value pair argument together with thecarrierinput.

Data Types:char|string

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

If you do not specify this input, or if you specify'Nfft',[], the function sets an integer value greater than 127 as a default value for this input. The actual default value depends on other input values.

  • If you do not specify theSampleRateinput, or if you specify'SampleRate',[], the function setsNfftsatisfying these conditions.

    • Nfftis an integer power of 2.

    • Nfftresults in a maximum occupancy of 85%.

  • If you specify theSampleRateinput, the function setsNfftsatisfying these conditions.

    • Nfftresults in integer-valued cyclic prefix lengths.

    • Nfftmaximises the value ofgcd(Nfft×SCS,SampleRate), whereSCSis specified by thecarrier.SubcarrierSpacingproperty or thescsinput.

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 ofNfft×SCS.

  • Nfftis the value of the'Nfft'input.

  • SCSis the subcarrier spacing. Depending on the function syntax you use,SCSis specified by thecarrier.SubcarrierSpacingproperty or thescsinput.

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 valueEthat does not impact error vector magnitude (EVM) tests, as specified in TS 38.101-1 Annexes F.5.3 and F.5.4, TS 38.101-2 Annexes F.5.3 and F.5.4, and TS 38.104 Annexes B.5.2 and C.5.2.Eis equal to value offloor((NCPW) ×info.NfftNFFT, nominal), whereNCP,W, andNFFT, nominalare 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'和一个real number. This input corresponds tof0, defined in TS 38.211 Section 5.4.

Data Types:double

Output Arguments

collapse all

OFDM information, returned as a structure containing these fields.

Fields Values Description
Nfft Positive integer Number of FFT points
SampleRate Positive scalar Waveform sample rate
CyclicPrefixLengths 1-by-Nvector of positive integers, whereNis the number of OFDM symbols in a subframe. Cyclic prefix lengths of each OFDM symbol, in samples
SymbolLengths 1-by-Nvector of positive integers OFDM symbol lengths, in samples
Windowing Positive integer Number of time-domain samples over which the function applies raised cosine windowing and overlapping of OFDM symbols
SymbolPhases 1-by-Nvector of numbers in the interval [-π, π]

Phase compensation of each OFDM symbol, in radians

ThenrOFDMModulatefunction applies this compensation during modulation to account for phase terms per OFDM symbol, as specified in TS 38.211 Section 5.4[4]. ThenrOFDMDemodulatefunction inverts this phase compensation during demodulation.

SymbolsPerSlot Positive integer Number of OFDM symbols in a slot
SlotsPerSubframe Positive integer Number of slots in a 1 ms subframe
SlotsPerFrame Positive integer Number 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