What ntn-rrc does
ntn-rrc is an ns-3 module that adds the NR-NTN control-plane timing mechanisms: a SIB19 (NTN-Config-r17) broadcaster driven by a live orbit, a UE-side uplink timing pre-compensator that decodes it, and a timing advance that includes the feeder leg for transparent payloads. It also provides K_offset derivation, RAR window checks, quantized measurement reports, GNSS location reporting and a connected-mode DRX state machine that gates a real flow.
Accompanying studyValidity of Broadcast Assistance Information for Uplink Timing Pre-Compensation in LEO Non-Terrestrial Networks. Code and data are in this repository.
What it models
NR over a satellite relies on three timing mechanisms that terrestrial ns-3 does not have: a broadcast K_offset that shifts the uplink grant, a timing advance that pre-compensates propagation, and a validity duration after which the terminal must read SIB19 again. ntn-rrc computes the total timing advance as 2(d_service + d_feeder)/c, split into common and UE-specific parts with drift rate and drift variation, so a transparent payload carries the feeder leg. The SIB19 broadcaster fills NTN-Config-r17 from a real orbit (ECEF state vector, ta-Common, drift terms, ul-SyncValidityDuration, K_offset, kMac) and quantizes it to the 3GPP TS 38.331 field steps. It supports a gateway or satellite uplink sync reference point, Taylor, economized or window-fit coefficients, and slot-over-drift, error-budget or fixed validity rules, and derives K_offset = ceil(RTT / slot) + 1 following 3GPP TS 38.213 Section 4.2.
On the UE side, a pre-compensator decodes SIB19, propagates the satellite from the last GNSS fix with a linear, gravity-ECEF, Kepler or Kepler-J2 model and forms its own timing advance. Further classes check whether ra-ResponseWindow can express the RAR window a round trip demands (TS 38.213 Section 8.1, TR 38.821 Section 7.3), quantize MeasurementReport content to TS 38.133 level indices, report GNSS location periodically, on events or on demand, and run connected-mode DRX (TS 38.321) with an extra AwaitingPass state between visibility windows. SIB19 is decoded from a trace and buffer rather than carried on BCCH, and K_offset reaches the scheduler only where the ntn-traffic helper enables it.
Measured numbers
Extra timing advance of a transparent payload compared with a regenerative one
Shipped test geometry, twice a 1200 km feeder leg over cTotal timing advance over the run
ntn-rrc-real-stack with default arguments, single seed, 48 samples over 24 s of a 550 km pass, slant range 550.1 to 576.8 kmMedian measured SINR (range 18.6 to 21.9 dB after the first sample)
ntn-rrc-real-stack with default arguments, single seed, 24 s of a 550 km passMeasured goodput with DRX disabled (awake fraction 1)
ntn-rrc-drx-data-traffic --drxOn=false, single seedSize of the ntn-rrc unit test suite
./test.py -s ntn-rrc (Type::UNIT)Each number states the run it comes from; the README of the module lists the command that reproduces it.
Standards it follows
| 3GPP TS 38.331 | SIB19, NTN-Config-r17 field steps, MeasurementReport |
| 3GPP TS 38.213 Section 4.2 | Timing advance and K_offset |
| 3GPP TS 38.213 Section 8.1 | RAR window |
| 3GPP TS 38.211 Section 4.3.1 | Frame and slot timing |
| 3GPP TS 38.321 | DRX and random access |
| 3GPP TS 38.133 | Timing error limits and measurement quantization |
| 3GPP TR 38.821 | NTN timing budgets and RAR window (Section 7.3) |
New on 6g-ntn.live
The toolkit now runs in the browser at 6g-ntn.live: pick an example of ntn-rrc or any other module, change its parameters, and the real ns-3 binary runs on the server.
Type ./ns3 run with your own arguments; the real binary runs on the server and streams its output.
Open →115 runnable examplesEvery example of the 14 modules, each with a typed parameter form and its measured KPIs.
Open →Live 3D globeReal constellations from CelesTrak elements, propagated with SGP4, with their service and feeder links.
Open →Open datasetsEvery finished run becomes a dataset under CC BY 4.0, with its provenance and configuration.
Open →Validation690 test cases in 41 toolkit suites, and a health check on every example.
Open →Shared scenariosResearchers post a configuration with its parameters and results; anyone can rerun it.
Open →Watch
Watch on YouTube: the NTN Control Center running and visualizing the toolkit examples, in five minutes.
Install
Every module ships in the ready-built container image of the toolkit (version 3.0.1):
docker pull uzairdocker69/ns3-ntn-toolkit:latest
docker run --rm -it uzairdocker69/ns3-ntn-toolkit:latest bash
To build from source, clone ns3-ntn-toolkit, which vendors this module under contrib/, or follow the README of this repository (branch ntn-rrc-v4).
Cite
If you use ntn-rrc, please cite the toolkit article (doi:10.1109/OJCOMS.2026.3745010):
@article{uzair2026ns3ntntoolkit,
author = {Uzair, Muhammad and Aldahlan, Bassma G. and Albar, Ali A. and
Althumali, Huda and Alghammas, Adnan},
title = {ns3-ntn-toolkit: An Integrated ns-3 Platform for 6G
Non-Terrestrial Networks},
journal = {IEEE Open Journal of the Communications Society},
volume = {7},
pages = {13440--13467},
year = {2026},
doi = {10.1109/OJCOMS.2026.3745010}
}