3.3.3 DMRS time domain
The parameters involved in the time domain of DMRS are:
push.MappingType
pusch.FrequencyHopping
push.SymbolAllocation
pusch_dmrs.DMRSTypeAPosition
pusch_dmrs.DMRSLength
pusch_dmrs.DMRSAdditionalPosition
in,
pusch.MappingType determines the range of the first element S and the second element L of pusch.SymbolAllocation
Note that the starting symbol of PUS under Type A must start from 0. ! ! !
Next. The symbol position of DMRS is obtained from the above parameters by looking up the following table (these tables are all from TS38.211):
1)pusch_dmrs.DMRSLength=1 and pusch.FrequencyHopping! =’intraslot’ situation.
2) pusch_dmrs.DMRSLength=2 and pusch.FrequencyHopping! =’intraslot’ situation.
3) When pusch_dmrs.DMRSLength=1 and pusch.FrequencyHopping=intraslot’.
Parameter description in the table:
in the table
l
d
l_d
ld? is the length of the PUS continuous symbol, which refers to the continuous length of each hop during frequency hopping.
in the table
l
0
l_0
l0? Under MappingType=’A’, it is equal to pusch_dmrs.DMRSTypeAPosition, which is 2 or 3; under MappingType=’B’, it is 0.
in the table
l
 ̄
\overline{l}
l is the index of the symbol index of DMRS relative to PUS.
pos0,1,2,3 in the table are determined by pusch_dmrs.DMRSAdditionalPosition.
The example in this section is NR PUSCH Resource Allocation and DM-RS and PT-RS Reference Signals in the 5g toolbox in matlab R2023a
%%%%%% Example 1 clc;clear;close all; % Setup the carrier with 15 kHz subcarrier spacing and 10 MHz bandwidth carrier = nrCarrierConfig; carrier.SubcarrierSpacing = 15; carrier.CyclicPrefix = 'normal'; carrier.NSizeGrid = 52; carrier.NStartGrid = 0; % Configure the physical uplink shared channel parameters pusch = nrPUSCHConfig; pusch.NSizeBWP = []; % Empty implies that the value is equal to NSizeGrid pusch.NStartBWP = []; % Empty implies that the value is equal to NStartGrid pusch.PRBSet = 0:25; % Allocate half of the carrier bandwidth pusch.SymbolAllocation = [0 12]; % Symbol allocation [S L] pusch.MappingType = 'A'; % PUSCH mapping type ('A' or 'B') pusch.TransmissionScheme = 'nonCodebook'; % ('codebook' or 'nonCodebook') % The following parameters are applicable when TransmissionScheme is set % to 'codebook' pusch.NumAntennaPorts = 1; pusch.TPMI = 0; % Assign intra-slot frequency hopping for PUSCH pusch.FrequencyHopping = 'neither'; % 'neither', 'intraSlot', 'interSlot' pusch.SecondHopStartPRB = 26; % Set the parameters that control the time resources of DM-RS pusch.DMRS.DMRSTypeAPosition = 2; % 2 or 3 pusch.DMRS.DMRSLength = 1; % 1 or 2 (single-symbol or double-symbol) pusch.DMRS.DMRSAdditionalPosition = 1; % 0...3 (Number of additional DM-RS positions) % Set the parameters that control the frequency resources of DM-RS pusch.DMRS.DMRSConfigurationType = 1; % 1 or 2 pusch.DMRS.DMRSPortSet = 0; % Set the parameters that only control the DM-RS sequence generation pusch.DMRS.NIDNSCID = 1; % Use empty to set it to NCellID of the carrier pusch.DMRS.NSCID = 0; % 0 or 1 % Generate DM-RS symbols pusch.NumLayers = numel(pusch.DMRS.DMRSPortSet); dmrsSymbols = nrPUSCHDMRS(carrier,pusch); % Generate DM-RS indices dmrsIndices = nrPUSCHDMRSIndices(carrier,pusch); % Map the DM-RS symbols to the grid with the help of DM-RS indices if strcmpi(pusch.TransmissionScheme,'codebook') nports = pusch.NumAntennaPorts; else nports = pusch.NumLayers; end grid = zeros([12*carrier.NSizeGrid carrier.SymbolsPerSlot nports]); grid(dmrsIndices) = dmrsSymbols; figure imagesc(abs(grid(:,:,1))); axis xy; xlabel('OFDM Symbols'); ylabel('Subcarriers'); title('DM-RS Time-Frequency Locations');
%Key statements in the above code pusch.SymbolAllocation = [0 12]; pusch.MappingType = 'A'; pusch.FrequencyHopping = 'neither'; pusch.DMRS.DMRSTypeAPosition = 2; pusch.DMRS.DMRSLength = 1; push.DMRS.DMRSAdditionalPosition = 1;
pusch.FrequencyHopping = neither’; and pusch.DMRS.DMRSLength = 1; therefore the table to be queried is the above table.
pusch.SymbolAllocation = [0 12]; and pusch.MappingType = A’; Therefore, the content to be checked is in the left half of the table and corresponds to
l
d
l_d
ld?=12 this line.
pusch.DMRS.DMRSAdditionalPosition = 1; therefore corresponds to the column pos1
Therefore the DMRS index is
l
0
l_0
l0?,9; and because pusch.MappingType = A’; and pusch.DMRS.DMRSTypeAPosition = 2;
So the final DMRS index is 2,9
The index of the PUS symbol in the slot is 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
Therefore the index of DMRS is 2 + 0=0, 9 + 0=9.
Corresponds to the matlab simulation diagram.
%%%%%% Example 2 clc;clear;close all; % Setup the carrier with 15 kHz subcarrier spacing and 10 MHz bandwidth carrier = nrCarrierConfig; carrier.SubcarrierSpacing = 15; carrier.CyclicPrefix = 'normal'; carrier.NSizeGrid = 52; carrier.NStartGrid = 0; % Configure the physical uplink shared channel parameters pusch = nrPUSCHConfig; pusch.NSizeBWP = []; % Empty implies that the value is equal to NSizeGrid pusch.NStartBWP = []; % Empty implies that the value is equal to NStartGrid pusch.PRBSet = 0:25; % Allocate half of the carrier bandwidth pusch.SymbolAllocation = [0 12]; % Symbol allocation [S L] pusch.MappingType = 'A'; % PUSCH mapping type ('A' or 'B') pusch.TransmissionScheme = 'nonCodebook'; % ('codebook' or 'nonCodebook') % The following parameters are applicable when TransmissionScheme is set % to 'codebook' pusch.NumAntennaPorts = 1; pusch.TPMI = 0; % Assign intra-slot frequency hopping for PUSCH pusch.FrequencyHopping = 'intraslot'; % 'neither', 'intraSlot', 'interSlot' pusch.SecondHopStartPRB = 26; % Set the parameters that control the time resources of DM-RS pusch.DMRS.DMRSTypeAPosition = 2; % 2 or 3 pusch.DMRS.DMRSLength = 1; % 1 or 2 (single-symbol or double-symbol) pusch.DMRS.DMRSAdditionalPosition = 1; % 0...3 (Number of additional DM-RS positions) % Set the parameters that control the frequency resources of DM-RS pusch.DMRS.DMRSConfigurationType = 1; % 1 or 2 pusch.DMRS.DMRSPortSet = 0; % Set the parameters that only control the DM-RS sequence generation pusch.DMRS.NIDNSCID = 1; % Use empty to set it to NCellID of the carrier pusch.DMRS.NSCID = 0; % 0 or 1 % Generate DM-RS symbols pusch.NumLayers = numel(pusch.DMRS.DMRSPortSet); dmrsSymbols = nrPUSCHDMRS(carrier,pusch); % Generate DM-RS indices dmrsIndices = nrPUSCHDMRSIndices(carrier,pusch); % Map the DM-RS symbols to the grid with the help of DM-RS indices if strcmpi(pusch.TransmissionScheme,'codebook') nports = pusch.NumAntennaPorts; else nports = pusch.NumLayers; end grid = zeros([12*carrier.NSizeGrid carrier.SymbolsPerSlot nports]); grid(dmrsIndices) = dmrsSymbols; figure imagesc(abs(grid(:,:,1))); axis xy; xlabel('OFDM Symbols'); ylabel('Subcarriers'); title('DM-RS Time-Frequency Locations');
%Key statements in the above code pusch.SymbolAllocation = [0 12]; pusch.MappingType = 'A'; pusch.FrequencyHopping = 'intraslot'; pusch.DMRS.DMRSTypeAPosition = 2; pusch.DMRS.DMRSLength = 1; push.DMRS.DMRSAdditionalPosition = 1;
pusch.FrequencyHopping = intraslot’; and pusch.DMRS.DMRSLength = 1; so the table to be queried is the above table.
pusch.SymbolAllocation = [0 12]; and pusch.MappingType = A’; therefore, the content of the left half needs to be checked. The symbol lengths of the first hop and the second hop are both 12/2=6, so we need to check
l
d
l_d
ld?=5,6 this line.
pusch.DMRS.DMRSTypeAPosition = 2; and pusch.DMRS.DMRSAdditionalPosition = 1; therefore corresponding to the pos1 column
Therefore, the DMRS first hop index is 2, and the second hop index is 0, 4.
The index of the first hop symbol of PUS in the slot is 0, 1, 2, 3, 4, 5.
Therefore, the index of the first hop symbol of DMRS in the slot is 2 + 0=2.
The index of the second hop symbol of PUS in the slot is 6, 7, 8, 9, 10, 11
Therefore, the index of the second hop symbol of DMRS in the slot is 0 + 6=6, 4 + 6=10.
Corresponds to the matlab simulation diagram.