Commit 49f86b0a authored by Raymond Knopp's avatar Raymond Knopp

added LUT for finer-grain ULSCH power measurement compensation based on TBS....

added LUT for finer-grain ULSCH power measurement compensation based on TBS. Still seems too high, to be checked some more.
parent ccfe5a04
......@@ -1857,6 +1857,8 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
generate_ul_ref_sigs_rx();
init_ulsch_power_LUT();
// SRS
for (UE_id=0; UE_id<NUMBER_OF_UE_MAX; UE_id++) {
srs_vars[UE_id].srs = (int32_t*)malloc16_clear(2*fp->ofdm_symbol_size*sizeof(int32_t));
......
......@@ -2109,6 +2109,8 @@ int32_t rx_pucch_emul(PHY_VARS_eNB *phy_vars_eNB,
uint8_t *payload);
void init_ulsch_power_LUT(void);
/*!
\brief Check for PRACH TXop in subframe
@param frame_parms Pointer to LTE_DL_FRAME_PARMS
......
......@@ -1102,7 +1102,15 @@ void ulsch_channel_level(int32_t **drs_ch_estimates_ext,
#endif
}
int ulsch_power_LUT[750];
void init_ulsch_power_LUT() {
int i;
for (i=0;i<750;i++) ulsch_power_LUT[i] = (int)ceil((pow(2.0,(double)i/100) - 1.0));
}
void rx_ulsch(PHY_VARS_eNB *eNB,
eNB_rxtx_proc_t *proc,
......@@ -1166,19 +1174,26 @@ void rx_ulsch(PHY_VARS_eNB *eNB,
int correction_factor = 1;
int deltaMCS=1;
int MPR_times_Ks;
int MPR_times_100Ks;
if (deltaMCS==1) {
// Note we're using TBS instead of sumKr, since didn't run segmentation yet!
MPR_times_Ks = 5*ulsch[UE_id]->harq_processes[harq_pid]->TBS/(ulsch[UE_id]->harq_processes[harq_pid]->nb_rb*12*4*ulsch[UE_id]->harq_processes[harq_pid]->Nsymb_pusch);
if (MPR_times_Ks > 0) correction_factor = (1<<MPR_times_Ks) - 1;
// Note we're using TBS instead of sumKr, since didn't run segmentation yet!
MPR_times_100Ks = 500*ulsch[UE_id]->harq_processes[harq_pid]->TBS/(ulsch[UE_id]->harq_processes[harq_pid]->nb_rb*12*4*ulsch[UE_id]->harq_processes[harq_pid]->Nsymb_pusch);
AssertFatal(MPR_times_100Ks < 750 && MPR_times_100Ks >= 0,"Impossible value for MPR_times_100Ks %d (TBS %d,Nre %d)\n",
MPR_times_100Ks,ulsch[UE_id]->harq_processes[harq_pid]->TBS,
(ulsch[UE_id]->harq_processes[harq_pid]->nb_rb*12*4*ulsch[UE_id]->harq_processes[harq_pid]->Nsymb_pusch));
if (MPR_times_100Ks > 0) correction_factor = ulsch_power_LUT[MPR_times_100Ks];
}
for (i=0; i<frame_parms->nb_antennas_rx; i++) {
pusch_vars->ulsch_power[i] = signal_energy_nodc(pusch_vars->drs_ch_estimates[i],
ulsch[UE_id]->harq_processes[harq_pid]->nb_rb*12)/correction_factor;
//printf("%4.4d.%d power harq_pid %d rb %2.2d TBS %2.2d (MPR_times_Ks %d correction %d) power %d dBtimes10\n", proc->frame_rx, proc->subframe_rx, harq_pid, ulsch[UE_id]->harq_processes[harq_pid]->nb_rb, ulsch[UE_id]->harq_processes[harq_pid]->TBS,MPR_times_Ks,correction_factor,dB_fixed_times10(pusch_vars->ulsch_power[i]));
/* printf("%4.4d.%d power harq_pid %d rb %2.2d TBS %2.2d (MPR_times_Ks %d correction %d) power %d dBtimes10\n", proc->frame_rx, proc->subframe_rx, harq_pid, ulsch[UE_id]->harq_processes[harq_pid]->nb_rb, ulsch[UE_id]->harq_processes[harq_pid]->TBS,MPR_times_100Ks,correction_factor,dB_fixed_times10(pusch_vars->ulsch_power[i]));
*/
}
......
......@@ -577,7 +577,6 @@ static void* eNB_thread_prach_br( void* param ) {
#endif
extern void init_fep_thread(PHY_VARS_eNB *, pthread_attr_t *);
extern void init_td_thread(PHY_VARS_eNB *, pthread_attr_t *);
extern void init_te_thread(PHY_VARS_eNB *, pthread_attr_t *);
......
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