Commit 549a0b61 authored by knopp's avatar knopp

Adjustment for received power calculation in eNB pusch procedures. Added...

Adjustment for received power calculation in eNB pusch procedures. Added factor to account for mcs (mimic the power control adjustment in UE).
activated periodic trace for PHR/PUSCH SNR/PUCCH SNR in MAC.
parent 1f9ab059
......@@ -1164,16 +1164,21 @@ void rx_ulsch(PHY_VARS_eNB *eNB,
l/(frame_parms->symbols_per_tti/2));
}
int correction_factor = 1;
int deltaMCS=1;
int MPR_times_Ks;
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;
}
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);
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]));
#ifdef LOCALIZATION
pusch_vars->subcarrier_power = (int32_t *)malloc(ulsch[UE_id]->harq_processes[harq_pid]->nb_rb*12*sizeof(int32_t));
pusch_vars->active_subcarrier = subcarrier_energy(pusch_vars->drs_ch_estimates[i],
ulsch[UE_id]->harq_processes[harq_pid]->nb_rb*12, pusch_vars->subcarrier_power, rx_power_correction);
#endif
}
......
......@@ -481,7 +481,7 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP, sub_frame
UE_list->UE_template[CC_id][i].phr_info,
UE_list->UE_sched_ctrl[i].dl_cqi[CC_id],
(UE_list->UE_sched_ctrl[i].pusch_snr[CC_id]-128)/2,
(UE_list->UE_sched_ctrl[i].pucch_snr[CC_id]-128)/2);
(UE_list->UE_sched_ctrl[i].pucch1_snr[CC_id]-128)/2);
}
RC.eNB[module_idP][CC_id]->pusch_stats_bsr[i][(frameP*10)+subframeP]=-63;
......
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