Closed parklize closed 3 years ago
You can group and aggregate the lines of the DCI tracefile by TTI and direction (UL/DL), e.g:
import pandas as pd
DCI_TRACEFILE = 'example-dci.csv'
COLUMNS_FALCON_DCI = [
'timestamp', # unix timestamp in [s] as float, 1µs resolution
'sfn', # system frame number
'subframe', # subframe index {0,1,...,9}
'rnti', # the addressed RNTI
'direction', # 0 for uplink alloc., 1 for downlink alloc.
'mcs_idx', # MCS index of the first transport block
'nof_prb', # number of allocated PRBs
'tbs_sum', # total Transport Block Size (TBS) in [Bit]
'tbs_0', # TBS of first transport block (-1 for SISO)
'tbs_1', # TBS of second transport block (-1 for SISO)
'format', # index+1 of DCI format in array flacon_ue_all_formats[], see DCISearch.cc
'ndi', # new data indicator for first transport block
'ndi_1', # new data indicator for second transport block
'harq_idx', # HARQ index
'ncce', # index of first Control Channel Element (CCE) of this DCI within PDCCH
'L', # aggregation level of this DCI {0..3}, occupies 2^L consecutive CCEs.
'cfi', # number of OFDM symbols occupied by PDCCH
'histval', # number of occurences of this RNTI within last 200ms
'nof_bits', # DCI length (without CRC)
'hex' # raw DCI content as hex string, see sscan_hex()/sprint_hex() in falcon_dci.c
]
dci = pd.read_csv(DCI_TRACEFILE, sep='\t', names=COLUMNS_FALCON_DCI)
dci['tti'] = dci['sfn'] * 10 + dci['subframe']
tti_ul = dci[['tti', 'nof_prb', 'tbs_sum']].loc[dci['direction'] == 0].groupby(['tti']).sum().reset_index()
tti_ul.plot(x='tti', y='nof_prb', title="Spectral Utilization")
tti_ul.plot(x='tti', y='tbs_sum', title="Throughput (kbit/s)")
tti_dl = dci[['tti', 'nof_prb', 'tbs_sum']].loc[dci['direction'] == 1].groupby(['tti']).sum().reset_index()
tti_dl.plot(x='tti', y='nof_prb', title="Spectral Utilization")
tti_dl.plot(x='tti', y='tbs_sum', title="Throughput (kbit/s)")
@falkenber9 Thanks for quick response. This is very useful!
Is it somehow possible to get the PRB utilization (%)? I guess something like the allocated PRB - "nof_prb" / total PRB.
Yes, just compute 100 * nof_prb / tot_prb
to get the percentage.
The total number of PRB is printed to stdout upon cell synchronization after MIB has been decoded:
Example:
Decoded MIB. SFN: 100, offset 0
I'm interested in getting PRB utilization in TTI level for a cell (1 ms). I saw COLUMNS collected by FALCON contains 'nof_prb', # number of allocated PRBs, but not sure how to convert it to a cell PRB utilization/ms with other COLUMNS. Is it possible in FALCON ? if possible, how to derive the PRB utilization/ms?