PUCCH资源映射

PUCCH(物理上行控制信道)主要用于承载控制信息,如调度请求、确认和CSI反馈,以请求分配上行资源、确认接收到的数据、报告信道质量,进而确保网络的高效运行和优质的通信服务。

1 载波配置

clear;
clc;
close all;
 
% 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 = 0; % Carrier offset
carrier.NSizeGrid = 51; % Size of carrier in RB
 
resGrid = nrResourceGrid(carrier);
 
beta_dmrs = 3; % only for display.

2 PUCCH资源配置

2.1 UCI bit

For format 0, you must specify a binary-valued column vector, a one-element cell array, or a two-element cell array.
Mapping of values for one HARQ-ACK information bit to sequences for PUCCH format 0
HARQ-ACK Value 0 1
--------------------- ------------ ------------
Sequence cyclic shift m_cs = 0 m_cs = 6
 
Mapping of values for two HARQ-ACK information bit to sequences for PUCCH format 0
HARQ-ACK Value 0,0 0,1 1,1 1,0
--------------------- ------------ ------------ ------------ ------------
Sequence cyclic shift m_cs = 0 m_cs = 3 m_cs = 6 m_cs = 9
 
Mapping of values for one HARQ-ACK information bit and positive SR to sequences for PUCCH format 0
HARQ-ACK Value 0 1
--------------------- ------------ ------------
Sequence cyclic shift m_cs = 3 m_cs = 9
 
Mapping of values for two HARQ-ACK information bit and positive SRto sequences for PUCCH format 0
HARQ-ACK Value 0,0 0,1 1,1 1,0
--------------------- ------------ ------------ ------------ ------------
Sequence cyclic shift m_cs = 1 m_cs = 4 m_cs = 7 m_cs = 9
For format 1, you must specify a binary-valued column vector or a one-element cell array. This argument must contain HARQ-ACK bits or SR bits. To transmit only positive SR bit, specify this argument as [0] or {0}.
For formats 2, 3, and 4, you must specify a binary-valued column vector or a one-element cell array. This argument must contain a codeword of encoded UCI bits.
ucibits A Valid Range of E Code Block Segmentation CRC Bits Encoding
--------- ---------------- ----------------------------- ---------- ------------------
1 E ≥ A N/A N/A Repetition
2 E > A N/A N/A Simplex
3–11 E > A N/A N/A Reed-Muller
12–19 E > A + 9 N/A 6 Parity-check Polar
20–1706 E > A + 11 Occurs only when A ≥ 1013 11 Polar
or when A ≥ 360 and E ≥ 1088
% UCI bit
ack = [1;1]; % HARQ-ACK bits [] | [bit0] | [bit0;bit1] 1:ACK 0:NACK
sr = []; % SR bit [] | 1 | 0 [] : PUCCH transmission without SR 1: positive SR 0: negative SR
uciBits_f0 = {ack,sr};
uciBits_f1 = ack;
 
uciBits_f2 = randi([0 1],15,1);
uciBits_f3 = randi([0 1],15,1);
uciBits_f4 = randi([0 1],15,1);

2.2 PUCCH format

PUCCH format0
% PUCCH configuration
pucch_f0 = nrPUCCH0Config;
pucch_f0.NSizeBWP = [];
pucch_f0.NStartBWP = [];
pucch_f0.SymbolAllocation = [0 2]; % [symbol start, symbol length 1/2]
pucch_f0.PRBSet = 0;
pucch_f0.FrequencyHopping = 'neither'; % 'neither' | 'intraSlot' | 'interSlot'
pucch_f0.SecondHopStartPRB = 50; % Enable interslot frequency hopping, config SecondHopStartPRB.
pucch_f0.GroupHopping = 'neither'; % PUCCH-ConfigCommon: 'neither' | 'enable' | 'disable'
pucch_f0.HoppingID = []; % PUCCH-ConfigCommon
pucch_f0.InitialCyclicShift = 0;
 
sym = nrPUCCH(carrier,pucch_f0,uciBits_f0);
[ind,~] = nrPUCCHIndices(carrier,pucch_f0);
resGrid(ind) = sym;
 
% figure;
% scatterplot(sym);
sym_table = array2table(sym)
sym_table = 24×1 table
 sym
1-0.7071 - 0.7071i
2-0.2588 + 0.9659i
30.2588 + 0.9659i
40.7071 - 0.7071i
5-0.2588 + 0.9659i
60.9659 - 0.2588i
7-0.7071 + 0.7071i
8-0.9659 - 0.2588i
9-0.2588 - 0.9659i
100.7071 - 0.7071i
11-0.9659 - 0.2588i
12-0.2588 - 0.9659i
13-0.7071 - 0.7071i
140.7071 + 0.7071i
150.7071 - 0.7071i
16-0.7071 + 0.7071i
17-0.7071 - 0.7071i
180.7071 + 0.7071i
19-0.7071 + 0.7071i
20-0.7071 + 0.7071i
21-0.7071 + 0.7071i
22-0.7071 + 0.7071i
230.7071 - 0.7071i
240.7071 - 0.7071i
PUCCH format1
% PUCCH configuration
pucch_f1 = nrPUCCH1Config;
pucch_f1.NSizeBWP = [];
pucch_f1.NStartBWP = [];
pucch_f1.SymbolAllocation = [0 14]; % [symbol start, symbol length 4-14]
pucch_f1.PRBSet = 5;
pucch_f1.FrequencyHopping = 'neither'; % 'neither' | 'intraSlot' | 'interSlot'
pucch_f1.SecondHopStartPRB = 45; % Enable interslot frequency hopping, config SecondHopStartPRB.
pucch_f1.GroupHopping = 'neither'; % PUCCH-ConfigCommon: 'neither' | 'enable' | 'disable'
pucch_f1.HoppingID = []; % PUCCH-ConfigCommon
pucch_f1.InitialCyclicShift = 0;
pucch_f1.OCCI = 0;
 
sym = nrPUCCH(carrier,pucch_f1,uciBits_f1);
[ind,~] = nrPUCCHIndices(carrier,pucch_f1);
 
dmrs_sym = beta_dmrs*nrPUCCHDMRS(carrier,pucch_f1);
dmrs_ind = nrPUCCHDMRSIndices(carrier,pucch_f1);
 
resGrid(ind) = sym;
resGrid(dmrs_ind) = dmrs_sym;
PUCCH format2
% PUCCH configuration
pucch_f2 = nrPUCCH2Config;
pucch_f2.NSizeBWP = [];
pucch_f2.NStartBWP = [];
pucch_f2.SymbolAllocation = [12 2]; % [symbol start, symbol length 4-14]
pucch_f2.PRBSet = [10 11];
pucch_f2.FrequencyHopping = 'neither'; % 'neither' | 'intraSlot' | 'interSlot'
pucch_f2.SecondHopStartPRB = 40; % Enable interslot frequency hopping, config SecondHopStartPRB.
pucch_f2.NID = [];
pucch_f2.RNTI = 1; % UE RNTI
pucch_f2.NID0 = [];
 
[ind,info] = nrPUCCHIndices(carrier,pucch_f2);
uciCodeword = nrUCIEncode(uciBits_f2,info.G);
sym = nrPUCCH(carrier,pucch_f2,uciCodeword);
 
dmrs_sym = beta_dmrs*nrPUCCHDMRS(carrier,pucch_f2);
dmrs_ind = nrPUCCHDMRSIndices(carrier,pucch_f2);
 
resGrid(ind) = sym;
resGrid(dmrs_ind) = dmrs_sym;
 
coderate = length(uciBits_f2)/info.G;
info.coderate = coderate;
info.N_RB_SC = 8;
disp(info)
G: 64 Gd: 32 NREPerPRB: 16 DMRSSymbolSet: [12 13] coderate: 0.2344 N_RB_SC: 8
PUCCH format3
% PUCCH configuration
pucch_f3 = nrPUCCH3Config;
pucch_f3.NSizeBWP = [];
pucch_f3.NStartBWP = [];
pucch_f3.Modulation = 'QPSK'; % 'QPSK' | 'pi/2-BPSK'
pucch_f3.SymbolAllocation = [0 14]; % [symbol start, symbol length 4-14]
pucch_f3.PRBSet = [20 21]; % 满足235原则
pucch_f3.FrequencyHopping = 'intraSlot'; % 'neither' | 'intraSlot' | 'interSlot'
pucch_f3.SecondHopStartPRB = 35; % Enable interslot frequency hopping, config SecondHopStartPRB.
pucch_f3.GroupHopping = 'neither'; % PUCCH-ConfigCommon: 'neither' | 'enable' | 'disable'
pucch_f3.HoppingID = []; % PUCCH-ConfigCommon
pucch_f3.NID = [];
pucch_f3.RNTI = 1; % UE RNTI
pucch_f3.AdditionalDMRS = 1;
 
[ind,info] = nrPUCCHIndices(carrier,pucch_f3);
uciCodeword = nrUCIEncode(uciBits_f3,info.G);
sym = nrPUCCH(carrier,pucch_f3,uciCodeword);
 
dmrs_sym = beta_dmrs*nrPUCCHDMRS(carrier,pucch_f3);
dmrs_ind = nrPUCCHDMRSIndices(carrier,pucch_f3);
 
resGrid(ind) = sym;
resGrid(dmrs_ind) = dmrs_sym;
 
coderate = length(uciBits_f3)/info.G;
info.coderate = coderate;
info.N_RB_SC = 12;
disp(info)
G: 480 Gd: 240 NREPerPRB: 120 DMRSSymbolSet: [1 5 8 12] coderate: 0.0312 N_RB_SC: 12
PUCCH format4
% PUCCH configuration
pucch_f4 = nrPUCCH4Config;
pucch_f4.NSizeBWP = [];
pucch_f4.NStartBWP = [];
pucch_f4.Modulation = 'QPSK'; % 'QPSK' | 'pi/2-BPSK'
pucch_f4.SymbolAllocation = [0 14]; % [symbol start, symbol length 4-14]
pucch_f4.PRBSet = 25;
pucch_f4.FrequencyHopping = 'intraSlot'; % 'neither' | 'intraSlot' | 'interSlot'
pucch_f4.SecondHopStartPRB = 30; % Enable interslot frequency hopping, config SecondHopStartPRB.
pucch_f4.GroupHopping = 'neither'; % PUCCH-ConfigCommon: 'neither' | 'enable' | 'disable'
pucch_f4.HoppingID = []; % PUCCH-ConfigCommon
pucch_f4.SpreadingFactor = 2; % occ-length n2|n4
pucch_f4.OCCI = 0; % occ-index must be less than the SpreadingFactor property.
pucch_f4.NID = [];
pucch_f4.RNTI = 1; % UE RNTI
pucch_f4.AdditionalDMRS = 0;
 
[ind,info] = nrPUCCHIndices(carrier,pucch_f4);
uciCodeword = nrUCIEncode(uciBits_f4,info.G);
sym = nrPUCCH(carrier,pucch_f4,uciCodeword);
 
dmrs_sym = beta_dmrs*nrPUCCHDMRS(carrier,pucch_f4);
dmrs_ind = nrPUCCHDMRSIndices(carrier,pucch_f4);
 
resGrid(ind) = sym;
resGrid(dmrs_ind) = dmrs_sym;
 
coderate = length(uciBits_f4)/info.G;
info.coderate = coderate;
info.N_RB_SC = 12/pucch_f4.SpreadingFactor;
disp(info)
G: 144 Gd: 72 NREPerPRB: 144 DMRSSymbolSet: [3 10] coderate: 0.1042 N_RB_SC: 6

3 资源网格显示

figure;
imagesc(abs(resGrid));
set(gca, 'XLim', [0.5, 14.5]);
set(gca, 'XTick', (0:14)+0.5);
set(gca, 'XTickLabel', (0:14));
set(gca, 'XGrid', 'on');
set(gca, 'GridColor', 'white');
set(gca, 'YDir', 'normal');
xlabel('OFDM Symbols');
ylabel('Subcarriers');
title('PUCCH Mapping in the Carrier Resource Grid');
text(8, 30, '从PRB0起始依次为:f0-f4', 'Color', 'red', 'FontSize', 12);

4 附录

 
PUCCH-Resource ::= SEQUENCE {
pucch-ResourceId PUCCH-ResourceId,
startingPRB PRB-Id,
intraSlotFrequencyHopping ENUMERATED { enabled } OPTIONAL, -- Need R
secondHopPRB PRB-Id OPTIONAL, -- Need R
format CHOICE {
format0 PUCCH-format0,
format1 PUCCH-format1,
format2 PUCCH-format2,
format3 PUCCH-format3,
format4 PUCCH-format4
}
}
 
PUCCH-format0 ::= SEQUENCE {
initialCyclicShift INTEGER(0..11),
nrofSymbols INTEGER (1..2),
startingSymbolIndex INTEGER(0..13)
}
 
PUCCH-format1 ::= SEQUENCE {
initialCyclicShift INTEGER(0..11),
nrofSymbols INTEGER (4..14),
startingSymbolIndex INTEGER(0..10),
timeDomainOCC INTEGER(0..6)
}
 
PUCCH-format2 ::= SEQUENCE {
nrofPRBs INTEGER (1..16),
nrofSymbols INTEGER (1..2),
startingSymbolIndex INTEGER(0..13)
}
 
PUCCH-format3 ::= SEQUENCE {
nrofPRBs INTEGER (1..16),
nrofSymbols INTEGER (4..14),
startingSymbolIndex INTEGER(0..10)
}
 
PUCCH-format4 ::= SEQUENCE {
nrofSymbols INTEGER (4..14),
occ-Length ENUMERATED {n2,n4},
occ-Index ENUMERATED {n0,n1,n2,n3},
startingSymbolIndex INTEGER(0..10)
}
 
PUCCH-FormatConfig ::= SEQUENCE {
interslotFrequencyHopping ENUMERATED {enabled} OPTIONAL, -- Need R
additionalDMRS ENUMERATED {true} OPTIONAL, -- Need R
maxCodeRate PUCCH-MaxCodeRate OPTIONAL, -- Need R
nrofSlots ENUMERATED {n2,n4,n8} OPTIONAL, -- Need S
pi2BPSK ENUMERATED {enabled} OPTIONAL, -- Need R
simultaneousHARQ-ACK-CSI ENUMERATED {true} OPTIONAL -- Need R
}
PUCCH-MaxCodeRate ::= ENUMERATED {zeroDot08, zeroDot15, zeroDot25, zeroDot35, zeroDot45, zeroDot60, zeroDot80}