nrOFDMInfo
Get OFDM information
Description
specifies options by using one or more name-value pair arguments in addition to the input
arguments in any of the previous syntaxes.info = nrOFDMInfo(___,Name,Value)
Examples
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: [1024 1024 1024 1024 1024 1024 1024 1024 1024 1024 1024 1024 1024 1024 1024 1024 1024 1024 1024 1024 1024 1024 1024 1024 1024 1024 1024 1024 1024 1024 1024 1024 1024 1024 1024 1024 1024 1024 1024 1024 1024 1024 … ] (1×48 double)
SymbolLengths: [5120 5120 5120 5120 5120 5120 5120 5120 5120 5120 5120 5120 5120 5120 5120 5120 5120 5120 5120 5120 5120 5120 5120 5120 5120 5120 5120 5120 5120 5120 5120 5120 5120 5120 5120 5120 5120 5120 5120 5120 5120 5120 … ] (1×48 double)
Windowing: 116
SymbolPhases: [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
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: [250 225 225 225 225 225 225 250 225 225 225 225 225 225]
SymbolLengths: [3450 3425 3425 3425 3425 3425 3425 3450 3425 3425 3425 3425 3425 3425]
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
Carrier configuration parameters for a specific OFDM numerology, specified as an
nrCarrierConfig object. Only
these object properties are relevant for this function.
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, 240,
480, or 960.
Data Types: double
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN, where Name is
the argument name and Value is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Before R2021a, use commas to separate each name and value, and enclose
Name in quotes.
Example: 'SampleRate','1e9' specifies a sample rate of
1×109 Hz.
Cyclic prefix length, specified as 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 the carrier input, use the
CyclicPrefix property of the carrier
input to specify the cyclic prefix length. You cannot use this name-value pair
argument together with the carrier input.
Data Types: char | string
Number of fast Fourier transform (FFT) points, specified as the comma-separated pair
consisting of 'Nfft' and a 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, where NRB is 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 the
SampleRateinput, 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 the
SampleRateinput, the function setsNfftsatisfying these conditions.
For more information, see Configure OFDM Sample Rate and FFT Size.
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.
For more information, see Configure OFDM Sample Rate and FFT Size.
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 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.
E is equal to value of
floor((NCP −
W) ×
info.Nfft
⁄ NFFT, 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 real number. This input corresponds to
f0, defined in TS 38.211 Section
5.4.
Data Types: double
Output Arguments
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-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 |
SymbolLengths | 1-by-N vector 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-N vector of numbers in the interval [-π, π] | Phase compensation of each OFDM symbol, in radians The
|
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 |
Note
The number of samples in the CyclicPrefixLengths, SymbolLengths, and Windowing structure fields apply to the sample rate of the IFFT of size Nfft that is used during OFDM symbol construction. However, the IFFT sample rate can differ from the waveform sample rate when the SampleRate name-value argument specifies an arbitrary sample rate.
For more information on these fields, see the Use Custom OFDM Sample Rate and Custom FFT Size example.
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
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Version History
Introduced in R2020bThe function now supports 480 kHz and 960 kHz subcarrier spacings, as defined in TS 38.211 Sections 4.2 and 4.3.
For C/C++ code generation, the limitation to input arguments as compile-time constants has been removed.
See Also
Functions
Objects
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Seleziona un sito web
Seleziona un sito web per visualizzare contenuto tradotto dove disponibile e vedere eventi e offerte locali. In base alla tua area geografica, ti consigliamo di selezionare: .
Puoi anche selezionare un sito web dal seguente elenco:
Come ottenere le migliori prestazioni del sito
Per ottenere le migliori prestazioni del sito, seleziona il sito cinese (in cinese o in inglese). I siti MathWorks per gli altri paesi non sono ottimizzati per essere visitati dalla tua area geografica.
Americhe
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- 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)