SPARC

SPARC (Spatio-Temporal Adaptive Resource Control) offers a novel approach for multi-site spectrum management in NextG cellular networks. SPARC addresses the challenge of limited licensed spectrum in dynamic environments. We leverage the O-RAN architecture to develop a multi-timescale RAN Intelligent Controller (RIC) framework, featuring an xApp for near-real-time interference detection and localization, and a μApp for real-time intelligent resource allocation. By utilizing base stations as spectrum sensors, SPARC enables efficient and fine-grained dynamic resource allocation across multiple sites, enhancing signal-to-noise ratio (SNR), spectral efficiency, and overall system throughput.

Install srsRAN supporting E2 and EdgeRIC messages and control

Install zmq

git clone https://github.com/zeromq/libzmq.git  
cd libzmq  
./autogen.sh  
./configure  
make  
sudo make install  
sudo ldconfig
git clone https://github.com/zeromq/czmq.git  
cd czmq  
./autogen.sh  
./configure  
make  
sudo make install  
sudo ldconfig  

Other Dependencies and cloning the repository

sudo apt-get install cmake make gcc g++ pkg-config libfftw3-dev libmbedtls-dev libsctp-dev libyaml-cpp-dev libgtest-dev # install dependencies
git clone https://github.com/ushasigh/SPARC-multi-siteManagent.git

Network Setup

Core Network

open5gs: https://open5gs.org/open5gs/docs/guide/01-quickstart/
open5gs runs as a linux daemon, config files can be found in your system at location ~/etc/open5gs
The configs used in this project are available under folder /open5gs-configs

Radio Access Network

srsRAN-4g: we provide the builds used for the two sites in this repo
Site 1: /srsRAN_site1
Site 2: /srsRAN_site2

How to build?

cd srsRAN_site1
sudo ./make-rans.sh # this script will build both sites

Running the network:

To run in emulation mode with virtual radios:

Run the GRC broker

./gnu_2sites_no_inter.py # This runs 2 sites, 2 UEs in each, no interference

Other grc scripts provided for introducing interference:
gnu_2sites_interf.grc - 2 sites, 2UEs in each, interference in both sites, -540k and +540k Hz
jammer_and_4ues.grc - 1site, 4 UEs, 1 jammer at -540k Hz
jammer_and_2ues.grc - 1site, 2 UEs, 1 jammer at -540k Hz
one-site-freq-hopping.py - 1 site, 2 UEs, jammer which frequency hops

This is not needed for over the air experiments


Run enb1

[enb_files] section: Update the directory in /srsRAN_site1/.config/enb1.conf
[rf] section: Update ‘device_name’ as UHD (over the air) or zmq (virtual radios) in /srsRAN_site1/.config/enb1.conf [ric.agent] section: update the local_port –> 38071
[enb] section: update enb_id –> 0x19B
[enb] section: mmed_addr –> 127.0.0.2 for open5gs in this setting

cd srsRAN_site1
./run_enb.sh

Run enb2

[enb_files] section: Update the directory in /srsRAN_site2/.config/enb2.conf
[rf] section: Update ‘device_name’ as UHD (over the air) or zmq (virtual radios) in /srsRAN_site2/.config/enb2.conf
[ric.agent] section: update the local_port –> 38072
[enb] section: update enb_id –> 0x19C
[enb] section: mmed_addr –> 127.0.0.2 for open5gs in this setting

cd srsRAN_site2
./run_enb.sh

Run the UEs

cd srsRAN_site1/build
sudo ./srsue/src/srsue ../.config/ue_1_site1.conf --rf.device_name=zmq --rf.device_args="tx_port=tcp://*:2001,rx_port=tcp://localhost:2000,id=ue,base_srate=23.04e6" --gw.netns=ue1
cd srsRAN_site1/build
sudo ./srsue/src/srsue ../.config/ue_1_site1.conf --rf.device_name=zmq --rf.device_args="tx_port=tcp://*:2011,rx_port=tcp://localhost:2010,id=ue,base_srate=23.04e6" --gw.netns=ue2
cd srsRAN_site1/build
sudo ./srsue/src/srsue ../.config/ue_3_site2.conf --rf.device_name=zmq --rf.device_args="tx_port=tcp://*:2021,rx_port=tcp://localhost:2020,id=ue,base_srate=23.04e6" --gw.netns=ue3
cd srsRAN_site1/build
sudo ./srsue/src/srsue ../.config/ue_4_site2.conf --rf.device_name=zmq --rf.device_args="tx_port=tcp://*:2031,rx_port=tcp://localhost:2030,id=ue,base_srate=23.04e6" --gw.netns=ue4 

Running Traffic

cd traffic-generator

Hierarchical RIC deployment

Internal Messaging Infrastructure

IMI: refer to /IMI

Start the Redis database

Start the Redis database: sudo docker-compose up db

Near RT RIC: Spectrum Monitoring

This component is used for interefrence detection and localization in the spectrogram.
icxApp: refer to icxApp

EdgeRIC: Resource Distribution

cd edgeric

Running edgeric for 1 site

sudo python3 edgeric_1_site.py

This will run edgeric for 1 site deployment, it will run 5000 TTIs for evaluation and out the mean total bitrate, SNR and packet errors observed over the duration of the run.
For no blanking, set a and b to 0 - line 35 and 36

Running edgeric for 2 sites

sudo python3 edgeric_2_sites.py

Blanking: :Blanking variables are a and b, play with it (line 50, 51) to experiment with the blanking feature, blanking is applied to prbs between a and b
Algorithm selection: Select the algorithm for resource distribution by uncommenting the appropriate lines: 297,298,299
Updating filenames: Update the filenames in lines 482, 491 to correctly save experimental runs