The equations and parameter ranges an engineer actually reaches for: power ramping, timing-advance maths, HARQ process counts, BSR/PHR computation, the LCP token bucket, DRX cycle arithmetic, and the SR counter — each with its variables spelled out and its clause cited. Pairs with the Theory Deep-Dive.
Each failed preamble ramps the next transmission up by a configured step, until either a response arrives or the attempt counter maxes out and access fails.
powerRampingStep {0,2,4,6} dB.Counter rule (§5.1.3): if no response, PREAMBLE_TRANSMISSION_COUNTER += 1; when it reaches preambleTransMax+1 → random-access problem indicated to RRC. Backoff before retry: PREAMBLE_BACKOFF = rand(0,1) × BI, where BI is the backoff-indicator value from the RAR.
The uplink must arrive time-aligned at the gNB. The Timing Advance Command MAC CE nudges it; the RAR sets it absolutely. Granularity scales with sub-carrier spacing.
T_A = 6-bit field (0…63); 31 = no change. μ = SCS index (0=15 kHz … 3=120 kHz).
T_A = 12-bit field (0…3846) in the RAR. Applied as the initial uplink timing.
Lifecycle: on any TA command, (re)start timeAlignmentTimer for that TAG. While it runs the UL is aligned. On expiry → flush HARQ buffers, release PUCCH/SRS, clear configured grants; for the pTAG, all UL is suspended until a fresh RACH. Tc = 1 / (480 000 × 4096) s is the basic time unit.
One HARQ entity per serving cell, holding a fixed set of stop-and-wait processes. New data is signalled by toggling the NDI; a held NDI means "retransmit, soft-combine".
| Item | Value / rule |
|---|---|
| HARQ entities | One per serving cell (DL and UL each). |
| Processes / cell | nrofHARQ-ProcessesForPDSCH up to 16 (Rel-16+ extension up to 32 for some configs). |
| New data indicator | NDI toggled ⇒ new TB (flush soft buffer). NDI held ⇒ retransmission (soft-combine). |
| Redundancy version | RV typically transmitted in order {0, 2, 3, 1}; RV0 is self-decodable. |
| UL retransmission | No UL HARQ feedback channel — the next grant (same process, held NDI) commands the retx. |
| DL feedback | ACK/NACK on PUCCH/PUSCH; soft combining in PHY, process bookkeeping in MAC. |
| Disabling | Per-process HARQ feedback can be disabled (e.g. NTN long RTT) — blind transmission instead. |
The BSR tells the gNB how much data waits, per logical channel group. Up to 8 LCGs (0–7). The reported value is an index into a standardised buffer-size table.
| Format | Buffer-size field |
|---|---|
| Short / Short-truncated | 1 LCG + 5-bit index (32 levels) |
| Long / Long-truncated | LCG bitmap + 8-bit index each (256 levels) |
Long table extends to ~150 MB; short table to ~150 kB. Values are quantised ranges, not exact byte counts.
| Type | Condition |
|---|---|
| Regular | New data for an LCH of higher priority than any buffered, or first data for any LCG; also drives an SR if no grant. |
| Periodic | periodicBSR-Timer expires. |
| Padding | Grant leftover ≥ a BSR + subheader. |
retxBSR-Timer re-triggers a regular BSR if a grant never came. See Module 11.
Headroom = how much transmit power is left before the device's ceiling. Negative headroom means it is already power-limited — a coverage signal, not interference.
Types: Type 1 = PUSCH, Type 3 = SRS. Multiple-Entry PHR reports every activated serving cell (one octet of P_CMAX,c each) for carrier aggregation. Triggers: phr-PeriodicTimer expiry, or pathloss change > phr-Tx-PowerFactorChange with phr-ProhibitTimer elapsed. See Module 12.
A token bucket per logical channel guarantees each its prioritised bit rate, while still letting high-priority traffic burst. Two rounds fill the grant.
prioritisedBitRate (the guaranteed rate).bucketSizeDuration (burst depth).Round 1 — in decreasing priority, serve each LCH only up to its token balance Bj, decrementing Bj by the bytes served (never below 0).
Round 2 — strict priority, ignore Bj, fill until the grant is empty or data runs out.
Subject to per-LCH restrictions: allowed SCS, max PUSCH duration, configured-grant only, allowed cells.
See Module 10 for the full algorithm walk-through.
The on-duration starts on the slot where the cycle equation hits the configured offset. Inactivity extends the awake window; HARQ-RTT lets the device nap between a transmission and its retransmission grant.
Active Time = any of these running: onDuration, Inactivity, Retransmission, ra-ContentionResolutionTimer; or an SR is pending; or an unACKed contention-resolution grant is awaited. Short→long fallback via drx-ShortCycleTimer. See Module 13.
An SR is a one-bit "I have data" on PUCCH. If the network never answers, the counter climbs to its ceiling and the device falls back to random access.
An SR triggers only when a regular BSR has been triggered and there is no grant to send it in. While an SR is pending the UE is in DRX Active Time. See Module 11.
The RRC-supplied knobs MAC executes against. Ranges are the standardised enumerations; field-typical starting points are noted where useful.
| Parameter | Range / values | Governs |
|---|---|---|
powerRampingStep | {0, 2, 4, 6} dB | RA power ramp per retx |
preambleTransMax | {3,4,5,6,7,8,10,20,50,100,200} | Max preamble attempts |
ra-ResponseWindow | {1…80} slots | RAR (Msg2) wait |
ra-ContentionResolutionTimer | {8,16,24,…,64} subframes | Msg4 wait |
periodicBSR-Timer | {1,5,10,…,2560} sf · infinity | BSR refresh cadence |
retxBSR-Timer | {10,20,…,10240} sf | BSR re-trigger on no grant |
sr-ProhibitTimer | {0,1,2,4,8,16,32,64,128} ms | Min gap between SRs |
sr-TransMax | {4,8,16,32,64} | SRs before RA fallback |
phr-PeriodicTimer | {10,20,…,1000} sf · infinity | Periodic PHR |
phr-Tx-PowerFactorChange | {1,3,6} dB · infinity | Pathloss-change PHR trigger |
drx-LongCycle | {10,20,32,…,10240} ms | Sleep cadence |
drx-onDurationTimer | {1…1600} ms (sub-ms steps) | Awake window length |
drx-InactivityTimer | {0,1,2,…,2560} ms | Stay-awake after a grant |
bwp-InactivityTimer | {2,3,4,…,2560} ms | Fall back to default BWP |
sCellDeactivationTimer | {20,40,…,1280} ms · infinity | Auto-deactivate SCell |
timeAlignmentTimer | {500,750,…,10240} ms · infinity | UL timing validity |
beamFailureInstanceMaxCount | {1,2,3,4,5,6,8,10} | Beam-failure declaration |
dataInactivityTimer | {1,2,3,5,…,180} s | Drop to RRC_IDLE |
Exact enumerations are defined in TS 38.331 (RRC); MAC behaviour against them is in TS 38.321. Values above are representative — always confirm against the release you target.