RSRP Measurement
Hello,
It is more a discussion than an issue, but might end up being indeed an issue.
I am working on handover with OAI UE. There are bugs here and there (it was quite hard to handle HO in all layers), but overall is working. I however have trouble understanding RSRP measurement.
We assume :
Neighbor cell id: 1
,
N_RB_DL: 25
=> ue->frame_parms.first_carrier_offset: 362
(according to function init_frame_parms
)
First we have (line 329): Nid_cell = ue->measurements.adj_cell_id[eNB_offset-1];
. We assume that we are scanning a neighbor cell which is id 1.
So Nid_cell = 1
nushift = Nid_cell%6;
=> nushift = 1
1 : We enter the main loop : for (l=0,nu=0; l<=(4-ue->frame_parms.Ncp); l+=(4-ue->frame_parms.Ncp),nu=3)
First time we are in the loop, we have:
l = 0
and nu = 0
, so
k = (nu + nushift)%6;
=> k = (0 + 1)%6 = 1
2: We enter second loop, we stay once because we have only one antenna: for (aarx=0; aarx<ue->frame_parms.nb_antennas_rx; aarx++)
rxF = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF[aarx][(l*ue->frame_parms.ofdm_symbol_size)];
rxF currently contains data of symbol number 0 (because l = 0
)
Then we calculate an offset that is the first thing I don't really understand. At first glance, I think that it represents subcarrier offset.
off = (ue->frame_parms.first_carrier_offset+k)<<1;
With above assumption, we have off = (362 + 1) << 1 = 363 << 1 = 726
We know that cell-specific reference signal (CRS) is shifted by an order of subcarrier. This shift here is represented by k.
According to this knowledge, if we were scanning a cell with id%6==0
, then its corresponding CRS subcarrier would be (362+0) << 1 = 724
So it would mean that rxF[724]
and rxF[726]
represent two consecutive subcarriers.
We increment off by 12, which means that we go to subcarrier + 6 which is the next CRS in current OFDM symbol. We keep incrementing until it reaches ofdm_symbol_size<<1
which is 512<<1 = 1024
. According to assumption above, off=724
is a subcarrier, off=726
is an adjacent subcarrier. off can increase up to 1024. Second thing that I don't understand: would this mean there are 512 subcarriers? I would say no 25 RB corresponds to 300 subcarrier, 50 RB corresponds to 600. Why do we chose to increase frequency up to a value related to OFDM symbol size?
I think that there is a confusion between frequency and time.
Third thing: it seems that we calculate RSRP of a single CRS symbol instead of 2, because of:
if (l==(4-ue->frame_parms.Ncp))
that is not validated the first time we enter the loop 1.
Fourth and last thing that I mentionned in the mailing list:
ue->measurements.rsrp[eNB_offset]/=(2*ue->frame_parms.N_RB_DL*ue->frame_parms.ofdm_symbol_size);
We divide RSRP by the size of OFDM symbol, however we never add up such amount of RSRP, so I think there is no reason to divide by this.
ue->measurements.rsrp[eNB_offset]/=(2*ue->frame_parms.N_RB_DL);
Anyone could comment on this?