Files
openairinterface5g/radio/vrtsim
Jaroslava Fiedlerova e1a327ca4f Merge remote-tracking branch 'origin/nr_ue_multiple_rf' into integration_2026_w05 (!3593)
NR UE: add support for multiple RF frontends

This MR adds basic support for multiple RF-frontends at the UE.
There are multiple reasons why we might want this:
1. There might be different antennas needed for different bands (e.g. NTN or
   TN antennas). These antennas might be connected to different RF-frontends.
   In case of Handover, the UE needs to dynamically switch between these
   RF-frontends.
2. Each rf-simulator connection carries baseband I/Q samples. To be able to
   perform a handover between two cells at different frequencies, there must
   be two rf-simulator connections, as the baseband channels should not
   interfere and thus cannot simply be added.
3. When we want to support multiple UE simulation within one instance of
   nr-uesoftmodem, and allow multiple cells and probably even handover between
   these cells, we need either:
   1. dedicated RF-frontends for each simulated UE, or
   2. dedicated RF-frontends for each connected cell and dynamically assign
      simulated UEs accordingly.

This MR implements what is needed for 1., 2. and 3.1.
2026-01-28 20:19:48 +01:00
..
2025-08-18 08:07:51 +02:00
2025-03-26 16:54:22 +01:00
2025-08-20 15:57:34 +02:00
2025-08-20 15:57:30 +02:00

Overview

This implements a shared memory realtime and near-realtime radio interface. This is performed using shm_td_iq_channel which handles the shared memory interface.

Architecture

The vrtsim architecture follows a server-client model:

  • Server (gNB): On startup, the server writes a file, default location is /tmp/vrtsim_connection. This file contains information required by the client to establish communication.
  • Client (UE): The client reads this file from, verifies its contents, and uses the provided information to open and connect to the shared memory channel.
  • Shared Memory Channel: Both server and client use the shm_td_iq_channel to exchange IQ samples and control data in real time or near-real time.

Channel modelling:

Limitations

  • Only 1gNB to 1nrUE: gNB as a server, UE as a client.

Usage

On the UE and gNB: use device.name vrtsim command line argument.

Additionally on gNB use vrtsim.role server and optionally vrtsim.timescale <timescale> to set the timescale. Timescale 1.0 is the default and means realtime.

Channel modelling can be enabled by adding vrtsim.chanmod 1 to the command line and should work the same as channel modelling in rfsimulator, see rfsimulator documentation with a slight difference: channel modelling is done on transmission instead of reception. To refect this, the model names are slightly different: the server expects a model named server_tx_channel_model while the client expects a model named client_tx_channel_model

Additionally, taps_client is available in vrtsim. This allows to connect to channel emulation server and receive external taps (or channel impulse responses). To use external taps, use --taps-socket and provide a nanomsg PUB socket address that will publish the taps.

Debugging

Realtime issues

Realtime issues can prevent the UE from connecting to the gNB, especially with channel modelling enabled. Consider adjusting timescale parameter until the UE can connect reliably.

On exit, vrtsim will output a histogram of the measured transmission budget, which is defined as the number of microseconds before the transmitted samples could be read by peer.

Example:

[HW]   VRTSIM: Average TX budget 939.210 uS (more is better)
[HW]   VRTSIM: TX budget histogram: 216 samples
[HW]   Bin 0    [0.0 - 100.0uS]:                0
[HW]   Bin 1    [100.0 - 200.0uS]:              0
[HW]   Bin 2    [200.0 - 300.0uS]:              0
[HW]   Bin 3    [300.0 - 400.0uS]:              0
[HW]   Bin 4    [400.0 - 500.0uS]:              0
[HW]   Bin 5    [500.0 - 600.0uS]:              0
[HW]   Bin 6    [600.0 - 700.0uS]:              0
[HW]   Bin 7    [700.0 - 800.0uS]:              0
[HW]   Bin 8    [800.0 - 900.0uS]:              0
[HW]   Bin 9    [900.0 - 1000.0uS]:             117
[HW]   Bin 10   [1000.0 - 1100.0uS]:            0
[HW]   Bin 11   [1100.0 - 1200.0uS]:            0
[HW]   Bin 12   [1200.0 - 1300.0uS]:            0
[HW]   Bin 13   [1300.0 - 1400.0uS]:            0
[HW]   Bin 14   [1400.0 - 1500.0uS]:            0
[HW]   Bin 15   [1500.0 - 1600.0uS]:            0
[HW]   Bin 16   [1600.0 - 1700.0uS]:            0
[HW]   Bin 17   [1700.0 - 1800.0uS]:            0
[HW]   Bin 18   [1800.0 - 1900.0uS]:            0
[HW]   Bin 19   [1900.0 - 2000.0uS]:            0
[HW]   Bin 20   [2000.0 - 2100.0uS]:            0
[HW]   Bin 21   [2100.0 - 2200.0uS]:            0
[HW]   Bin 22   [2200.0 - 2300.0uS]:            0
[HW]   Bin 23   [2300.0 - 2400.0uS]:            0
[HW]   Bin 24   [2400.0 - 2500.0uS]:            0
[HW]   Bin 25   [2500.0 - 2600.0uS]:            0
[HW]   Bin 26   [2600.0 - 2700.0uS]:            0
[HW]   Bin 27   [2700.0 - 2800.0uS]:            0
[HW]   Bin 28   [2800.0 - 2900.0uS]:            0
[HW]   Bin 29   [2900.0 - 3000.0uS]:            0

Samples in bin 0 indicate realtime issues.