MATLAB Answers

Reserved PRB in PDSCH object from 5G toolbox not working

3 views (last 30 days)
I am trying to create a small script to generate 5G signals to transmit through an SDR device. My problem is related to the reservation of resources for sync signals. I generate the SSB grid and, then, I want to reserve the resource blocks corresponding to those symbols when generating the PDSCH indices and symbols. For that purpose, I create a nrPDSCHReservedConfig object with the subcarriers and symbol positions where the SSB is expected to be allocated, but this information is not considered when generating the indices of the other signals (nrPDSCHIndices). Could you provide me some feedback about the best way to do that?
Thank you very much.


Sriram Tadavarty
Sriram Tadavarty on 29 Apr 2020
Hi Christian
Can you please provide the script your tried with nrPDSCHIndices? So that it helps to know where the issue was. You can use the paperclip icon to attach the script.
Christian Ballesteros
Christian Ballesteros on 30 Apr 2020
Hi Sririam,
Basically, I try to create an SSB and insert it in the appropriate position in my OFDM grid. Then, nrPDSCHIndices should give me the shared channel indices without overlapping with the SSB. Attached you can find the MATLAB function I created to generate symbols for a random number of frames, but this is basically what I try to do for each slot period (if SSB is active):
% Protect SSB indices
reservedPRB1 = nrPDSCHReservedConfig;
reservedPRB1.PRBSet = ssb_freqs-1;
reservedPRB1.SymbolSet = reshape(mod(ssb_symb(idx_n,:),14)',[],1)-1;
pdsch.ReservedPRB = {reservedPRB1};
% Gnerate PDSCH indices
[ind_data,info] = nrPDSCHIndices(carrier,pdsch,'IndexOrientation','carrier');
ind_dmrs = nrPDSCHDMRSIndices(carrier,pdsch,'IndexOrientation','carrier');
ind_ptrs = nrPDSCHPTRSIndices(carrier,pdsch,'IndexOrientation','carrier');
% Generate symbols
sym_data = nrPDSCH(carrier,pdsch,data,'OutputDataType','single');
sym_dmrs = nrPDSCHDMRS(carrier,pdsch,'OutputDataType','single');
sym_ptrs = nrPDSCHPTRS(carrier,pdsch,'OutputDataType','single');
% Allocate symbols (idata/idmrs/iptrs for current slot)
symbols(idata) = sym_data;
symbols(idmrs) = sym_dmrs;
symbols(iptrs) = sym_ptrs;
Thank you for your fast answer.

Sign in to comment.

Accepted Answer

Sriram Tadavarty
Sriram Tadavarty on 30 Apr 2020
Hi Christian,
Thanks for sharing the code.
The issue of PDSCH not rate-matching around the SSB comes from the incorrect assignment of subcarriers, instead of resource blocks for the property PRBSet of reservedPRB1.
Make the following update and it would work as expected:
reservedPRB1.PRBSet = floor((ssb_freqs)/12-1); % convert subcarriers to resource blocks
As the property name PRBSet, it indicates that resource blocks need to be provided and any value provided is taken as a separate resource block.
Hope this helps.
Thanking you.

  1 Comment

Christian Ballesteros
Christian Ballesteros on 30 Apr 2020
Thank you very much! It worked perfectly. I did not realized I was passing the subcarrier index and not the PRB.

Sign in to comment.

More Answers (0)