Commit 276a3ed9 authored by masayuki.harada's avatar masayuki.harada Committed by Haruki NAOI

add variables TPC command interval and forgetting filter of UL SNR.

parent 1813e9a4
...@@ -2330,9 +2330,10 @@ schedule_ue_spec_fairRR(module_id_t module_idP, ...@@ -2330,9 +2330,10 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
// this assumes accumulated tpc // this assumes accumulated tpc
// make sure that we are only sending a tpc update once a frame, otherwise the control loop will freak out // make sure that we are only sending a tpc update once a frame, otherwise the control loop will freak out
int32_t framex10psubframe = UE_list->UE_template[CC_id][UE_id].pucch_tpc_tx_frame*10+UE_list->UE_template[CC_id][UE_id].pucch_tpc_tx_subframe; int32_t framex10psubframe = UE_list->UE_template[CC_id][UE_id].pucch_tpc_tx_frame*10+UE_list->UE_template[CC_id][UE_id].pucch_tpc_tx_subframe;
int pucch_tpc_interval=10;
if (((framex10psubframe+10)<=(frameP*10+subframeP)) || //normal case if (((framex10psubframe+pucch_tpc_interval)<=(frameP*10+subframeP)) || //normal case
((framex10psubframe>(frameP*10+subframeP)) && (((10240-framex10psubframe+frameP*10+subframeP)>=10)))) //frame wrap-around ((framex10psubframe>(frameP*10+subframeP)) && (((10240-framex10psubframe+frameP*10+subframeP)>=pucch_tpc_interval)))) //frame wrap-around
if (ue_sched_ctl->pucch1_cqi_update[CC_id] == 1) { if (ue_sched_ctl->pucch1_cqi_update[CC_id] == 1) {
ue_sched_ctl->pucch1_cqi_update[CC_id] = 0; ue_sched_ctl->pucch1_cqi_update[CC_id] = 0;
UE_list->UE_template[CC_id][UE_id].pucch_tpc_tx_frame=frameP; UE_list->UE_template[CC_id][UE_id].pucch_tpc_tx_frame=frameP;
...@@ -3864,9 +3865,10 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP, ...@@ -3864,9 +3865,10 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
// this assumes accumulated tpc // this assumes accumulated tpc
// make sure that we are only sending a tpc update once a frame, otherwise the control loop will freak out // make sure that we are only sending a tpc update once a frame, otherwise the control loop will freak out
int32_t framex10psubframe = UE_template->pusch_tpc_tx_frame*10+UE_template->pusch_tpc_tx_subframe; int32_t framex10psubframe = UE_template->pusch_tpc_tx_frame*10+UE_template->pusch_tpc_tx_subframe;
int pusch_tpc_interval=10;
if (((framex10psubframe+10)<=(frameP*10+subframeP)) || //normal case if (((framex10psubframe+pusch_tpc_interval)<=(frameP*10+subframeP)) || //normal case
((framex10psubframe>(frameP*10+subframeP)) && (((10240-framex10psubframe+frameP*10+subframeP)>=10)))) { //frame wrap-around ((framex10psubframe>(frameP*10+subframeP)) && (((10240-framex10psubframe+frameP*10+subframeP)>=pusch_tpc_interval)))) { //frame wrap-around
UE_template->pusch_tpc_tx_frame=frameP; UE_template->pusch_tpc_tx_frame=frameP;
UE_template->pusch_tpc_tx_subframe=subframeP; UE_template->pusch_tpc_tx_subframe=subframeP;
......
...@@ -172,12 +172,12 @@ rx_sdu(const module_id_t enb_mod_idP, ...@@ -172,12 +172,12 @@ rx_sdu(const module_id_t enb_mod_idP,
* maybe it's even not correct at all? * maybe it's even not correct at all?
*/ */
UE_scheduling_control->ta_update = (UE_scheduling_control->ta_update * 3 + timing_advance) / 4; UE_scheduling_control->ta_update = (UE_scheduling_control->ta_update * 3 + timing_advance) / 4;
double tpc_forgetting_filter=0.75;
if(UE_scheduling_control->pusch_snr[CC_idP] == 0) { if(UE_scheduling_control->pusch_snr[CC_idP] == 0) {
UE_scheduling_control->pusch_snr[CC_idP] = ul_cqi; UE_scheduling_control->pusch_snr[CC_idP] = ul_cqi;
} }
else { else {
UE_scheduling_control->pusch_snr[CC_idP] = (UE_scheduling_control->pusch_snr[CC_idP] * 3 + ul_cqi) / 4; UE_scheduling_control->pusch_snr[CC_idP] = (int)((double)UE_scheduling_control->pusch_snr[CC_idP] * tpc_foggot_filter + (double)ul_cqi * (1-tpc_foggot_filter));
} }
UE_scheduling_control->ul_consecutive_errors = 0; UE_scheduling_control->ul_consecutive_errors = 0;
......
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