Commit 3b0cad7b authored by francescomani's avatar francescomani

removing middle PRB to avoid wrong noise level computation for PUSCH

parent 5324e0c1
...@@ -162,7 +162,8 @@ void gNB_I0_measurements(PHY_VARS_gNB *gNB,int slot, int first_symb,int num_symb ...@@ -162,7 +162,8 @@ void gNB_I0_measurements(PHY_VARS_gNB *gNB,int slot, int first_symb,int num_symb
measurements->n0_subband_power[aarx][rb]=0; measurements->n0_subband_power[aarx][rb]=0;
} }
int offset0 = (slot&3)*(frame_parms->symbols_per_slot * frame_parms->ofdm_symbol_size) + (frame_parms->first_carrier_offset + (rb*12))%frame_parms->ofdm_symbol_size; int offset0 = (slot&3)*(frame_parms->symbols_per_slot * frame_parms->ofdm_symbol_size) + (frame_parms->first_carrier_offset + (rb*12))%frame_parms->ofdm_symbol_size;
if ((gNB->rb_mask_ul[s][rb >> 5] & (1U << (rb & 31))) == 0) { // check that rb was not used in this subframe if ((gNB->rb_mask_ul[s][rb >> 5] & (1U << (rb & 31))) == 0 && // check that rb was not used in this subframe
rb != (frame_parms->N_RB_UL+1)>>1) { // skip middle PRB because of artificial noise possibly created by FFT
nb_symb[rb]++; nb_symb[rb]++;
for (int aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) { for (int aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
int offset = offset0 + (s*frame_parms->ofdm_symbol_size); int offset = offset0 + (s*frame_parms->ofdm_symbol_size);
...@@ -174,6 +175,7 @@ void gNB_I0_measurements(PHY_VARS_gNB *gNB,int slot, int first_symb,int num_symb ...@@ -174,6 +175,7 @@ void gNB_I0_measurements(PHY_VARS_gNB *gNB,int slot, int first_symb,int num_symb
} }
AssertFatal(ul_ch, "RX signal buffer (freq) problem\n"); AssertFatal(ul_ch, "RX signal buffer (freq) problem\n");
measurements->n0_subband_power[aarx][rb] += signal_energy_nodc(ul_ch,len); measurements->n0_subband_power[aarx][rb] += signal_energy_nodc(ul_ch,len);
LOG_D(PHY,"aarx %d RB %d n0_subband_power %d\n", aarx, rb, measurements->n0_subband_power[aarx][rb]);
} //antenna } //antenna
} }
} //rb } //rb
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment