Commit 3021e873 authored by Xiwen JIANG's avatar Xiwen JIANG

add TDD reciprocity calibration into phy_procedures_eNB

parent fc27ad56
...@@ -66,6 +66,7 @@ void estimate_DLCSI_from_ULCSI(int32_t **calib_dl_ch_estimates, int32_t **ul_ch_ ...@@ -66,6 +66,7 @@ void estimate_DLCSI_from_ULCSI(int32_t **calib_dl_ch_estimates, int32_t **ul_ch_
void compute_BF_weights(int32_t **beam_weights, int32_t **calib_dl_ch_estimates, PRECODE_TYPE_t precode_type, LTE_DL_FRAME_PARMS *frame_parms) { void compute_BF_weights(int32_t **beam_weights, int32_t **calib_dl_ch_estimates, PRECODE_TYPE_t precode_type, LTE_DL_FRAME_PARMS *frame_parms) {
int aa, re; int aa, re;
int norm_factor = 5;
switch (precode_type) { switch (precode_type) {
//case MRT //case MRT
...@@ -73,14 +74,14 @@ void compute_BF_weights(int32_t **beam_weights, int32_t **calib_dl_ch_estimates, ...@@ -73,14 +74,14 @@ void compute_BF_weights(int32_t **beam_weights, int32_t **calib_dl_ch_estimates,
for (aa=0 ; aa<frame_parms->nb_antennas_tx ; aa++) { for (aa=0 ; aa<frame_parms->nb_antennas_tx ; aa++) {
for (re=0; re<frame_parms->N_RB_DL*6; re++) { for (re=0; re<frame_parms->N_RB_DL*6; re++) {
//normalisation simplied by a constent shift //normalisation simplied by a constent shift
((int16_t*)(&beam_weights[aa][frame_parms->first_carrier_offset+re]))[0] = ((int16_t*)(&calib_dl_ch_estimates[aa][re]))[0]<<4; ((int16_t*)(&beam_weights[aa][frame_parms->first_carrier_offset+re]))[0] = ((int16_t*)(&calib_dl_ch_estimates[aa][re]))[0]<<norm_factor;
((int16_t*)(&beam_weights[aa][frame_parms->first_carrier_offset+re]))[1] = -((int16_t*)(&calib_dl_ch_estimates[aa][re]))[1]<<4; ((int16_t*)(&beam_weights[aa][frame_parms->first_carrier_offset+re]))[1] = -((int16_t*)(&calib_dl_ch_estimates[aa][re]))[1]<<norm_factor;
} }
for (re=frame_parms->N_RB_DL*6; re<frame_parms->N_RB_DL*12; re++) { for (re=frame_parms->N_RB_DL*6; re<frame_parms->N_RB_DL*12; re++) {
//normalisation simplied by a constent shift //normalisation simplied by a constent shift
((int16_t*)(&beam_weights[aa][re-frame_parms->N_RB_DL*6+1]))[0] = ((int16_t*)(&calib_dl_ch_estimates[aa][re]))[0]<<4; ((int16_t*)(&beam_weights[aa][re-frame_parms->N_RB_DL*6+1]))[0] = ((int16_t*)(&calib_dl_ch_estimates[aa][re]))[0]<<norm_factor;
((int16_t*)(&beam_weights[aa][re-frame_parms->N_RB_DL*6+1]))[1] = -((int16_t*)(&calib_dl_ch_estimates[aa][re]))[1]<<4; ((int16_t*)(&beam_weights[aa][re-frame_parms->N_RB_DL*6+1]))[1] = -((int16_t*)(&calib_dl_ch_estimates[aa][re]))[1]<<norm_factor;
} }
} }
break ; break ;
......
...@@ -2994,6 +2994,34 @@ void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,const ...@@ -2994,6 +2994,34 @@ void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,const
#endif #endif
stop_meas(&eNB->ulsch_demodulation_stats); stop_meas(&eNB->ulsch_demodulation_stats);
// TDD reciprocity DL CSIT estimation based on calibraton
start_meas(&eNB->dl_ch_calib_stats);
if ((fp->frame_type == TDD) &&
(((fp->tdd_config == 0) && ((subframe == 4) || (subframe == 9))) ||
((fp->tdd_config == 1) && ((subframe == 3) || (subframe == 8))) ||
((fp->tdd_config == 2) && ((subframe == 2) || (subframe == 7))) ||
((fp->tdd_config == 3) && (subframe == 4)) ||
((fp->tdd_config == 4) && (subframe == 3)) ||
((fp->tdd_config == 5) && (subframe == 2)) ||
((fp->tdd_config == 6) && ((subframe == 4) || (subframe == 8))))) {
//LOG_I(PHY, "UE %d: Estimating DLSCI from ULCSI based on TDD reciprocity calibration: Estimating DLSCI from ULCSI based on TDD reciprocity calibration\n", i);
printf(PHY, "UE %d: Estimating DLSCI from ULCSI based on TDD reciprocity calibration: Estimating DLSCI from ULCSI based on TDD reciprocity calibration\n", i);
estimate_DLCSI_from_ULCSI(eNB->dlsch[i][0]->calib_dl_ch_estimates,
&eNB->pusch_vars[i]->drs_ch_estimates[eNB->UE_stats[i].sector][0],
eNB->common_vars.tdd_calib_coeffs[eNB->UE_stats[i].sector],
fp);
// only calculate for port 5
compute_BF_weights(eNB->dlsch[i][0]->ue_spec_bf_weights[0],
eNB->dlsch[i][0]->calib_dl_ch_estimates,
MRT,
fp);
}
stop_meas(&eNB->dl_ch_calib_stats);
start_meas(&eNB->ulsch_decoding_stats); start_meas(&eNB->ulsch_decoding_stats);
......
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