lteULPrecode
SC-FDMA precoding
Description
performs SC-FDMA precoding of the complex modulation symbols out
= lteULPrecode(in
,n
,resourceType
)in
for PUSCH or NPUSCH configuration with a bandwidth of n
resource blocks or subcarriers.
Examples
Perform SC-FDMA Precoding on Complex Modulation Symbols
UL precoding is a step in the PUSCH processing chain. The chain includes scrambling, symbol mapping, UL precoding, RE mapping, and SC-FDMA modulation.
Create a UE-specific configuration structure, get PUSCH indices, and generate a bit stream sized according to configuration structure.
ue = lteRMCUL('A3-2');
[puschInd, info] = ltePUSCHIndices(ue,ue.PUSCH);
ueDim = lteULResourceGridSize(ue);
bits = randi([0,1],info.G,ue.PUSCH.NLayers);
Perform scrambling, symbol modulation, and UL precoding.
scrBits = lteULScramble(ue,bits); symbols = lteSymbolModulate(scrBits,ue.PUSCH.Modulation); precodedSymbols = lteULPrecode(symbols,ue.NULRB);
Generate resource mapping grid, populate the grid with the precoded symbols, and perform SC-FDMA modulation.
grid = lteULResourceGrid(ue); grid(puschInd) = precodedSymbols; [timeDomainSig,infoScfdma] = lteSCFDMAModulate(ue,grid);
Three-Tone NB-IoT Uplink SC-FDMA Processing Chain
Generate an SC-FDMA modulated waveform for a three-tone NB-IoT uplink configuration by applying the SC-FDMA processing chain, comprising symbol mapping, UL precoding, and SC-FDMA modulation.
Specify an NB-IoT configuration with ten slots and a subcarrier spacing of 15 kHz.
NSlots = 10;
ue.NBULSubcarrierSpacing = '15kHz';
Set the subcarrier locations and generate random bits for transmission.
chs.NBULSubcarrierSet = 0:2; bits = randi([0,1],7*NSlots*length(chs.NBULSubcarrierSet)*2,1);
Perform symbol modulation and generate precoded symbols.
symbols = lteSymbolModulate(bits,'QPSK'); precodedSymbols = lteULPrecode(symbols,length(chs.NBULSubcarrierSet),'Subcarrier');
Generate the narrowband resource array
grid = repmat(lteNBResourceGrid(ue),1,NSlots); grid(chs.NBULSubcarrierSet + 1,:) = reshape(precodedSymbols,length(chs.NBULSubcarrierSet),7*NSlots);
Generate the SC-FDMA modulated waveform for the specified configuration and display its size.
waveform = lteSCFDMAModulate(ue,chs,grid); size(waveform)
ans = 1×2
9600 1
Single-Tone NB-IoT Uplink SC-FDMA Processing Chain
Generate an SC-FDMA modulated waveform for a single-tone NB-IoT uplink configuration by applying the SC-FDMA processing chain, comprising symbol mapping, UL precoding, and SC-FDMA modulation.
Specify an NB-IoT configuration with 16 slots and a subcarrier spacing of 3.75 kHz.
NSlots = 16;
ue.NBULSubcarrierSpacing = '3.75kHz';
Specify the channel transmission configuration.
chs = struct('NULSlots',4,'NRU',1,'NRep',4,'SlotIdx',0, ... 'Modulation','BPSK','NBULSubcarrierSet',41);
Generate random bits for transmission, perform symbol modulation, and generate precoded symbols.
bits = randi([0,1],7*NSlots*length(chs.NBULSubcarrierSet),1);
symbols = lteSymbolModulate(bits,chs.Modulation);
precodedSymbols = lteULPrecode(symbols,length(chs.NBULSubcarrierSet),'Subcarrier');
Generate the narrowband resource array
grid = repmat(lteNBResourceGrid(ue),1,NSlots); grid(chs.NBULSubcarrierSet+1,:) = reshape(precodedSymbols,length(chs.NBULSubcarrierSet),7*NSlots);
Generate the SC-FDMA modulated waveform for the specified configuration and display its size.
waveform = lteSCFDMAModulate(ue,chs,grid); size(waveform)
ans = 1×2
61440 1
Input Arguments
in
— Complex modulation symbols
complex-valued matrix
Complex modulation symbols, specified as an NSym-by-NL complex-valued matrix. NSym is the number of symbols and NL is the number of layers.
Data Types: double
Complex Number Support: Yes
nrb
— Number of resource blocks
nonnegative integer
Number of resource blocks, specified as a nonnegative integer.
Data Types: double
n
— Number of resource blocks or subcarriers
nonnegative integer
Number of resource blocks or subcarriers, specified as a nonnegative integer.
Dependencies
If the resourceType
input is
'PRB'
, then n
is the number
of resource blocks. If the resourceType
is
'Subcarrier'
, then n
is the
number of subcarriers.
Data Types: double
resourceType
— Resource type
'PRB'
| 'Subcarrier'
Resource type, specified as 'PRB'
or
'Subcarrier'
.
Data Types: char
| string
Output Arguments
out
— Precoded PUSCH symbols
complex-valued matrix
Precoded PUSCH symbols, returned as an NSym-by-NL complex-valued matrix. NSym is the number of symbols, and NL is the number of layers.
The dimension and size of the input and output symbol matrices are the same.
Data Types: double
Complex Number Support: Yes
Version History
Introduced in R2014a
See Also
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.
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)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)