Commit 849fb422 authored by Marwan Hammouda's avatar Marwan Hammouda

common doppler compensation removed; not needed

parent 4204699b
......@@ -123,7 +123,6 @@
#define CONFIG_HLP_PathEnd "Set the time [sec] at which satellite is no more visible to the UE\n"
#define CONFIG_HLP_uePosY "Set the y-axis coordinate [m] of UE position\n"
#define CONFIG_HLP_TDriftComp "Execute continous timing drift compensation\n"
#define CONFIG_HLP_FDopplerPrePost "Set the pre/post compensation value for the Doppler shift at the gNB side\n"
#define CONFIG_HLP_FP_ScalingFN "Set the P scaling factor (numerator) of the PID controller for the Doppler compensation at UE side\n"
#define CONFIG_HLP_FP_ScalingFD "Set the P scaling factor (denominator) of the PID controller for the Doppler compensation at UE side\n"
#define CONFIG_HLP_FI_ScalingFN "Set the I scaling factor (numerator) of the PID controller for the Doppler compensation at UE side\n"
......@@ -200,7 +199,6 @@ extern uint16_t pathStartingTime; // time [sec] at which satellite is becomin
extern uint16_t pathEndingTime; // time [sec] at which satellite is no more visible to the UE
extern int uePosY; // y-axis coordinate [m] of UE position
extern int tdriftComp; // flag to activate/deactivate continous timing drift compensation
extern int32_t fdopplerPrePost; //pre/post compensation of the Doppler shift at the gNB side
extern double FO_PScaling; // P scaling factor of the PID controller for the Doppler compensation at UE side
extern double FO_IScaling; // I scaling factor of the PID controller for the Doppler compensation at UE side
extern int TO_IScalingInit; // initializing the accumulative part (I part) of the PI controller for the timing offset compensation
......
......@@ -589,7 +589,6 @@ uint16_t pathEndingTime = 1280;
int uePosY = 0;
int tdriftComp = 1;
int TO_IScalingInit = 0;
int32_t fdopplerPrePost = 0; //pre/post compensation of the Doppler shift at the gNB side
int commonDoppler = 0; // common doppler to be compensated at UE, but set here to avoid linking error
int TO_init_rate = 0;
......
......@@ -41,7 +41,6 @@
{"PST" , CONFIG_HLP_PathStart, 0, .u16ptr=&pathStartingTime, .defintval=1050, TYPE_UINT16, 0}, \
{"PET" , CONFIG_HLP_PathEnd, 0, .u16ptr=&pathEndingTime, .defintval=1280, TYPE_UINT16, 0}, \
{"ue_PosY" , CONFIG_HLP_uePosY, 0, .iptr=&uePosY, .defintval=0, TYPE_INT, 0}, \
{"FDC" , CONFIG_HLP_FDopplerPrePost,0, .iptr=&fdopplerPrePost, .defintval=0, TYPE_INT32, 0}, \
{"FC" , CONFIG_HLP_FDopplerComp, 0, .iptr=&fdopplerComp, .defintval=0, TYPE_INT32, 0}, \
{"amc" , CONFIG_HLP_AMC, 0, .u8ptr=&amc_flag, .defdblval=0, TYPE_UINT8, 0}, \
{"sinr-offset-dl" , CONFIG_HLP_SINR_OSET_DL, 0, .dblptr=&sinr_offset_dl, .defdblval=0, TYPE_DOUBLE, 0}, \
......
......@@ -440,7 +440,6 @@ uint16_t pathEndingTime = 1280;
int uePosY = 0;
int fdopplerComp = 1; // flag to activate continous frequency offset compensation (=0 deacticated, =1 activated (default case))
int tdriftComp = 1;
int32_t fdopplerPrePost = 0; //pre/post compensation of the Doppler shift at the gNB side. Dummy definition at UE to avoid linking error.
double FO_PScaling = 0; // P scaling factor of the PID controller for the Doppler compensation at UE side
double FO_IScaling = 0; // I scaling factor of the PID controller for the Doppler compensation at UE side
......
......@@ -299,7 +299,6 @@ int nr_slot_fep_meas(PHY_VARS_NR_UE *ue,
return 0;
}
extern int fdopplerPrePost; //Doppler frequency shift
int nr_slot_fep_ul(NR_DL_FRAME_PARMS *frame_parms,
int32_t *rxdata,
int32_t *rxdataF,
......@@ -321,14 +320,6 @@ int nr_slot_fep_ul(NR_DL_FRAME_PARMS *frame_parms,
rxdata_offset += (idx_symb%(0x7<<frame_parms->numerology_index)) ? nb_prefix_samples : nb_prefix_samples0;
rxdata_offset += frame_parms->ofdm_symbol_size * symbol;
if ((fdopplerComp == 1) && (fdopplerPrePost != 0)){
unsigned int curr_nb_prefix = (abs_symbol%(0x7<<frame_parms->numerology_index)) ? nb_prefix_samples : nb_prefix_samples0;
unsigned int nsamps = frame_parms->ofdm_symbol_size + curr_nb_prefix;
int16_t *rxdataDopp_ptr = (int16_t *)&rxdata[rxdata_offset - sample_offset - curr_nb_prefix];
uint32_t IdxDopp_Rx = rxdata_offset - curr_nb_prefix; //sample index in the calculation of the Doppler shift compensation for a slot
nr_apply_Doppler( rxdataDopp_ptr, nsamps, fdopplerPrePost, &IdxDopp_Rx, frame_parms);
}
// use OFDM symbol from within 1/8th of the CP to avoid ISI
rxdata_offset -= (nb_prefix_samples / frame_parms->ofdm_offset_divisor);
......
......@@ -50,9 +50,9 @@ void nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms,
int max_val = 0, max_pos = 0;
const int sync_pos = 0;
//uint8_t sync_offset = 0;
static int flagInitIScaling = 0;
//static int flagInitIScaling = 0;
static int64_t TO_I_Ctrl = 0; //Integral controller for TO
//static int64_t TO_I_Ctrl = 0; //Integral controller for TO
static int frameLast = 0; //frame number of last call of nr_adjust_synch_ue()
static int FirstFlag = 1; //indicate the first call of nr_adjust_synch_ue()
......@@ -98,11 +98,11 @@ void nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms,
frameLast = frame; //save the last frame number
if ( (((diff < -4) || (diff > 4)) && (flagInitIScaling == 0)))
/* if ( (((diff < -4) || (diff > 4)) && (flagInitIScaling == 0)))
{
TO_I_Ctrl = TO_IScalingInit/TO_IScaling;
flagInitIScaling = 1;
}
} */
ue->TO_I_Ctrl += diff; //integral of all offsets
ue->rx_offset = diff;
......
......@@ -50,7 +50,6 @@
extern int oai_exit;
extern int fdopplerPrePost; //Doppler frequency shift
extern int fdopplerComp;
// OFDM modulation core routine, generates a first_symbol to first_symbol+num_symbols on a particular slot and TX antenna port
void nr_feptx0(RU_t *ru,int tti_tx,int first_symbol, int num_symbols, int aa) {
......@@ -59,7 +58,6 @@ void nr_feptx0(RU_t *ru,int tti_tx,int first_symbol, int num_symbols, int aa) {
unsigned int slot_offset,slot_offsetF;
int slot = tti_tx;
uint32_t IdxDopp_Tx; //sample index in the calculation of the Doppler shift compensation for a slot on gNB side
//VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_OFDM+(first_symbol!=0?1:0) , 1 );
......@@ -77,7 +75,6 @@ void nr_feptx0(RU_t *ru,int tti_tx,int first_symbol, int num_symbols, int aa) {
LOG_D(PHY,"SFN/SF:RU:TX:%d/%d aa %d Generating slot %d (first_symbol %d num_symbols %d) slot_offset %d, slot_offsetF %d\n",ru->proc.frame_tx, ru->proc.tti_tx,aa,slot,first_symbol,num_symbols,slot_offset,slot_offsetF);
IdxDopp_Tx = slot_offset;
if (fp->Ncp == 1) {
PHY_ofdm_mod(&ru->common.txdataF_BF[aa][slot_offsetF],
(int*)&ru->common.txdata[aa][slot_offset],
......@@ -102,11 +99,6 @@ void nr_feptx0(RU_t *ru,int tti_tx,int first_symbol, int num_symbols, int aa) {
num_symbols-1,
fp->nb_prefix_samples,
CYCLIC_PREFIX);
if ((fdopplerComp == 1) && (fdopplerPrePost != 0)){
nr_apply_Doppler( &ru->common.txdata[aa][slot_offset], (num_symbols-1)*(fp->nb_prefix_samples+fp->ofdm_symbol_size)
+fp->ofdm_symbol_size+fp->nb_prefix_samples0, fdopplerPrePost, &(IdxDopp_Tx), fp); //Doppler pre-compensation at gNB Tx
}
}
else { // all symbols in slot have shorter prefix
PHY_ofdm_mod(&ru->common.txdataF_BF[aa][slot_offsetF],
......@@ -115,10 +107,6 @@ void nr_feptx0(RU_t *ru,int tti_tx,int first_symbol, int num_symbols, int aa) {
num_symbols,
fp->nb_prefix_samples,
CYCLIC_PREFIX);
if ((fdopplerComp == 1) && (fdopplerPrePost != 0)){
nr_apply_Doppler( &ru->common.txdata[aa][slot_offset], num_symbols*(fp->nb_prefix_samples+fp->ofdm_symbol_size),
fdopplerPrePost, &(IdxDopp_Tx), fp); //Doppler pre-compensation at gNB Tx
}
}
} // numerology_index!=0
else { //numerology_index == 0
......
......@@ -88,7 +88,6 @@ uint16_t max_ul_sched_frame = 1;
int fdopplerComp = 1; // flag to activate continous frequency offset compensation (=0 deacticated, =1 activated (default case))
int tdriftComp = 1;
int32_t fdopplerPrePost = 0; //pre/post compensation of the Doppler shift at the gNB side
double FO_PScaling = 0.33; // P scaling factor of the PID controller for the Doppler compensation at UE side
double FO_IScaling = 0.5; // I scaling factor of the PID controller for the Doppler compensation at UE side
......
......@@ -54,7 +54,6 @@
//#define DEBUG_NR_PBCHSIM
int fdopplerComp = 1;
int32_t fdopplerPrePost = 0; //pre/post compensation of the Doppler shift at the gNB side
double FO_PScaling = 0.33; // P scaling factor of the PID controller for the Doppler compensation at UE side
double FO_IScaling = 0.5; // I scaling factor of the PID controller for the Doppler compensation at UE side
int commonDoppler = 0; // common doppler to be compensated at UE
......
......@@ -68,7 +68,6 @@ uint16_t NTN_gNB_k2 = 0;
uint16_t max_ul_sched_frame = 1;
int fdopplerComp = 1;
int32_t fdopplerPrePost = 0; //pre/post compensation of the Doppler shift at the gNB side
int commonDoppler = 0; // common doppler to be compensated at UE
PHY_VARS_gNB *gNB;
......
......@@ -82,7 +82,6 @@ uint16_t max_ul_sched_frame = 1;
int fdopplerComp = 1; // flag to activate continous frequency offset compensation (=0 deacticated, =1 activated (default case))
int tdriftComp = 1;
int32_t fdopplerPrePost = 0; //pre/post compensation of the Doppler shift at the gNB side
double FO_PScaling = 0.33; // P scaling factor of the PID controller for the Doppler compensation at UE side
double FO_IScaling = 0.5; // I scaling factor of the PID controller for the Doppler compensation at UE side
......
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