5g PUSCH DMRS symbol位置确定

3.3.3 DMRS时域

DMRS的时域涉及到的参数有:

pusch.MappingType

pusch.FrequencyHopping

pusch.SymbolAllocation

pusch_dmrs.DMRSTypeAPosition

pusch_dmrs.DMRSLength

pusch_dmrs.DMRSAdditionalPosition

其中,

pusch.MappingType决定pusch.SymbolAllocation的第一个元素S和第二个元素L的范围

在这里插入图片描述

注意到,Type A 下PUS 的起始符号必从0开始。!!!

接下来。DMRS的symbol位置由上面这些参数通过查下面的表获得(这些表均来自TS38.211):

1)pusch_dmrs.DMRSLength=1 且 pusch.FrequencyHopping!=‘intraslot’ 的情况。

在这里插入图片描述

2)pusch_dmrs.DMRSLength=2 且 pusch.FrequencyHopping!=‘intraslot’ 的情况。

在这里插入图片描述

3)pusch_dmrs.DMRSLength=1 且 pusch.FrequencyHopping=‘intraslot’ 的情况。

在这里插入图片描述

表格中的参数说明:

表格中的 l d l_d ld是PUS连续symbol的长度,在跳频时指每一跳连续的长度。

表格中的 l 0 l_0 l0在MapingType='A’下,与pusch_dmrs.DMRSTypeAPosition相等,为2或3;在MappingType='B’下,为0。

表格中的 l ‾ \overline{l} l为DMRS的symbol索引相对PUS的索引。

表格中的pos0,1,2,3由pusch_dmrs.DMRSAdditionalPosition决定。
本节的例子为matlab R2023a中5g工具箱中的NR PUSCH Resource Allocation and DM-RS and PT-RS Reference Signals

%%%%%% 例子一
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');
%上述代码中的重点语句
pusch.SymbolAllocation = [0 12];
pusch.MappingType = 'A';
pusch.FrequencyHopping = 'neither';
pusch.DMRS.DMRSTypeAPosition = 2;  
pusch.DMRS.DMRSLength = 1;         
pusch.DMRS.DMRSAdditionalPosition = 1; 

在这里插入图片描述
在这里插入图片描述

pusch.FrequencyHopping = ‘neither’;且pusch.DMRS.DMRSLength = 1;因此要查的表为上表。

pusch.SymbolAllocation = [0 12];且pusch.MappingType = ‘A’;因此要查的内容在表的左半部分,且对应 l d l_d ld=12这一行。

pusch.DMRS.DMRSAdditionalPosition = 1;因此对应pos1这一列

因此DMRS索引为 l 0 l_0 l0,9;又因为pusch.MappingType = ‘A’;且pusch.DMRS.DMRSTypeAPosition = 2;

所以最终DMRS索引为2,9

而PUS的symbol在slot中的索引为0,1,2,3,4,5,6,7,8,9,10,11

因此DMRS的索引为2+0=0,9+0=9。

与matlab仿真图对应。

%%%%%% 例子二
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');

%上述代码中的重点语句
pusch.SymbolAllocation = [0 12];
pusch.MappingType = 'A';
pusch.FrequencyHopping = 'intraslot';
pusch.DMRS.DMRSTypeAPosition = 2;  
pusch.DMRS.DMRSLength = 1;   
pusch.DMRS.DMRSAdditionalPosition = 1; 


在这里插入图片描述

在这里插入图片描述

pusch.FrequencyHopping = ‘intraslot’;且pusch.DMRS.DMRSLength = 1;因此要查的表为上表。

pusch.SymbolAllocation = [0 12];且pusch.MappingType = ‘A’;因此要查左半部分的内容。第一跳和第二跳的symbol长度均为12/2=6,因此要查 l d l_d ld=5,6这一行。

pusch.DMRS.DMRSTypeAPosition = 2;且pusch.DMRS.DMRSAdditionalPosition = 1;因此对应pos1这一列

因此DMRS第一跳索引为2,第二跳索引为0,4

而PUS的第一跳symbol在slot中的索引为0,1,2,3,4,5,

因此DMRS的第一跳symbol在slot中的索引为2+0=2。

而PUS的第二跳symbol在slot中的索引为6,7,8,9,10,11

因此DMRS的第二跳symbol在slot中的索引为0+6=6,4+6=10。

与matlab仿真图对应。

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值