mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-13 04:30:28 +00:00
Compare commits
5 Commits
multi-test
...
RTT_based_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
daf0bc0093 | ||
|
|
e15b1928e9 | ||
|
|
a960c0cd91 | ||
|
|
eb66c2c1c7 | ||
|
|
9f82f28655 |
140
doc/RTT_based_ranging_Tutorial.md
Normal file
140
doc/RTT_based_ranging_Tutorial.md
Normal file
@@ -0,0 +1,140 @@
|
||||
# Procedure to install and run RTT based ranging using OAI basestation (gNB) and the user equipment (nrUE)
|
||||
|
||||
Open a terminal and clone the ran repository
|
||||
```bash
|
||||
git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git
|
||||
```
|
||||
compile the gNB and nrUE
|
||||
|
||||
```bash
|
||||
cd openairinterface5g/
|
||||
git checkout RTT_based_ranging
|
||||
source oaienv
|
||||
cd cmake_targets/
|
||||
./build_oai -I
|
||||
./build_oai -w USRP --gNB --nrUE --ninja --build-lib telnetsrv
|
||||
```
|
||||
NOTE: We assume that you have already installed USRP drivers. If not refer to Section 3.1 in
|
||||
[NR_SA_Tutorial_OAI_nrUE.md](NR_SA_Tutorial_OAI_nrUE.md)
|
||||
|
||||
# Verify RTT based range estimation in RFSIMULATOR mode
|
||||
Run the gNB
|
||||
|
||||
```bash
|
||||
cd ~/openairinterface5g/cmake_targets/ran_build/build
|
||||
sudo ./nr-softmodem --phy-test -E --gNBs.[0].min_rxtxtime 6 --rfsim -D 0 -U 0 -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210_RTT.conf --srs_threshold 0.3
|
||||
```
|
||||
|
||||
|
||||
Run the UE from a second terminal:
|
||||
|
||||
```bash
|
||||
cd ~/openairinterface5g/cmake_targets/ran_build/build
|
||||
sudo ./nr-uesoftmodem -E --phy-test --rfsim -O targets/PROJECTS/GENERIC-NR-5GC/CONF/ue.nr.prs.fr1.106prb_RTT.conf --telnetsrv --rfsimulator.options chanmod --prs_threshold 0.3
|
||||
```
|
||||
|
||||
Note that the options `--prs_threshold` and `--srs_threshold` lies between (0, 1] is the normalized theshold to detect the peak of the channel impulse response.
|
||||
|
||||
Verify that it is connected: you should see the following output at gNB:
|
||||
|
||||
```
|
||||
[NR_PHY] rxAnt 0, SRS ToA peak estimator 0 (samples), srs threshold 0.300000
|
||||
[NR_PHY] Distance between gNB and UE 0.0 meters
|
||||
|
||||
```
|
||||
and nrUE:
|
||||
|
||||
```
|
||||
[PHY] [gNB 0][rsc 0][Rx 0][sfn 211][slot 1] DL PRS ToA ==> 0.0 / 1536 samples, peak channel power -14.1 dBm, SNR +4.0 dB, rsrp -41.1 dBm
|
||||
|
||||
```
|
||||
|
||||
This log SRS ToA peak estimator provides the RTT in samples
|
||||
|
||||
Convert it to range using (SRS ToA peak estimator)/(2*fs)
|
||||
|
||||
fs is the sampling rate
|
||||
|
||||
---
|
||||
# Verify by varying the distances using telnet server
|
||||
Open a new terminal
|
||||
|
||||
```
|
||||
telnet 0 9090
|
||||
```
|
||||
you will see the following log
|
||||
|
||||
```
|
||||
Trying 0.0.0.0...
|
||||
Connected to 0.
|
||||
Escape character is '^]'.
|
||||
|
||||
softmodem_5Gue>
|
||||
```
|
||||
|
||||
set the distance using `setdistance` command from telnet
|
||||
|
||||
```
|
||||
softmodem_5Gue> rfsimu setdistance rfsimu_channel_enB0 100
|
||||
```
|
||||
|
||||
The interpretation of setdistance can be taken as 2*distance between the gNB and UE in meters.
|
||||
|
||||
you should see the following log at the telnet server
|
||||
```
|
||||
Trying 0.0.0.0...
|
||||
Connected to 0.
|
||||
Escape character is '^]'.
|
||||
|
||||
softmodem_5Gue> rfsimu setdistance rfsimu_channel_enB0 100
|
||||
softmodem_5Gue>
|
||||
rfsimu_setdistance_cmd: new_offset 15, new (exact) distance 97.589 m, new delay 0.000326 ms
|
||||
```
|
||||
|
||||
correspondingly you should see the RTT in samples at the gNB:
|
||||
|
||||
```
|
||||
[NR_PHY] rxAnt 0, SRS ToA peak estimator 15 (samples), srs threshold 0.300000
|
||||
[NR_PHY] Distance between gNB and UE 48.828125 meters
|
||||
```
|
||||
|
||||
The distance between the gNB and UE = (SRS ToA peak estimator)/(2*fs)
|
||||
|
||||
fs is the sampling rate
|
||||
|
||||
# Range estimation using USRP
|
||||
|
||||
Run the gNB:
|
||||
|
||||
```bash
|
||||
cd ~/openairinterface5g/cmake_targets/ran_build/build
|
||||
sudo ./nr-softmodem --phy-test -E --gNBs.[0].min_rxtxtime 6 -D 0 -U 0 -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210_RTT.conf --srs_threshold 0.3
|
||||
```
|
||||
|
||||
Run the UE:
|
||||
|
||||
```bash
|
||||
cd ~/openairinterface5g/cmake_targets/ran_build/build
|
||||
sudo ./nr-uesoftmodem -E --phy-test -O targets/PROJECTS/GENERIC-NR-5GC/CONF/ue.nr.prs.fr1.106prb_RTT.conf --prs_threshold 0.3
|
||||
```
|
||||
|
||||
NOTE: While taking the measurements using hardware, use `-A <samples>` option at the UE to calibrate the distance between the gNB and UE.
|
||||
|
||||
NOTE: Keep the gNB and UE at a known distance and calibrate it using `-A` option.
|
||||
|
||||
# Scripts
|
||||
|
||||
Steps to record and analyze the required data can also be found in [2]
|
||||
|
||||
# Datasets
|
||||
|
||||
Datasets collected at the Northeastern university burlington campus can be found in [link](https://hdl.handle.net/2047/D20772403)
|
||||
|
||||
# References
|
||||
[1]. R. Mundlamuri, R. Gangula, F. Kaltenberger and R. Knopp, "Novel Round Trip Time Estimation in 5G NR," GLOBECOM 2024 - 2024 IEEE Global Communications Conference, Cape Town, South Africa, 2024, pp. 3069-3074, doi: 10.1109/GLOBECOM52923.2024.10901749.
|
||||
|
||||
[2]. R. Mundlamuri, R. Gangula, F. Kaltenberger and R. Knopp, "5G NR Positioning with OpenAirInterface: Tools and Methodologies," 2025 20th Wireless On-Demand Network Systems and Services Conference (WONS), Hintertux, Austria, 2025, pp. 1-7.
|
||||
|
||||
[3]. R. Mundlamuri, R. Gangula, F. Kaltenberger, R. Knopp and T. Melodia, "Colosseum as a Digital Twin platform for Round Trip Time Estimation in 5G NR and beyond," submitted to IEEE TRANSACTIONS ON MOBILE COMPUTING, 2025.
|
||||
|
||||
[4]. https://hdl.handle.net/2047/D20772403
|
||||
@@ -1117,7 +1117,8 @@ void *UE_thread(void *arg)
|
||||
rxp[i] = (void *)&UE->common_vars.rxdata[i][firstSymSamp + fp->get_samples_slot_timestamp(slot_nr, fp, 0)];
|
||||
|
||||
int iq_shift_to_apply = 0;
|
||||
if (slot_nr == nb_slot_frame - 1) {
|
||||
int slot_prs = 1; // This is hardcoded make sure this matches with the scheduled slot of PRS
|
||||
if (slot_nr == (slot_prs+1)%fp->slots_per_frame && curMsg.proc.frame_rx%2==0) {
|
||||
// we shift of half of measured drift, at each beginning of frame for both rx and tx
|
||||
iq_shift_to_apply = shiftForNextFrame;
|
||||
// TODO: remove this autonomous TA and use up-to-date values of ta-Common, ta-CommonDrift and ta-CommonDriftVariant from received SIB19 instead
|
||||
@@ -1175,8 +1176,10 @@ void *UE_thread(void *arg)
|
||||
nr_rxtx_thread_data_t *curMsgRx = (nr_rxtx_thread_data_t *)NotifiedFifoData(newRx);
|
||||
*curMsgRx = (nr_rxtx_thread_data_t){.proc = curMsg.proc, .UE = UE};
|
||||
int ret = UE_dl_preprocessing(UE, &curMsgRx->proc, tx_wait_for_dlsch, &curMsgRx->phy_data, &stats_printed);
|
||||
if (ret != INT_MAX)
|
||||
shiftForNextFrame = ret;
|
||||
prs_meas_t **prs_meas = UE->prs_vars[0]->prs_resource[0].prs_meas;
|
||||
int prs_ret = -prs_meas[0]->dl_toa;
|
||||
//if (prs_ret != INT_MAX)
|
||||
shiftForNextFrame = prs_ret;
|
||||
pushNotifiedFIFO(&UE->dl_actors[curMsg.proc.nr_slot_rx % NUM_DL_ACTORS].fifo, newRx);
|
||||
|
||||
// apply new NTN timing information
|
||||
|
||||
@@ -95,6 +95,8 @@ extern "C"
|
||||
#define CONFIG_HLP_NOTWAIT "don't wait for tracer, start immediately\n"
|
||||
#define CONFIG_HLP_TNOFORK "to ease debugging with gdb\n"
|
||||
|
||||
#define CONFIG_HLP_PRS_THRESHOLD "Set PRS detection threshold \n"
|
||||
#define CONFIG_HLP_SRS_THRESHOLD "Set SRS detection threshold \n"
|
||||
#define CONFIG_HLP_NUMEROLOGY "adding numerology for 5G\n"
|
||||
#define CONFIG_HLP_BAND "band index\n"
|
||||
#define CONFIG_HLP_EMULATE_RF "Emulated RF enabled(disable by defult)\n"
|
||||
@@ -128,6 +130,8 @@ extern "C"
|
||||
#define SL_MODE softmodem_params.sl_mode
|
||||
#define CHAIN_OFFSET softmodem_params.chain_offset
|
||||
#define NUMEROLOGY softmodem_params.numerology
|
||||
#define PRS_THRESHOLD softmodem_params.prs_threshold
|
||||
#define SRS_THRESHOLD softmodem_params.srs_threshold
|
||||
#define BAND softmodem_params.band
|
||||
#define EMULATE_RF softmodem_params.emulate_rf
|
||||
#define CLOCK_SOURCE softmodem_params.clock_source
|
||||
@@ -164,8 +168,10 @@ extern int usrp_tx_thread;
|
||||
{"CO" , CONFIG_HLP_ULF, 0, .iptr=&(uplink_frequency_offset[0][0]), .defintval=0, TYPE_INT, 0}, \
|
||||
{"a" , CONFIG_HLP_CHOFF, 0, .iptr=&CHAIN_OFFSET, .defintval=0, TYPE_INT, 0}, \
|
||||
{"d" , CONFIG_HLP_SOFTS, PARAMFLAG_BOOL, .uptr=&do_forms, .defintval=0, TYPE_UINT, 0}, \
|
||||
{"q" , CONFIG_HLP_STMON, PARAMFLAG_BOOL, .iptr=&cpu_meas_enabled, .defintval=0, TYPE_INT, 0}, \
|
||||
{"q" , CONFIG_HLP_STMON, PARAMFLAG_BOOL, .iptr=&cpu_meas_enabled, .defintval=0, TYPE_INT, 0}, \
|
||||
{"numerology" , CONFIG_HLP_NUMEROLOGY, 0, .iptr=&NUMEROLOGY, .defintval=1, TYPE_INT, 0}, \
|
||||
{"prs_threshold" , CONFIG_HLP_PRS_THRESHOLD, 0, .dblptr=&PRS_THRESHOLD, .defintval=0.3, TYPE_DOUBLE, 0}, \
|
||||
{"srs_threshold" , CONFIG_HLP_SRS_THRESHOLD, 0, .dblptr=&SRS_THRESHOLD, .defintval=0.3, TYPE_DOUBLE, 0}, \
|
||||
{"band" , CONFIG_HLP_BAND, 0, .iptr=&BAND, .defintval=78, TYPE_INT, 0}, \
|
||||
{"emulate-rf" , CONFIG_HLP_EMULATE_RF, PARAMFLAG_BOOL, .iptr=&EMULATE_RF, .defintval=0, TYPE_INT, 0}, \
|
||||
{"parallel-config", CONFIG_HLP_PARALLEL_CMD, 0, .strptr=¶llel_config, .defstrval=NULL, TYPE_STRING, 0}, \
|
||||
@@ -185,7 +191,7 @@ extern int usrp_tx_thread;
|
||||
{"disable-stats", CONFIG_HLP_STATS_DISABLE, PARAMFLAG_BOOL, .iptr=&stats_disabled, .defintval=0, TYPE_INT, 0}, \
|
||||
{"no-itti-threads", CONFIG_HLP_NOITTI, PARAMFLAG_BOOL, .iptr=&softmodem_params.no_itti, .defintval=0, TYPE_INT, 0}, \
|
||||
{"sync-ref", CONFIG_HLP_SYNC_REF, 0, .uptr=&SYNC_REF, .defintval=0, TYPE_UINT, 0}, \
|
||||
{"A" , CONFIG_HLP_TADV, 0, .iptr=&softmodem_params.command_line_sample_advance,.defintval=0, TYPE_INT, 0}, \
|
||||
{"A" , CONFIG_HLP_TADV, 0, .iptr=&softmodem_params.command_line_sample_advance,.defintval=0, TYPE_INT, 0}, \
|
||||
{"E" , CONFIG_HLP_TQFS, PARAMFLAG_BOOL, .iptr=&softmodem_params.threequarter_fs, .defintval=0, TYPE_INT, 0}, \
|
||||
{"imscope" , CONFIG_HLP_IMSCOPE, PARAMFLAG_BOOL, .uptr=&enable_imscope, .defintval=0, TYPE_UINT, 0}, \
|
||||
{"imscope-record" , CONFIG_HLP_IMSCOPE_RECORD,PARAMFLAG_BOOL, .uptr=&enable_imscope_record, .defintval=0, TYPE_UINT, 0}, \
|
||||
@@ -222,6 +228,8 @@ extern int usrp_tx_thread;
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s3a = { config_checkstr_assign_integer, \
|
||||
{"MONOLITHIC", "PNF", "VNF", "AERIAL","UE_STUB_PNF","UE_STUB_OFFNET","STANDALONE_PNF"}, \
|
||||
{NFAPI_MONOLITHIC, NFAPI_MODE_PNF, NFAPI_MODE_VNF, NFAPI_MODE_AERIAL,NFAPI_UE_STUB_PNF,NFAPI_UE_STUB_OFFNET,NFAPI_MODE_STANDALONE_PNF}, \
|
||||
@@ -328,6 +336,8 @@ typedef struct {
|
||||
int emulate_rf;
|
||||
int chain_offset;
|
||||
int numerology;
|
||||
double prs_threshold;
|
||||
double srs_threshold;
|
||||
int band;
|
||||
uint32_t clock_source;
|
||||
uint32_t timing_source;
|
||||
|
||||
@@ -81,6 +81,43 @@ int nr_est_timing_advance_srs(const NR_DL_FRAME_PARMS *frame_parms,
|
||||
return timing_advance_update;
|
||||
}
|
||||
|
||||
int peak_estimator_srs(const NR_DL_FRAME_PARMS *frame_parms,
|
||||
const c16_t srs_estimated_channel_time[][frame_parms->ofdm_symbol_size],
|
||||
float threshold)
|
||||
{
|
||||
int max_idx = 0;
|
||||
int max_val = 0;
|
||||
float abs_val_normalized = 0.0;
|
||||
|
||||
for (int aa = 0; aa < frame_parms->nb_antennas_rx; aa++) {
|
||||
for (int i = 0; i < frame_parms->ofdm_symbol_size; i++) {
|
||||
int temp = squaredMod(((c16_t*)srs_estimated_channel_time[aa])[i]);
|
||||
if (temp > max_val) {
|
||||
max_idx = i;
|
||||
max_val = temp;
|
||||
}
|
||||
}
|
||||
|
||||
if (max_val != 0) {
|
||||
for(int k = 0; k < frame_parms->ofdm_symbol_size; k++) {
|
||||
int abs_val = squaredMod(((c16_t*)srs_estimated_channel_time[aa])[k]);
|
||||
abs_val_normalized = (float)abs_val/(float)max_val;
|
||||
if(abs_val_normalized >= threshold) {
|
||||
max_idx = k;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (max_idx > frame_parms->ofdm_symbol_size/2) {
|
||||
max_idx = max_idx - frame_parms->ofdm_symbol_size;
|
||||
}
|
||||
|
||||
LOG_I(NR_PHY,"rxAnt %d, SRS ToA peak estimator %d (samples), srs threshold %f\n",aa,max_idx,threshold);
|
||||
}
|
||||
return max_idx;
|
||||
}
|
||||
|
||||
void dump_nr_I0_stats(FILE *fd,PHY_VARS_gNB *gNB) {
|
||||
|
||||
|
||||
|
||||
@@ -66,6 +66,11 @@ void nr_gnb_measurements(PHY_VARS_gNB *gNB,
|
||||
int nr_est_timing_advance_srs(const NR_DL_FRAME_PARMS *frame_parms,
|
||||
const c16_t srs_estimated_channel_time[][frame_parms->ofdm_symbol_size]);
|
||||
|
||||
int peak_estimator_srs(const NR_DL_FRAME_PARMS *frame_parms,
|
||||
const c16_t srs_estimated_channel_time[][frame_parms->ofdm_symbol_size],
|
||||
float threshold);
|
||||
|
||||
|
||||
void nr_pusch_ptrs_processing(PHY_VARS_gNB *gNB,
|
||||
NR_DL_FRAME_PARMS *frame_parms,
|
||||
nfapi_nr_pusch_pdu_t *rel15_ul,
|
||||
|
||||
@@ -46,9 +46,10 @@
|
||||
#define NO_INTERP 1
|
||||
|
||||
/* Generic function to find the peak of channel estimation buffer */
|
||||
void peak_estimator(int32_t *buffer, int32_t buf_len, int32_t *peak_idx, int32_t *peak_val, int32_t mean_val)
|
||||
void peak_estimator(int32_t *buffer, int32_t buf_len, int32_t *peak_idx, int32_t *peak_val, int32_t mean_val, float threshold)
|
||||
{
|
||||
int32_t max_val = 0, max_idx = 0, abs_val = 0;
|
||||
float abs_val_normalized = 0.0, max_val_normalized = 0.0;
|
||||
for(int k = 0; k < buf_len; k++)
|
||||
{
|
||||
abs_val = squaredMod(((c16_t*)buffer)[k]);
|
||||
@@ -59,15 +60,37 @@ void peak_estimator(int32_t *buffer, int32_t buf_len, int32_t *peak_idx, int32_t
|
||||
}
|
||||
}
|
||||
|
||||
if (max_val != 0) {
|
||||
for(int k = 0; k < buf_len; k++)
|
||||
{
|
||||
abs_val = squaredMod(((c16_t*)buffer)[k]);
|
||||
abs_val_normalized = (float)abs_val/(float)max_val;
|
||||
if(abs_val_normalized >= threshold)
|
||||
{
|
||||
max_val_normalized = abs_val_normalized;
|
||||
//max_idx = k-(buf_len/2);
|
||||
max_idx = k;
|
||||
break;
|
||||
}
|
||||
}
|
||||
*peak_val = max_val;
|
||||
*peak_idx = max_idx;
|
||||
} else {
|
||||
*peak_val = 0;
|
||||
*peak_idx = 0;
|
||||
}
|
||||
LOG_I(PHY, "PRS ToA estimator: peak_idx %d, max_val_normalized %f\n", *peak_idx, max_val_normalized);
|
||||
|
||||
|
||||
// Check for detection threshold
|
||||
LOG_D(PHY, "PRS ToA estimator: max_val %d, mean_val %d, max_idx %d\n", max_val, mean_val, max_idx);
|
||||
/*LOG_D(PHY, "PRS ToA estimator: max_val %d, mean_val %d, max_idx %d\n", max_val, mean_val, max_idx);
|
||||
if ((mean_val != 0) && (max_val / mean_val > 10)) {
|
||||
*peak_val = max_val;
|
||||
*peak_idx = max_idx;
|
||||
} else {
|
||||
*peak_val = 0;
|
||||
*peak_idx = 0;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
int nr_prs_channel_estimation(uint8_t gNB_id,
|
||||
@@ -485,7 +508,7 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
|
||||
|
||||
// peak estimator
|
||||
mean_val = squaredMod(((c16_t *)ch_tmp)[(prs_cfg->NumRB * 12) >> 1]);
|
||||
peak_estimator(&chT_interpol[rxAnt][0], NR_PRS_IDFT_OVERSAMP_FACTOR * frame_params->ofdm_symbol_size, &prs_toa, &ch_pwr, mean_val);
|
||||
peak_estimator(&chT_interpol[rxAnt][0], NR_PRS_IDFT_OVERSAMP_FACTOR * frame_params->ofdm_symbol_size, &prs_toa, &ch_pwr, mean_val, get_softmodem_params()->prs_threshold);
|
||||
|
||||
// adjusting the rx_gains for channel peak power
|
||||
ch_pwr_dbm = 10 * log10(ch_pwr) + 30 - SQ15_SQUARED_NORM_FACTOR_DB - ((int)openair0_cfg[0].rx_gain[0] - (int)openair0_cfg[0].rx_gain_offset[0]) - dB_fixed(frame_params->ofdm_symbol_size);
|
||||
|
||||
@@ -39,7 +39,7 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
|
||||
c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]);
|
||||
|
||||
/* Generic function to find the peak of channel estimation buffer */
|
||||
void peak_estimator(int32_t *buffer, int32_t buf_len, int32_t *peak_idx, int32_t *peak_val, int32_t mean_val);
|
||||
void peak_estimator(int32_t *buffer, int32_t buf_len, int32_t *peak_idx, int32_t *peak_val, int32_t mean_val, float threshold);
|
||||
|
||||
/*!
|
||||
\brief This function performs channel estimation including frequency and temporal interpolation
|
||||
|
||||
@@ -982,6 +982,13 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, N
|
||||
UL_INFO->srs_ind.sfn = frame_rx;
|
||||
UL_INFO->srs_ind.slot = slot_rx;
|
||||
|
||||
|
||||
int srs_toa = peak_estimator_srs(frame_parms,srs_estimated_channel_time[0],get_softmodem_params()->srs_threshold);
|
||||
|
||||
double fs = gNB->RU_list[0]->openair0_cfg.sample_rate;
|
||||
double range = (300000000/(2.0*fs))*(double)srs_toa;
|
||||
LOG_I(NR_PHY,"Distance between gNB and UE %f meters\n",range);
|
||||
|
||||
// data model difficult to understand, nfapi do malloc for this pointer
|
||||
UL_INFO->srs_ind.pdu_list = UL_INFO->srs_pdu_list;
|
||||
nfapi_nr_srs_indication_pdu_t *srs_indication = UL_INFO->srs_pdu_list + UL_INFO->srs_ind.number_of_pdus++;
|
||||
|
||||
@@ -0,0 +1,303 @@
|
||||
Active_gNBs = ( "gNB-OAI");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
gNBs =
|
||||
(
|
||||
{
|
||||
////////// Identification parameters:
|
||||
gNB_ID = 0xe00;
|
||||
gNB_name = "gNB-OAI";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = 1;
|
||||
plmn_list = ({ mcc = 001; mnc = 01; mnc_length = 2; snssaiList = ({ sst = 1; }) });
|
||||
|
||||
nr_cellid = 12345678L;
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
do_CSIRS = 0;
|
||||
do_SRS = 1;
|
||||
|
||||
#uess_agg_levels = [0,1,2,2,1]
|
||||
servingCellConfigCommon = (
|
||||
{
|
||||
#spCellConfigCommon
|
||||
|
||||
physCellId = 0;
|
||||
|
||||
# downlinkConfigCommon
|
||||
#frequencyInfoDL
|
||||
# this is 3600 MHz + 43 PRBs@30kHz SCS (same as initial BWP)
|
||||
absoluteFrequencySSB = 641280;
|
||||
dl_frequencyBand = 78;
|
||||
# this is 3600 MHz
|
||||
dl_absoluteFrequencyPointA = 640008;
|
||||
#scs-SpecificCarrierList
|
||||
dl_offstToCarrier = 0;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
dl_subcarrierSpacing = 1;
|
||||
dl_carrierBandwidth = 106;
|
||||
#initialDownlinkBWP
|
||||
#genericParameters
|
||||
# this is RBstart=27,L=48 (275*(L-1))+RBstart
|
||||
initialDLBWPlocationAndBandwidth = 28875; # 6366 12925 12956 28875 12952
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
initialDLBWPsubcarrierSpacing = 1;
|
||||
#pdcch-ConfigCommon
|
||||
initialDLBWPcontrolResourceSetZero = 12;
|
||||
initialDLBWPsearchSpaceZero = 0;
|
||||
|
||||
#uplinkConfigCommon
|
||||
#frequencyInfoUL
|
||||
ul_frequencyBand = 78;
|
||||
#scs-SpecificCarrierList
|
||||
ul_offstToCarrier = 0;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
ul_subcarrierSpacing = 1;
|
||||
ul_carrierBandwidth = 106;
|
||||
pMax = 20;
|
||||
#initialUplinkBWP
|
||||
#genericParameters
|
||||
initialULBWPlocationAndBandwidth = 28875;
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
initialULBWPsubcarrierSpacing = 1;
|
||||
#rach-ConfigCommon
|
||||
#rach-ConfigGeneric
|
||||
prach_ConfigurationIndex = 98;
|
||||
#prach_msg1_FDM
|
||||
#0 = one, 1=two, 2=four, 3=eight
|
||||
prach_msg1_FDM = 0;
|
||||
prach_msg1_FrequencyStart = 0;
|
||||
zeroCorrelationZoneConfig = 13;
|
||||
preambleReceivedTargetPower = -96;
|
||||
#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200)
|
||||
preambleTransMax = 6;
|
||||
#powerRampingStep
|
||||
# 0=dB0,1=dB2,2=dB4,3=dB6
|
||||
powerRampingStep = 1;
|
||||
#ra_ReponseWindow
|
||||
#1,2,4,8,10,20,40,80
|
||||
ra_ResponseWindow = 4;
|
||||
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
|
||||
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
|
||||
#one (0..15) 4,8,12,16,...60,64
|
||||
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14;
|
||||
#ra_ContentionResolutionTimer
|
||||
#(0..7) 8,16,24,32,40,48,56,64
|
||||
ra_ContentionResolutionTimer = 7;
|
||||
rsrp_ThresholdSSB = 19;
|
||||
#prach-RootSequenceIndex_PR
|
||||
#1 = 839, 2 = 139
|
||||
prach_RootSequenceIndex_PR = 2;
|
||||
prach_RootSequenceIndex = 1;
|
||||
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
|
||||
#
|
||||
msg1_SubcarrierSpacing = 1,
|
||||
# restrictedSetConfig
|
||||
# 0=unrestricted, 1=restricted type A, 2=restricted type B
|
||||
restrictedSetConfig = 0,
|
||||
|
||||
msg3_DeltaPreamble = 1;
|
||||
p0_NominalWithGrant =-90;
|
||||
|
||||
# pucch-ConfigCommon setup :
|
||||
# pucchGroupHopping
|
||||
# 0 = neither, 1= group hopping, 2=sequence hopping
|
||||
pucchGroupHopping = 0;
|
||||
hoppingId = 40;
|
||||
p0_nominal = -90;
|
||||
|
||||
ssb_PositionsInBurst_Bitmap = 1;
|
||||
|
||||
# ssb_periodicityServingCell
|
||||
# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1
|
||||
ssb_periodicityServingCell = 2;
|
||||
|
||||
# dmrs_TypeA_position
|
||||
# 0 = pos2, 1 = pos3
|
||||
dmrs_TypeA_Position = 0;
|
||||
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
subcarrierSpacing = 1;
|
||||
|
||||
|
||||
#tdd-UL-DL-ConfigurationCommon
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
referenceSubcarrierSpacing = 1;
|
||||
# pattern1
|
||||
# dl_UL_TransmissionPeriodicity
|
||||
# 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
|
||||
dl_UL_TransmissionPeriodicity = 6;
|
||||
nrofDownlinkSlots = 7;
|
||||
nrofDownlinkSymbols = 6;
|
||||
nrofUplinkSlots = 2;
|
||||
nrofUplinkSymbols = 4;
|
||||
|
||||
ssPBCH_BlockPower = -25;
|
||||
}
|
||||
|
||||
);
|
||||
|
||||
|
||||
# ------- SCTP definitions
|
||||
SCTP :
|
||||
{
|
||||
# Number of streams to use in input/output
|
||||
SCTP_INSTREAMS = 2;
|
||||
SCTP_OUTSTREAMS = 2;
|
||||
};
|
||||
|
||||
|
||||
////////// AMF parameters:
|
||||
amf_ip_address = ({ ipv4 = "192.168.70.132"; });
|
||||
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.70.129/24";
|
||||
GNB_IPV4_ADDRESS_FOR_NGU = "192.168.70.129/24";
|
||||
GNB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
};
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
MACRLCs = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_s_preference = "local_L1";
|
||||
tr_n_preference = "local_RRC";
|
||||
pusch_TargetSNRx10 = 150;
|
||||
pucch_TargetSNRx10 = 200;
|
||||
}
|
||||
);
|
||||
|
||||
prs_config = (
|
||||
{
|
||||
NumPRSResources = 1;
|
||||
PRSResourceSetPeriod = [20, 1];
|
||||
SymbolStart = [7];
|
||||
NumPRSSymbols = [6];
|
||||
NumRB = 106;
|
||||
RBOffset = 0;
|
||||
CombSize = 2;
|
||||
REOffset = [0];
|
||||
PRSResourceOffset = [0];
|
||||
PRSResourceRepetition = 1;
|
||||
PRSResourceTimeGap = 1;
|
||||
NPRS_ID = [0];
|
||||
MutingPattern1 = [];
|
||||
MutingPattern2 = [];
|
||||
MutingBitRepetition = 1;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "local_mac";
|
||||
prach_dtx_threshold = 120;
|
||||
pucch0_dtx_threshold = 100;
|
||||
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
|
||||
}
|
||||
);
|
||||
|
||||
RUs = (
|
||||
{
|
||||
local_rf = "yes"
|
||||
nb_tx = 1
|
||||
nb_rx = 1
|
||||
att_tx = 12;
|
||||
att_rx = 12;
|
||||
bands = [78];
|
||||
max_pdschReferenceSignalPower = -27;
|
||||
max_rxgain = 114;
|
||||
eNB_instances = [0];
|
||||
clock_src = "internal";
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
rfsimulator :
|
||||
{
|
||||
serveraddr = "server";
|
||||
serverport = 4043;
|
||||
options = (); #("saviq"); or/and "chanmod"
|
||||
modelname = "AWGN";
|
||||
IQfile = "/tmp/rfsimulator.iqs";
|
||||
};
|
||||
|
||||
security = {
|
||||
# preferred ciphering algorithms
|
||||
# the first one of the list that an UE supports in chosen
|
||||
# valid values: nea0, nea1, nea2, nea3
|
||||
ciphering_algorithms = ( "nea0" );
|
||||
|
||||
# preferred integrity algorithms
|
||||
# the first one of the list that an UE supports in chosen
|
||||
# valid values: nia0, nia1, nia2, nia3
|
||||
integrity_algorithms = ( "nia2", "nia0" );
|
||||
|
||||
# setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter
|
||||
# what 'ciphering_algorithms' configures; same thing for 'drb_integrity'
|
||||
drb_ciphering = "yes";
|
||||
drb_integrity = "no";
|
||||
};
|
||||
|
||||
log_config :
|
||||
{
|
||||
global_log_level ="info";
|
||||
hw_log_level ="info";
|
||||
phy_log_level ="info";
|
||||
mac_log_level ="info";
|
||||
rlc_log_level ="info";
|
||||
pdcp_log_level ="info";
|
||||
rrc_log_level ="info";
|
||||
ngap_log_level ="debug";
|
||||
f1ap_log_level ="debug";
|
||||
};
|
||||
|
||||
e2_agent = {
|
||||
near_ric_ip_addr = "127.0.0.1";
|
||||
#sm_dir = "/path/where/the/SMs/are/located/"
|
||||
sm_dir = "/usr/local/lib/flexric/"
|
||||
};
|
||||
|
||||
channelmod = {
|
||||
max_chan=10;
|
||||
modellist="modellist_rfsimu_1";
|
||||
modellist_rfsimu_1 = (
|
||||
{
|
||||
model_name = "rfsimu_channel_enB0"
|
||||
type = "AWGN";
|
||||
ploss_dB = 0;
|
||||
noise_power_dB = -10;
|
||||
forgetfact = 0;
|
||||
offset = 0;
|
||||
ds_tdl = 0;
|
||||
},
|
||||
|
||||
{
|
||||
model_name = "rfsimu_channel_ue0"
|
||||
type = "AWGN";
|
||||
ploss_dB = 0;
|
||||
noise_power_dB = -10;
|
||||
forgetfact = 0;
|
||||
offset = 0;
|
||||
ds_tdl = 0;
|
||||
}
|
||||
|
||||
|
||||
);
|
||||
|
||||
};
|
||||
@@ -0,0 +1,54 @@
|
||||
PRSs =
|
||||
(
|
||||
{
|
||||
Active_gNBs = 1;
|
||||
prs_config0 = (
|
||||
{
|
||||
gNB_id = 0;
|
||||
NumPRSResources = 1;
|
||||
PRSResourceSetPeriod = [20, 1];
|
||||
SymbolStart = [7];
|
||||
NumPRSSymbols = [6];
|
||||
NumRB = 106;
|
||||
RBOffset = 0;
|
||||
CombSize = 2;
|
||||
REOffset = [0];
|
||||
PRSResourceOffset = [0];
|
||||
PRSResourceRepetition = 1;
|
||||
PRSResourceTimeGap = 1;
|
||||
NPRS_ID = [0];
|
||||
MutingPattern1 = [];
|
||||
MutingPattern2 = [];
|
||||
MutingBitRepetition = 1;
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
channelmod = {
|
||||
max_chan=10;
|
||||
modellist="modellist_rfsimu_1";
|
||||
modellist_rfsimu_1 = (
|
||||
{
|
||||
model_name = "rfsimu_channel_enB0"
|
||||
type = "AWGN";
|
||||
ploss_dB = 0;
|
||||
noise_power_dB = -10;
|
||||
forgetfact = 0;
|
||||
offset = 0;
|
||||
ds_tdl = 0;
|
||||
},
|
||||
|
||||
{
|
||||
model_name = "rfsimu_channel_ue0"
|
||||
type = "AWGN";
|
||||
ploss_dB = 0;
|
||||
noise_power_dB = -10;
|
||||
forgetfact = 0;
|
||||
offset = 0;
|
||||
ds_tdl = 0;
|
||||
}
|
||||
);
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user