There are many topics in LTE (especially on PHY layer) which cannot be cleary explained without going through each parameters and equations shown in the specification. Physical resource allocation is one of these topics.
Physical resource allocation for PUCCH format 2, 2a, 2b is determined by the following process. Don't get panic, equation itself is all within high school math. Only our patience and persistance is required.
First get some outstanding big picture and try to figure out how the big picture is implemented by the following math process.
i) PUCCH is located around the extreme end of the system bandwidth in frequency domain.
ii) The location of a PUCCH alternates between the two edges when slot number changes.
iii) For PUCCH format 2,2a,2b case, the only variable set by the higher layer message (CQI-ReportPeriodic in RRCConnectionSetup or RRCConnectionReconfiguration) is n(2) PUCCH and all the other parameters are predefined or calculated by a predefined equation.
I put the Excel spreadsheet to calculate the location here. (I haven't extensively tested my calculation. Let me know if you find any problem).
NOTE : Regarding how each of these format are utilized and configured in signaling, check out this tutorial of Amarisoft TechAcademy.
The topics on this page are listed below.
- PUCCH Format 2 - RB Mapping
- Signal Generation of PUCCH Format 2
- How do PUCCH Formats 2a and 2b add HARQ-ACK?
- Reference
PUCCH Format 2 - RB Mapping
Which resource block carries the periodic CQI report of a UE, and does it stay there for the whole subframe? One RRC parameter answers both questions. The eNB sends cqi-PUCCH-ResourceIndex to the UE in CQI-ReportPeriodic, and 36.211 calls it nPUCCH(2). The UE then derives the RB of each slot from it with the equations of 36.211 clause 5.4.3.
The diagram below puts those equations beside the uplink grid of a 5 MHz cell. On the left, the grid runs over five subframes, with RB 0 at the bottom and RB 24 at the top. On the right, the chain goes from cqi-PUCCH-ResourceIndex to m, and from m to nPRB, the physical RB number. The red arrows link each term to the place where it acts on the grid.
PUCCH format 2 RB mapping in a 5 MHz cell. One index from RRC gives m, and m places the PUCCH at one edge of the band in the first slot and at the opposite edge in the second slot.
m counts RB pairs from the band edge : m = floor(nPUCCH(2) / NscRB), and the callout reminds you that NscRB is always 12. So 12 consecutive index values share one m.The slot parity picks the edge : when (m + ns mod 2) mod 2 = 0, nPRB = floor(m/2), counted up from RB 0. Otherwise nPRB = NRBUL - 1 - floor(m/2), counted down from the top RB.Only the parity of the slot matters : the callout says the slot number is 0 or 1. In 36.211, ns runs from 0 to 19 over the radio frame, but the equation uses only ns mod 2, so the result is the same.NRBUL follows the channel bandwidth : the list at the lower right gives 6, 15, 25, 50, 75 and 100 RBs for 1.4, 3, 5, 10, 15 and 20 MHz.The legend at the lower left : brown is PUCCH, light green is PUSCH, the two pink bars are the DMRS for PUSCH and for PUCCH, and yellow is the sounding RS. In the grid, only brown PUCCH blocks appear, on RB 0 and RB 24.
Let's work through the 5 MHz case of the diagram, where NRBUL = 25. A cqi-PUCCH-ResourceIndex from 0 to 11 gives m = 0. So the PUCCH takes RB 0 in the even slot and RB 24 in the odd slot. An index from 12 to 23 gives m = 1, and the two edges swap: RB 24 in the even slot and RB 0 in the odd slot. An index from 24 to 35 gives m = 2, which moves one RB inward to RB 1 and RB 23.
Within one value of m, the 12 index values map to 12 cyclic shifts of the same sequence. So up to 12 UEs can share one RB pair, and the next section shows how the shift is derived.
How far inward can m go? SIB2 carries nRB-CQI in PUCCH-ConfigCommon, and 36.211 calls it NRB(2). It sets how many RBs in each slot are available for formats 2, 2a and 2b. An index below 12 x NRB(2) gives an m below NRB(2), so the PUCCH stays in that region. An index at or above that limit falls into the mixed RB, which formats 1, 1a and 1b also use. In the mixed RB, the cyclic shift is offset by Ncs(1) + 1, so it avoids the shifts that nCS-AN leaves to format 1. 36.211 allows at most one mixed RB in each slot.
In 36.331 v19.3.0, cqi-PUCCH-ResourceIndex is INTEGER (0..1185) and nRB-CQI is INTEGER (0..98). The large range lets the index reach inner RBs of a 20 MHz carrier, but a real cell keeps the format 2 region small.
One RRC index fixes the RB in both slots : cqi-PUCCH-ResourceIndex gives m, and m gives nPRB for each slot parity.The PUCCH hops to the opposite edge at the slot boundary : this gives frequency diversity inside one subframe, and it keeps the middle of the band contiguous for PUSCH.Twelve index values share one RB pair : they differ only in the cyclic shift of the sequence.nRB-CQI in SIB2 sizes the format 2 region : an index beyond it lands in the mixed RB that format 1 also uses.
PUCCH Format 2 - Frequency Spectrum
If you see a UL frame carrying a PUCCH (single PUCCH), it would look as follows. The plot below is the spectrum of a 5 MHz uplink that carries a single PUCCH. The x axis runs from about -7.5 MHz to +7.5 MHz, and the y axis is amplitude in dB. Two narrow peaks near 0 dB stand at about -2.2 MHz and +2.2 MHz. Between them the level falls to around -45 dB, and outside +/-2.5 MHz only the noise floor near -90 dB remains.
Spectrum of a single PUCCH in a 5 MHz uplink. The energy sits at the two band edges, because the PUCCH takes RB 0 in one slot and RB 24 in the other.
Two peaks, not one : the measurement covers both slots, so both hop positions appear in the same trace.The peak positions match the edge RBs : 25 RBs of 180 kHz span 4.5 MHz, so the centres of RB 0 and RB 24 lie at about -2.16 MHz and +2.16 MHz.The level between the peaks is 45 dB down : no other channel is transmitted, so the middle of the band holds only the sidelobes of the two narrow allocations.
Signal Generation of PUCCH Format 2
The RB mapping above tells where the PUCCH goes, but not what it carries. This section follows the 20 coded CQI bits to the 120 values that fill one RB pair. Before the page starts, 36.212 clause 5.2.3.3 has already coded up to 13 CQI bits into these 20 bits with the (20, A) code. Each of the three steps below matches one part of 36.211 clauses 5.4.2 and 5.4.3.
PUCCH Format 2 Signal Generation - Symbols d
Step 1 : Generation of d( ). By this process, 20 bit data b() is converted into 10 complex number d( ). The diagram below shows the two operations of this step. First, the UE adds a pseudo-random sequence c(i) to the 20 bits, modulo 2. Then QPSK maps each pair of scrambled bits to one complex symbol, with 36.211 Table 7.1.2-1 on the left.

Step 1. Scrambling with a UE-specific sequence, then QPSK, turns 20 bits into 10 symbols d(0) to d(9).
cinit ties the scrambling to the cell and the UE : cinit = (floor(ns/2) + 1) x (2NIDcell + 1) x 216 + nRNTI. The green boxes mark the slot number, the physical cell ID and the C-RNTI.The generator restarts every subframe : floor(ns/2) is the subframe number, so c(i) changes from one subframe to the next.Neighbour cells scramble differently : NIDcell enters cinit, so two UEs in different cells with the same C-RNTI still use different sequences.Every QPSK point has unit power : every constellation point has +/-1/√2 on the in-phase and on the quadrature axis.
PUCCH Format 2 Signal Generation - Sequence z
Step 2 : Generation of z( ). By this process, the 10 complex number d( ) is spreaded into 120 complex number z( ). Each d(n) is multiplied by a length-12 sequence with a cyclic shift, and the resource index enters again through that shift. In the diagram below, the upper left gives n'(ns) for the even and the odd slot. The two grey boxes on the right show which RRC field feeds each term. The middle builds ncs and α, the lower left forms z, and 36.211 Table 5.5.1.2-1 at the right lists φ(n) of the base sequence.

Step 2. A cyclically shifted base sequence spreads each symbol d(n) over 12 subcarriers, so the 10 symbols become 120 values z.
n'(ns) comes from the resource index : in the even slot, n' = nPUCCH(2) mod 12 while the index stays inside the nRB-CQI region, which is the condition nPUCCH(2) < NscRBNRB(2). The odd-slot formula permutes the shifts, so the pattern differs between the two slots.The otherwise rows are the mixed RB case : they add Ncs(1) + 1, and the arrow to nCS-AN shows where Ncs(1) comes from.ncs adds a cell-specific term : ncscell(ns, l) varies with slot and symbol (36.211 clause 5.4). So the shift changes from symbol to symbol, while n'(ns) keeps the UEs apart.The shift appears as a phase ramp : α = 2π ncs / 12, and ru,v(α)(i) is the base sequence multiplied by ejαi.The base sequence has length 12 : the base sequence is ru,v(n) = ejφ(n)π/4, with φ(n) from Table 5.5.1.2-1. The image shows the first rows of the 30 sequence groups.The output index : z(NseqPUCCH n + i) = d(n) ru,v(α)(i), with n = 0 to 9, i = 0 to 11 and NseqPUCCH = 12.
PUCCH Format 2 Signal Generation - RE Mapping
Step 3 : Mapping z( ) to each resource elements. Assuming that a(n_s,l) is zero, we can map each of z( ) values to each RE of PUCCH Format 2 Resource block as shown below. The two grids below show slot 0 and slot 1 of one RB pair. Each row is one of the 12 subcarriers, with index 0 at the bottom. Each column is one of the 7 SC-FDMA symbols of a normal CP slot. Symbols 1 and 5 carry the DMRS, and the other five columns carry the PUCCH data.

Step 3. Each SC-FDMA symbol carries one d(n) spread over 12 subcarriers. Five data symbols per slot give 10 per subframe, which are the 10 QPSK symbols of Step 1.
DMRS in symbols 1 and 5 : 36.211 Table 5.5.2.2.2-1 gives this for formats 2, 2a and 2b with normal CP. With extended CP, format 2 has one DMRS symbol, symbol 3.d(0) to d(4) fill slot 0, d(5) to d(9) fill slot 1 : the mapping runs over the subcarrier first, then the symbol, then the slot (36.211 clause 5.4.3).The two slots sit in different RBs : the grids look alike, but the RB mapping section places slot 0 and slot 1 at opposite edges of the band.Two cells read y(4) : at index 4 in symbol 6, the grids show d(4).y(4) and d(9).y(4). The rest of each column reads r(i), so r(4) is meant.
Put the three steps together, and the flow is short. The UE scrambles and modulates 20 bits into 10 symbols. It then spreads each symbol over one RB with a cyclically shifted sequence, and it sends one symbol in each data SC-FDMA symbol. The resource index appears twice in this chain: once in the RB through m, and once in the cyclic shift through n'(ns).
20 bits in, 120 values out : 10 QPSK symbols x 12 subcarriers fill the ten data symbol columns of one RB pair.The resource index acts twice : it selects the RB pair and the cyclic shift inside that pair.Cell and UE identities shape the waveform : the C-RNTI and the cell ID set the scrambling, and the cell-specific ncscell adds a hopping shift.
How do PUCCH Formats 2a and 2b add HARQ-ACK?
The page title lists 2a and 2b beside format 2, and they differ from it in only one symbol. They exist for one collision: a periodic CQI report and a HARQ-ACK due in the same subframe, with no PUSCH to carry them.
36.213 clause 10.1.1 settles what the UE does in that case. If simultaneousAckNackAndCQI in CQI-ReportPeriodic is TRUE, the UE multiplexes the CSI report with the HARQ-ACK. Otherwise it drops the CSI report and sends only the HARQ-ACK.
The format then depends on the cyclic prefix. Format 2a carries a CSI report with 1 HARQ-ACK bit, and format 2b carries one with 2 HARQ-ACK bits. Both are defined for normal CP only. With extended CP, the UE stays on format 2 and codes the HARQ-ACK bits jointly with the CQI bits, as 36.212 clause 5.2.3.4 describes.
How do 2a and 2b fit the extra bits into the same RB? The 20 CQI bits still go through Steps 1 to 3 unchanged. The HARQ-ACK bits become one extra symbol, d(10), with BPSK for 2a and QPSK for 2b. That is why 36.211 Table 5.4-1 lists 21 bits for 2a and 22 bits for 2b. d(10) does not take a data RE. Instead, it multiplies the DMRS in the second reference symbol of each slot, which is symbol 5 in the RE map above (36.211 clause 5.5.2.2.1).
So in 2a and 2b the DMRS does two jobs. The eNB can take the first DMRS symbol of each slot as the phase reference, and read the HARQ-ACK from the phase of the second one. 36.212 encodes each ACK as binary 1 and each NACK as binary 0 before this modulation.
Formats 2, 2a and 2b also have no shortened version. 36.211 clause 5.4.3 shortens formats 1, 1a, 1b, 3, 4 and 5 when an SRS shares the subframe, but not the format 2 family. So 36.213 clause 8.2 resolves the collision by dropping one of the two. A type 0 SRS, the periodic one, is not sent in a subframe with format 2, 2a or 2b. A type 1 SRS, the aperiodic one, is dropped when the PUCCH carries HARQ-ACK, which covers 2a and 2b. When format 2 carries CSI only, the UE drops the format 2 and sends the type 1 SRS instead.
TDD adds one more step before the HARQ-ACK reaches format 2b. Several downlink subframes can feed one uplink subframe, so the UE may owe more than two HARQ-ACK bits. With HARQ-ACK bundling or multiplexing, 36.213 clause 7.3.2.1 maps the count of ACKs to two bits with Table 7.3-1. The UE then sends those two bits with the CSI on format 2b for normal CP, or on format 2 for extended CP.
2a and 2b exist only for normal CP : with extended CP, format 2 carries the HARQ-ACK jointly coded with the CQI.The HARQ-ACK rides on the DMRS : d(10) modulates the second DMRS symbol of each slot, and the 10 data symbols stay as they are.simultaneousAckNackAndCQI decides whether the two are combined : when it is FALSE, the UE drops the CSI report in a collision subframe.Format 2 cannot be shortened : a collision with SRS drops either the SRS or the CSI-only format 2.The RB and the cyclic shift do not change : 2a and 2b use the same nPUCCH(2) and the same mapping as format 2.
Reference
[1] 3GPP TS 36.211 v19.3.0 - clauses 5.4, 5.4.2, 5.4.3, 5.5.1, 5.5.2.2 and 7.1.2, PUCCH formats 2, 2a and 2b, mapping to physical resources, PUCCH DMRS
[2] 3GPP TS 36.212 v19.3.0 - clauses 5.2.3.3 and 5.2.3.4, channel coding of CQI and of CQI with HARQ-ACK on PUCCH
[3] 3GPP TS 36.213 v19.4.0 - clauses 7.3.2.1, 8.2 and 10.1.1, TDD HARQ-ACK reporting, UE sounding procedure and PUCCH format information
[4] 3GPP TS 36.331 v19.3.0 - CQI-ReportPeriodic and PUCCH-ConfigCommon