Browse by type

3GPP TR 38.811 non-terrestrial network channel models for Sionna
OpenNTN is an open-source extension of Sionna that implements the non-terrestrial network (NTN) channel models of 3GPP TR 38.811 for the links between user terminals and a satellite or an aerial platform. Its channel models follow the interface of Sionna's TR 38.901 models, so they can be used in Sionna's link-level and system-level simulations. OpenNTN 2 is built on Sionna 2, which uses PyTorch.
DenseUrban), urban (Urban) and suburban (SubUrban),
with the parameter tables of TR 38.811 clause 6.7.2 and the fast-fading process of
TR 38.901 clause 7.5.TDL, the tapped delay line models NTN-TDL-A to NTN-TDL-D of
TR 38.811 clause 6.9.2, and CDL, the clustered delay line models NTN-CDL-A to
NTN-CDL-D of clause 6.9.1, with the Doppler shift of the satellite and, from TR 38.901
clause 7.7, the delay scaling and a desired K-factor; the TDL with spatial
correlation, the CDL with the antenna arrays of the package, its angles at the
elevation angle of the link, desired angular spreads and the Faraday rotation.cir_to_ofdm_channel and OFDMChannel.OpenNTN 2 requires Python 3.11 or later and Sionna 2.0.1 or later within 2.x
(sionna>=2.0.1,<3.0). Further dependencies (PyTorch, NumPy, matplotlib) are installed
with it.
sh
python -m pip install openntn
On a machine with an NVIDIA GPU, the PyTorch build has to match the driver: the default build of PyTorch 2.14.1 on PyPI, for example, uses CUDA 13.0 and needs an NVIDIA driver of version 580 or later. With an older driver, first install a build for an older CUDA version from the PyTorch index, then OpenNTN; the build for CUDA 12.6 runs with driver 535:
python -m pip install torch --index-url https://download.pytorch.org/whl/cu126
The changes of this version are listed in the changelog.
Note: openntn 2.x requires Sionna 2.x. Installing it into an environment with Sionna 1.x upgrades Sionna to 2.x. For Sionna 1.x and Sionna 0.19, use OpenNTN 1.0.0 and 0.19.0, which their installation scripts install from the tags v1.0.0 and v0.19.0 of the repository.
Sionna is also published as sionna-no-rt, without the ray tracer, which OpenNTN does
not use. openntn depends on the distribution sionna; to use sionna-no-rt instead,
install it first and then OpenNTN without its dependencies, which sionna-no-rt
already brings (PyTorch, NumPy and matplotlib, with the same lower bounds):
python -m pip install "sionna-no-rt>=2.0.1,<3.0"
python -m pip install --no-deps openntn
An environment that holds an earlier version of OpenNTN, installed by its installation
script as the distribution OpenNTN (1.0.0 or 0.19.0 from the tags, 0.1.0 from the
branches before them), keeps it when python -m pip install openntn runs, as pip takes
it for the same project. Use a new environment, or uninstall the earlier version first:
python -m pip uninstall OpenNTN
| OpenNTN | Sionna | Framework | Installation | Import |
|---|---|---|---|---|
| 2.x, this version | 2.x, from 2.0.1 | PyTorch | python -m pip install openntn, from PyPI |
import openntn |
| 1.0.0, for Sionna 1.x | 1.x | TensorFlow | its installation script at the tag v1.0.0 (Linux) | sionna.phy.channel.tr38811 |
| 0.19.0, for Sionna 0.19 | 0.19 (0.19.2) | TensorFlow | its installation script at the tag v0.19.0 (Linux) | sionna.channel.tr38811 |
The versions 1.0.0 and 0.19.0 are not on PyPI; their installation scripts install the version of their tag. The TensorFlow versions of the example notebooks belong to them. The migration guide describes what changes for their users.
from sionna.phy.channel import cir_to_ofdm_channel, subcarrier_frequencies
from openntn import Antenna, AntennaArray, Urban
from openntn.utils import gen_single_sector_topology
carrier_frequency = 2.2e9 # S band downlink
elevation_angle = 50.0 # degrees
# User terminal: one antenna; satellite: 4 x 4 dual-polarized array
ut_array = Antenna(polarization="single", polarization_type="V",
antenna_pattern="omni", carrier_frequency=carrier_frequency)
bs_array = AntennaArray(num_rows=4, num_cols=4, polarization="dual",
polarization_type="cross", antenna_pattern="38.901",
carrier_frequency=carrier_frequency)
channel_model = Urban(carrier_frequency=carrier_frequency, ut_array=ut_array,
bs_array=bs_array, direction="downlink",
elevation_angle=elevation_angle)
# 16 examples of a single sector: one satellite at 600 km, 4 user terminals
topology = gen_single_sector_topology(batch_size=16, num_ut=4, scenario="urb",
elevation_angle=elevation_angle, bs_height=600e3)
channel_model.set_topology(*topology)
# One channel realization: path coefficients a and path delays tau
a, tau = channel_model(num_time_samples=1, sampling_frequency=15e3)
# Frequency response on 72 subcarriers with Sionna's channel functions
frequencies = subcarrier_frequencies(num_subcarriers=72, subcarrier_spacing=30e3)
h_freq = cir_to_ofdm_channel(frequencies, a, tau, normalize=True)
print(h_freq.shape) # [batch, rx, rx antennas, tx, tx antennas, time steps, subcarriers]
A channel model runs on the device given by its argument device, for example
device="cuda:0", which defaults to sionna.phy.config.device at the construction of
the model, and in the precision given by its argument precision, "single" or
"double", which defaults to sionna.phy.config.precision. Create the antennas on the
same device and in the same precision, with their arguments device and precision,
which have the same defaults; otherwise the model raises ValueError. A model stays on
its device and in its precision: build it with the device and precision it is to use
instead of moving it with .to() or casting it. Moved or cast, it raises ValueError
in its next set_topology or call.
Four Jupyter notebooks show the models at work with Sionna 2 and PyTorch:
TDL and CDL: the power delay profiles of NTN-TDL-A to
NTN-TDL-D and the parameters of link_level_parameters, the Doppler shift of the
satellite and its pre-compensation in the frequency and in the time domain, the block
error rates of an OFDM downlink with LDPC coding over NTN-TDL-A to NTN-TDL-D with
perfect channel knowledge and with LS channel estimation, and the rank of the MIMO
channel of CDL beside that of Sionna's TR 38.901 CDL.By default, BER_sims.ipynb and ML_based_SIMO_receiver.ipynb load the results of
their full runs, which the repository stores beside them, link_level_models.ipynb
loads those of its block error rates and computes its other results, and
channel_response.ipynb runs with its own batch sizes. The environment variable
OPENNTN_NOTEBOOK_MODE set to full computes the full runs (the training of the
receiver needs a GPU), set to reduced it runs them with small batches and writes no
file. The TensorFlow notebooks of the earlier versions belong to the versions for Sionna
1.x and 0.19.
gen_single_sector_topology
does.bs_orientations and ut_orientations for beam pointing or a defined polarization.tau
together with the path coefficients. The delays are relative to the first path; the
propagation delay of the link is not included.set_topology raises ValueError for indoor user
terminals.The description of the models lists the scope, the conventions and the limits of the models in full, with their calibration against 3GPP TR 38.821 and their speed on a GPU.
OpenNTN 2 keeps the names of the models, the antennas and the topology generators, but
it is a separate package, openntn, built on PyTorch: its inputs and outputs are
PyTorch tensors, it is installed with pip, and corrections of the models change
simulation results. The
migration guide
lists the changes by topic, with the changes of the API that existing code has to
follow; the changelog
describes every change an
$ claude mcp add OpenNTN \
-- python -m otcore.mcp_server <graph>