[OAI-UE] fix pusch/pucch power control part 1
This commit is contained in:
@@ -431,7 +431,7 @@ UE_MODE_t get_ue_mode(uint8_t Mod_id,uint8_t CC_id,uint8_t eNB_index);
|
|||||||
@param pucch_fmt Format of PUCCH that is being transmitted
|
@param pucch_fmt Format of PUCCH that is being transmitted
|
||||||
@returns Transmit power
|
@returns Transmit power
|
||||||
*/
|
*/
|
||||||
int8_t pucch_power_cntl(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t subframe,uint8_t eNB_id,PUCCH_FMT_t pucch_fmt);
|
int16_t pucch_power_cntl(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t subframe,uint8_t eNB_id,PUCCH_FMT_t pucch_fmt);
|
||||||
|
|
||||||
/*! \brief This function implements the power control mechanism for PUCCH from 36.213.
|
/*! \brief This function implements the power control mechanism for PUCCH from 36.213.
|
||||||
@param phy_vars_ue PHY variables
|
@param phy_vars_ue PHY variables
|
||||||
|
|||||||
@@ -205,8 +205,8 @@ unsigned int get_tx_amp(int power_dBm, int power_max_dBm, int N_RB_UL, int nb_rb
|
|||||||
int gain_dB = power_dBm - power_max_dBm;
|
int gain_dB = power_dBm - power_max_dBm;
|
||||||
double gain_lin;
|
double gain_lin;
|
||||||
|
|
||||||
if (gain_dB < -20)
|
//if (gain_dB < -20)
|
||||||
return(AMP/10);
|
// return(AMP/10);
|
||||||
|
|
||||||
gain_lin = pow(10,.1*gain_dB);
|
gain_lin = pow(10,.1*gain_dB);
|
||||||
if ((nb_rb >0) && (nb_rb <= N_RB_UL)) {
|
if ((nb_rb >0) && (nb_rb <= N_RB_UL)) {
|
||||||
@@ -1569,7 +1569,7 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
|
|||||||
int Mod_id = ue->Mod_id;
|
int Mod_id = ue->Mod_id;
|
||||||
int CC_id = ue->CC_id;
|
int CC_id = ue->CC_id;
|
||||||
int tx_amp;
|
int tx_amp;
|
||||||
int8_t Po_PUCCH;
|
int16_t Po_PUCCH;
|
||||||
|
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX_PUCCH,VCD_FUNCTION_IN);
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX_PUCCH,VCD_FUNCTION_IN);
|
||||||
|
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ void pusch_power_cntl(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_
|
|||||||
proc->subframe_tx);
|
proc->subframe_tx);
|
||||||
|
|
||||||
uint8_t nb_rb = ue->ulsch[eNB_id]->harq_processes[harq_pid]->nb_rb;
|
uint8_t nb_rb = ue->ulsch[eNB_id]->harq_processes[harq_pid]->nb_rb;
|
||||||
int8_t PL;
|
int16_t PL;
|
||||||
|
|
||||||
|
|
||||||
// P_pusch = 10*log10(nb_rb + P_opusch(j)+ alpha(u)*PL + delta_TF(i) + f(i))
|
// P_pusch = 10*log10(nb_rb + P_opusch(j)+ alpha(u)*PL + delta_TF(i) + f(i))
|
||||||
|
|||||||
Reference in New Issue
Block a user