After further research, i figured out this is a duplicate of https://de.mathworks.com/matlabcentral/answers/509573-5g-toolbox-example-downlink-control-processing-and-procedures?s_tid=srchtitle. I have also found an answer to the question and posted it into the linked post.
Interleaving and symbol ordering in 5G toolbox nrResourceGrid
9 views (last 30 days)
Show older comments
Hello,
i have a question regarding the Matlab 5G toolbox example on Downlink Control Processing and Procedures (https://de.mathworks.com/help/5g/ug/downlink-control-processing-and-procedures.html). Conretely, i am interested in where the interleaving configured in the CORESET is done. My expectation would be that the ind bits generated from nrPDCCHResources would represent the interleaver pattern, nevertheless, they simply represent the indices of the grid symbols belonging to the PDCCH payload in an ordered way. The DCI-Encoding and PDCCH symbol generation is not given any information w.r.t. interleaving, so i think interleaving cannot be done there. When looking at the code for modulation and wave form generation, i also could not find a line of code where interleaving could occur.
Finally, i compared the resource grid generated from an interleaved CORESET and one generated from an uniterleaved CORESET, resulting in similar grids:
rng(111); % Set RNG state for repeatability
% Carrier configuration
carrier = nrCarrierConfig;
carrier.NCellID = 2; % Cell identity
carrier.SubcarrierSpacing = 30; % Carrier/BWP Subcarrier spacing
carrier.CyclicPrefix = 'normal'; % Cyclic prefix
carrier.NSlot = 0; % Slot counter
carrier.NFrame = 0; % Frame counter
carrier.NStartGrid = 10; % Carrier offset
carrier.NSizeGrid = 48; % Size of carrier in RB
% CORESET configuration
coreset = nrCORESETConfig;
coreset.CORESETID = 1; % CORESET ID (0...11)
coreset.FrequencyResources = ones(1,4); % 6 RB sized
coreset.Duration = 1; % CORESET symbol duration (1,2,3)
coreset.CCEREGMapping = 'interleaved'; % CORESET Mapping
coreset.REGBundleSize = 2; % L (2,6) or (3,6)
coreset.InterleaverSize = 2; % R (2,3,6)
coreset.ShiftIndex = carrier.NCellID; % default to NCellID
% Search space configuration
ss = nrSearchSpaceConfig;
ss.CORESETID = 1; % Associated CORESET ID (0...11)
ss.SearchSpaceType = 'ue'; % 'ue', 'common'
ss.StartSymbolWithinSlot = 0; % Starting symbol in slot
ss.SlotPeriodAndOffset = [1 0]; % Search space period and offset
ss.Duration = 1; % Search space duration in slots
ss.NumCandidates = [4 2 1 0 0]; % For (1,2,4,8,16) levels respectively
% PDCCH configuration
pdcch = nrPDCCHConfig;
pdcch.NStartBWP = 10; % BWP offset wrt CRB 0
pdcch.NSizeBWP = 48; % Size of BWP in resource blocks
pdcch.CORESET = coreset; % Associated CORESET
pdcch.SearchSpace = ss; % Associated SearchSpace
pdcch.RNTI = 1; % C-RNTI
pdcch.DMRSScramblingID = []; % Use carrier.NCellID instead
pdcch.AggregationLevel = 4; % Number of CCEs in PDCCH (1,2,4,8,16)
pdcch.AllocatedCandidate = 1; % 1-based scalar
% Number of bits for PDCCH resources and actual indices
[ind,dmrs,dmrsInd] = nrPDCCHResources(carrier,pdcch);
E = 2*numel(ind);
K = 64; % Number of DCI message bits
dciBits = randi([0 1],K,1,'int8');
dciCW = nrDCIEncode(dciBits,pdcch.RNTI,E);
if isempty(pdcch.DMRSScramblingID)
nID = carrier.NCellID;
else
nID = pdcch.DMRSScramblingID;
end
sym = nrPDCCH(dciCW,nID,pdcch.RNTI);
carrierGrid = nrResourceGrid(carrier);
carrierGrid(ind) = sym; % PDCCH symbols
carrierGrid(dmrsInd) = dmrs; % PDCCH DM-RS
% CORESET configuration (noninterleaved)
coreset2 = nrCORESETConfig;
coreset2.CORESETID = 1; % CORESET ID (0...11)
coreset2.FrequencyResources = ones(1,4); % 6 RB sized
coreset2.Duration = 1; % CORESET symbol duration (1,2,3)
coreset2.CCEREGMapping = 'noninterleaved'; % CORESET Mapping
% PDCCH configuration noninterleaved
pdcch2 = nrPDCCHConfig;
pdcch2.NStartBWP = 10; % BWP offset wrt CRB 0
pdcch2.NSizeBWP = 48; % Size of BWP in resource blocks
pdcch2.CORESET = coreset2; % Associated CORESET
pdcch2.SearchSpace = ss; % Associated SearchSpace
pdcch2.RNTI = 1; % C-RNTI
pdcch2.DMRSScramblingID = []; % Use carrier.NCellID instead
pdcch2.AggregationLevel = 4; % Number of CCEs in PDCCH (1,2,4,8,16)
pdcch2.AllocatedCandidate = 1; % 1-based scalar
[ind,dmrs,dmrsInd] = nrPDCCHResources(carrier,pdcch2);
E = 2*numel(ind);
dciCW = nrDCIEncode(dciBits,pdcch2.RNTI,E);
if isempty(pdcch2.DMRSScramblingID)
nID = carrier.NCellID;
else
nID = pdcch2.DMRSScramblingID;
end
sym2 = nrPDCCH(dciCW,nID,pdcch2.RNTI);
carrierGrid2 = nrResourceGrid(carrier);
carrierGrid2(ind) = sym2; % PDCCH symbols
carrierGrid2(dmrsInd) = dmrs;
%compare carriergrids generated from interleaved and noninterleaved CORESET
all(carrierGrid == carrierGrid2)
which outputs that the carrierGrid and carrierGrid2 are identical, bringing me to the concluding question: where is the interleaving implemented in 5G Toolbox?
Another question of mine, related to the above question, is about the CCE-toREG mapping for a CORESET over multiple symbols. The behavior of the 5G toolbox is that the symbols of the CCEs are first mapped on all REs of the first symbol, than on all REs of the second symbols and finally on all REs of the third symbol. Nethertheless, TS 38.211, Section 7.3.2.2 says that the REG-bundles in a CORESET are numbered in a time-first manner, thus CCE-to-REG-mapping should be according to my understanding in a frequency-first manner which contraticts the above described behavior of 5G toolbox.
0 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Downlink Physical Channels in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!