Skip to content

jjose001/srsRAN_4G_5G_NLOS_channel_emulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

5G/4G Channel Emulator for srsUE

This repository contains a modified version of srsRAN_4G that includes an internal channel emulator. This allows simulating real propagation conditions (fading, noise, delay, Doppler) directly in software, without the need for external RF hardware or expensive physical channel simulators.

Implementation

The channel emulator has been implemented by intercepting the I/Q sample flow at the UE's physical layer (PHY).

Modified Files

  • srsRAN_4G/srsue/src/phy/sync.cc: Channel emulator logic has been added in the receiver (DL) for LTE and NSA.
    • sync class: Instances an srsran::channel object if configuration enables it.
    • radio_recv_fnc method: Samples received from the "radio" (which can be virtual or USRP connected via cable) pass through the channel_emulator->run(...) method before being processed by the protocol stack.
  • srsRAN_4G/srsue/src/phy/sync_sa.cc: Implementation for 5G Standalone (SA).
    • Supports emulation in both Downlink (DL) and Uplink (UL).
  • srsRAN_4G/lib/include/srsran/phy/channel/channel.h: Definition of the channel class and its arguments.
  • srsRAN_4G/lib/src/phy/channel/fading.c and srsRAN_4G/lib/include/srsran/phy/channel/fading.h:
    • Added support for new fading models (TDL-A, TDL-B, TDL-C).
  • srsRAN_4G/srsue/src/ue.cc: Reading and passing configuration arguments from ue.conf.

Supported Models

The emulator uses the srsran::channel class which supports:

  1. AWGN (Additive White Gaussian Noise): Adds configurable noise to simulate different SNR levels.
  2. Fading:
    • Standard 3GPP models: EPA, EVA, ETU, TDL-A, TDL-B, TDL-C.
    • Maximum Doppler configuration.
  3. Delay:
    • Constant or time-varying delay (sinusoidal).
    • Useful for simulating variable distances or synchronization issues.
  4. HST (High Speed Train):
    • Simulates the extreme Doppler effect of a high-speed train.
  5. RLF (Radio Link Failure):
    • Simulates connection drops by periodically turning the channel off and on.

Configuration

To use the emulator, it is not necessary to modify the ue.conf file. All parameters can be passed directly via the command line when running the application.

Command Line Arguments

Parameters follow the structure --section.parameter=value. Below are the main available arguments:

General Enable

  • --channel.dl.enable=true: Enables the emulator in Downlink.
  • --channel.ul.enable=true: Enables the emulator in Uplink.

AWGN (Noise)

  • --channel.dl.awgn.enable=true: Activates the noise generator.
  • --channel.dl.awgn.snr=30: Sets the Signal-to-Noise Ratio (SNR) in dB.

Fading

  • --channel.dl.fading.enable=true: Activates fading.
  • --channel.dl.fading.model=epa5: Selects the model (e.g., epa5, eva70, etu300, tdl-a, etc.).

Delay

  • --channel.dl.delay.enable=true: Activates delay.
  • --channel.dl.delay.minimum_us=10: Minimum delay in microseconds.
  • --channel.dl.delay.maximum_us=100: Maximum delay in microseconds.
  • --channel.dl.delay.period_s=3600: Delay variation period.

RLF (Radio Link Failure)

  • --channel.dl.rlf.enable=true: Activates failure simulation.
  • --channel.dl.rlf.t_on_ms=10000: Connection active time (ms).
  • --channel.dl.rlf.t_off_ms=2000: Disconnection time (ms).

HST (High Speed Train)

  • --channel.dl.hst.enable=true: Activates the HST model.
  • --channel.dl.hst.fd_hz=750.0: Doppler frequency in Hz.

Note: To configure the emulator for Uplink, simply change dl to ul in any of the above commands (e.g., --channel.ul.fading.enable=true).

Compilation and Execution

Prerequisites

Ensure you have the srsRAN dependencies installed (CMake, Boost, ZMQ simulator if used, etc.).

Compilation

cd srsRAN_4G
mkdir build
cd build
cmake ..
make -j$(nproc)

Execution

Basic Execution

Run the UE with the default configuration file:

sudo ./srsue/src/srsue ../srsue/ue.conf

Example: Uplink Emulator with TDL-B 50Hz Fading

To enable the emulator in the uplink, activating the TDL-B fading model with a maximum Doppler of 50Hz, use the following command:

sudo ./srsue/src/srsue ../srsue/ue.conf --channel.ul.enable=true --channel.ul.fading.enable=true --channel.ul.fading.model=tdlb50

Example: Emulator with ZMQ Radio

If you are using ZMQ to simulate the radio (no RF hardware) and want to add AWGN in Downlink:

sudo ./srsue/src/srsue ../srsue/ue_zmq.conf --channel.dl.enable=true --channel.dl.awgn.enable=true --channel.dl.awgn.snr=25.0

Important: Ensure that ue.conf (or whichever configuration file you use) has the [channel.*] sections present, even if commented out or empty, so that the argument parser recognizes them. If you followed the installation instructions in this repo, they should already be there.

About

Modified srsRAN_4G (srsUE) with an internal 4G/5G channel emulator (AWGN, EPA/EVA/ETU, TDL-A/B/C, delay, Doppler/HST, RLF) for RF-free propagation simulation via CLI

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors