adding UE power control helper functions for eNB
git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5786 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -399,6 +399,8 @@ typedef struct {
|
||||
uint8_t n_DMRS2;
|
||||
/// Flag to indicate that this ULSCH is for calibration information sent from UE (i.e. no MAC SDU to pass up)
|
||||
// int calibration_flag;
|
||||
/// delta_TF for power control
|
||||
int32_t delta_TF;
|
||||
} LTE_UL_eNB_HARQ_t;
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -318,21 +318,22 @@ int dump_eNB_stats(PHY_VARS_eNB *phy_vars_eNB, char* buffer, int length) {
|
||||
#ifdef OPENAIR2
|
||||
if (phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->rnti>0) {
|
||||
#endif
|
||||
len += sprintf(&buffer[len],"[eNB PROC] UE %d (%x) Power: (%d,%d) dB, RSSI: (%d,%d) dBm, Sector %d, DLSCH Mode %d\n",
|
||||
len += sprintf(&buffer[len],"[eNB PROC] UE %d (%x) Power: (%d,%d) dB, RSSI: (%d,%d) dBm, Sector %d\n",
|
||||
UE_id,
|
||||
phy_vars_eNB->eNB_UE_stats[UE_id].crnti,
|
||||
dB_fixed(phy_vars_eNB->lte_eNB_pusch_vars[UE_id]->ulsch_power[0]),
|
||||
dB_fixed(phy_vars_eNB->lte_eNB_pusch_vars[UE_id]->ulsch_power[1]),
|
||||
phy_vars_eNB->eNB_UE_stats[UE_id].UL_rssi[0],
|
||||
phy_vars_eNB->eNB_UE_stats[UE_id].UL_rssi[1],
|
||||
phy_vars_eNB->eNB_UE_stats[UE_id].sector,
|
||||
phy_vars_eNB->transmission_mode[UE_id]);
|
||||
phy_vars_eNB->eNB_UE_stats[UE_id].sector);
|
||||
|
||||
for(i=0;i<8;i++)
|
||||
len+= sprintf(&buffer[len]," harq %d: DL mcs %d, UL mcs %d, UL rb %d\n",
|
||||
len+= sprintf(&buffer[len]," harq %d: DL mcs %d, UL mcs %d, UL rb %d, delta_TF %d\n",
|
||||
i,
|
||||
phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->harq_processes[i]->mcs,
|
||||
phy_vars_eNB->ulsch_eNB[(uint8_t)UE_id]->harq_processes[i]->mcs,
|
||||
phy_vars_eNB->ulsch_eNB[(uint8_t)UE_id]->harq_processes[i]->nb_rb);
|
||||
phy_vars_eNB->ulsch_eNB[(uint8_t)UE_id]->harq_processes[i]->nb_rb,
|
||||
phy_vars_eNB->ulsch_eNB[(uint8_t)UE_id]->harq_processes[i]->delta_TF);
|
||||
|
||||
len += sprintf(&buffer[len],"[eNB PROC] Wideband CQI: (%d,%d) dB\n",
|
||||
phy_vars_eNB->PHY_measurements_eNB[eNB].wideband_cqi_dB[UE_id][0],
|
||||
@@ -344,7 +345,8 @@ int dump_eNB_stats(PHY_VARS_eNB *phy_vars_eNB, char* buffer, int length) {
|
||||
phy_vars_eNB->PHY_measurements_eNB[eNB].subband_cqi_tot_dB[UE_id][i]);
|
||||
len += sprintf(&buffer[len],"\n");
|
||||
|
||||
len += sprintf(&buffer[len],"[eNB PROC] DL_cqi %d, DL_pmi_single %x\n",
|
||||
len += sprintf(&buffer[len],"[eNB PROC] DL TM %d, DL_cqi %d, DL_pmi_single %x\n",
|
||||
phy_vars_eNB->transmission_mode[UE_id],
|
||||
phy_vars_eNB->eNB_UE_stats[UE_id].DL_cqi[0],
|
||||
pmi2hex_2Ar1(phy_vars_eNB->eNB_UE_stats[UE_id].DL_pmi_single));
|
||||
|
||||
|
||||
@@ -91,6 +91,8 @@ int eNB_sync_buffer1[640*6] __attribute__ ((aligned(16)));
|
||||
int *eNB_sync_buffer[2] = {eNB_sync_buffer0, eNB_sync_buffer1};
|
||||
|
||||
extern uint16_t hundred_times_log10_NPRB[100];
|
||||
extern int16_t get_hundred_times_delta_IF_eNB(PHY_VARS_eNB *phy_vars_eNB,uint8_t UE_id,uint8_t harq_pid);
|
||||
|
||||
|
||||
unsigned int max_peak_val;
|
||||
int max_sect_id, max_sync_pos;
|
||||
@@ -1678,11 +1680,10 @@ void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e
|
||||
phy_vars_eNB->ulsch_eNB[(uint32_t)UE_id]->harq_processes[harq_pid]->subframe_cba_scheduling_flag = 1;
|
||||
else
|
||||
phy_vars_eNB->ulsch_eNB[(uint32_t)UE_id]->harq_processes[harq_pid]->subframe_scheduling_flag = 1;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -2953,6 +2954,10 @@ void phy_procedures_eNB_RX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e
|
||||
else {
|
||||
*/
|
||||
|
||||
//compute the expected ULSCH RX power (for the stats)
|
||||
phy_vars_eNB->ulsch_eNB[(uint32_t)i]->harq_processes[harq_pid]->delta_TF =
|
||||
get_hundred_times_delta_IF_eNB(phy_vars_eNB,i,harq_pid);
|
||||
|
||||
//dump_ulsch(phy_vars_eNB, sched_subframe, i);
|
||||
|
||||
phy_vars_eNB->eNB_UE_stats[i].ulsch_decoding_attempts[harq_pid][phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->round]++;
|
||||
|
||||
@@ -45,6 +45,41 @@
|
||||
// This is the formula from Section 5.1.1.1 in 36.213 100*10*log10((2^(MPR*Ks)-1)), where MPR is in the range [0,6] and Ks=1.25
|
||||
int16_t hundred_times_delta_TF[100] = {-32768,-1268,-956,-768,-631,-523,-431,-352,-282,-219,-161,-107,-57,-9,36,79,120,159,197,234,269,304,337,370,402,434,465,495,525,555,583,612,640,668,696,723,750,777,803,829,856,881,907,933,958,983,1008,1033,1058,1083,1108,1132,1157,1181,1205,1229,1254,1278,1302,1325,1349,1373,1397,1421,1444,1468,1491,1515,1538,1562,1585,1609,1632,1655,1679,1702,1725,1748,1772,1795,1818,1841,1864,1887,1910,1933,1956,1980,2003,2026,2049,2072,2095,2118,2141,2164,2186,2209,2232,2255};
|
||||
|
||||
int16_t get_hundred_times_delta_IF_eNB(PHY_VARS_eNB *phy_vars_eNB,uint8_t UE_id,uint8_t harq_pid) {
|
||||
|
||||
uint32_t Nre,sumKr,MPR_x100,Kr,r;
|
||||
uint16_t beta_offset_pusch;
|
||||
|
||||
Nre = phy_vars_eNB->ulsch_eNB[UE_id]->harq_processes[harq_pid]->Nsymb_initial *
|
||||
phy_vars_eNB->ulsch_eNB[UE_id]->harq_processes[harq_pid]->nb_rb*12;
|
||||
|
||||
sumKr = 0;
|
||||
for (r=0;r<phy_vars_eNB->ulsch_eNB[UE_id]->harq_processes[harq_pid]->C;r++) {
|
||||
if (r<phy_vars_eNB->ulsch_eNB[UE_id]->harq_processes[harq_pid]->Cminus)
|
||||
Kr = phy_vars_eNB->ulsch_eNB[UE_id]->harq_processes[harq_pid]->Kminus;
|
||||
else
|
||||
Kr = phy_vars_eNB->ulsch_eNB[UE_id]->harq_processes[harq_pid]->Kplus;
|
||||
sumKr += Kr;
|
||||
}
|
||||
|
||||
if (Nre==0)
|
||||
return(0);
|
||||
|
||||
MPR_x100 = 100*sumKr/Nre;
|
||||
// Note: MPR=is the effective spectral efficiency of the PUSCH
|
||||
// FK 20140908 sumKr is only set after the ulsch_encoding
|
||||
|
||||
beta_offset_pusch = 8;
|
||||
//(phy_vars_eNB->ulsch_eNB[UE_id]->harq_processes[harq_pid]->control_only == 1) ? phy_vars_eNB->ulsch_eNB[UE_id]->beta_offset_cqi_times8:8;
|
||||
|
||||
if (phy_vars_eNB->ul_power_control_dedicated[UE_id].deltaMCS_Enabled == 1) {
|
||||
// This is the formula from Section 5.1.1.1 in 36.213 10*log10(deltaIF_PUSCH = (2^(MPR*Ks)-1)*beta_offset_pusch)
|
||||
return(hundred_times_delta_TF[MPR_x100/6]+10*dB_fixed_times10((beta_offset_pusch)>>3));
|
||||
}
|
||||
else {
|
||||
return(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int16_t get_hundred_times_delta_IF(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t harq_pid) {
|
||||
|
||||
@@ -1523,7 +1523,7 @@ void rrc_eNB_generate_RRCConnectionReconfiguration_handover(
|
||||
// UplinkPowerControlDedicated__deltaMCS_Enabled_en1);
|
||||
physicalConfigDedicated2->uplinkPowerControlDedicated->deltaMCS_Enabled =
|
||||
UplinkPowerControlDedicated__deltaMCS_Enabled_en1;
|
||||
physicalConfigDedicated2->uplinkPowerControlDedicated->accumulationEnabled = 0; // FALSE
|
||||
physicalConfigDedicated2->uplinkPowerControlDedicated->accumulationEnabled = 1; // should be TRUE in order to have 0dB power offset
|
||||
physicalConfigDedicated2->uplinkPowerControlDedicated->p0_UE_PUCCH = 0; // 0 dB
|
||||
physicalConfigDedicated2->uplinkPowerControlDedicated->pSRS_Offset = 0; // 0 dB
|
||||
physicalConfigDedicated2->uplinkPowerControlDedicated->filterCoefficient =
|
||||
|
||||
Reference in New Issue
Block a user