Commit 05fd0864 authored by Elena Lukashova's avatar Elena Lukashova
Browse files

Introducing an offset for I-UA receiver intefr_unaw_shift and calibrating this...

Introducing an offset for I-UA receiver intefr_unaw_shift and calibrating this value for each mcs (u=0 only).
parent 0d9f417f
......@@ -61,6 +61,7 @@ int avg[4];
// [MCS][i_mod (0,1,2) = (2,4,6)]
unsigned char offset_mumimo_llr_drange_fix=0;
uint8_t intefr_unaw_shift;
/*
//original values from sebastion + same hand tuning
unsigned char offset_mumimo_llr_drange[29][3]={{8,8,8},{7,7,7},{7,7,7},{7,7,7},{6,6,6},{6,6,6},{6,6,6},{5,5,5},{4,4,4},{1,2,4}, // QPSK
......@@ -433,7 +434,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
lte_ue_pdsch_vars[eNB_id]->log2_maxh = log2_approx(avg[0]) - 13 + offset_mumimo_llr_drange[dlsch0_harq->mcs][(get_Qm(dlsch1_harq->mcs)>>1)-1];
}
else
lte_ue_pdsch_vars[eNB_id]->log2_maxh = log2_approx(avg[0])/2;
lte_ue_pdsch_vars[eNB_id]->log2_maxh = (log2_approx(avg[0])/2)+intefr_unaw_shift;
}
dlsch_channel_compensation_TM34(frame_parms,
......
......@@ -59,7 +59,7 @@
extern unsigned int dlsch_tbs25[27][25],TBStable[27][110];
extern unsigned char offset_mumimo_llr_drange_fix;
extern uint8_t intefr_unaw_shift;
#ifdef XFORMS
#include "PHY/TOOLS/lte_phy_scope.h"
#endif
......@@ -384,7 +384,7 @@ int main(int argc, char **argv)
num_layers = 1;
perfect_ce = 0;
while ((c = getopt (argc, argv, "ahdpZDe:m:n:o:s:f:t:c:g:r:F:x:y:z:AM:N:I:i:O:R:S:C:T:b:u:v:w:B:PLl:Y:X")) != -1) {
while ((c = getopt (argc, argv, "ahdpZDe:m:n:o:s:f:t:c:g:r:F:x:y:z:AM:N:I:i:O:R:S:C:T:b:u:v:w:B:PLl:YXJ:")) != -1) {
switch (c) {
case 'a':
awgn_flag = 1;
......@@ -631,6 +631,9 @@ int main(int argc, char **argv)
case 'Y':
perfect_ce=1;
break;
case 'J':
intefr_unaw_shift=atoi(optarg);
break;
case 'h':
default:
printf("%s -h(elp) -a(wgn on) -d(ci decoding on) -p(extended prefix on) -m mcs1 -M mcs2 -n n_frames -s snr0 -x transmission mode (1,2,3,5,6) -y TXant -z RXant -I trch_file\n",argv[0]);
......@@ -745,6 +748,7 @@ int main(int argc, char **argv)
printf("n_frames = %d\n",n_frames);
printf("Transmission mode %d with %dx%d antenna configuration, Extended Prefix %d\n",transmission_mode,n_tx,n_rx,extended_prefix_flag);
printf("Using receiver type %d\n", rx_type);
printf("Using I_UA rec shift %d\n", intefr_unaw_shift);
snr1 = snr0+snr_int;
printf("SNR0 %f, SNR1 %f\n",snr0,snr1);
......@@ -777,14 +781,14 @@ int main(int argc, char **argv)
sprintf(bler_fname,"bler_tx%d_rec%d_chan%d_nrx%d_mcs%d_mcsi%d_u%d_imod%d.csv",transmission_mode,rx_type,channel_model,n_rx,mcs1,mcs_i,rx_type,i_mod);
else if (abstx == 1)
if (perfect_ce==1)
sprintf(bler_fname,"bler_tx%d_rec%d_chan%d_nrx%d_mcs%d_mcsi%d_abstr_perf_ce.csv",transmission_mode,rx_type,channel_model,n_rx,mcs1, mcs2);
sprintf(bler_fname,"bler_tx%d_rec%d_chan%d_nrx%d_mcs%d_mcsi%d_ab_perf_ce_sh%d.csv",transmission_mode,rx_type,channel_model,n_rx,mcs1, mcs2, intefr_unaw_shift );
else
sprintf(bler_fname,"bler_tx%d_rec%d_chan%d_nrx%d_mcs%d_mcsi%d_abstr.csv",transmission_mode,rx_type,channel_model,n_rx,mcs1, mcs2);
sprintf(bler_fname,"bler_tx%d_rec%d_chan%d_nrx%d_mcs%d_mcsi%d_ab_sh%d.csv",transmission_mode,rx_type,channel_model,n_rx,mcs1, mcs2, intefr_unaw_shift);
else //abstx=0
if (perfect_ce==1)
sprintf(bler_fname,"bler_tx%d_rec%d_chan%d_nrx%d_mcs%d_mcsi%d_perf_ce.csv",transmission_mode,rx_type,channel_model,n_rx,mcs1, mcs2);
sprintf(bler_fname,"bler_tx%d_rec%d_chan%d_nrx%d_mcs%d_mcsi%d_perf_ce_sh%d.csv",transmission_mode,rx_type,channel_model,n_rx,mcs1, mcs2, intefr_unaw_shift);
else
sprintf(bler_fname,"bler_tx%d_rec%d_chan%d_nrx%d_mcs%d_mcsi%d.csv",transmission_mode,rx_type,channel_model,n_rx,mcs1, mcs2);
sprintf(bler_fname,"bler_tx%d_rec%d_chan%d_nrx%d_mcs%d_mcsi%d_sh%d.csv",transmission_mode,rx_type,channel_model,n_rx,mcs1, mcs2,intefr_unaw_shift);
bler_fd = fopen(bler_fname,"w");
if (bler_fd==NULL) {
......@@ -820,9 +824,9 @@ int main(int argc, char **argv)
else
if (perfect_ce==1)
sprintf(csv_fname,"dataout_tx%d_rec%d_mcs%d_mcsi%d_chan%d_nsimus%d_R%d_ab_perf_ce.m",transmission_mode,rx_type,mcs1,mcs2,channel_model,n_frames,num_rounds);
sprintf(csv_fname,"dataout_tx%d_rec%d_mcs%d_mcsi%d_chan%d_ns%d_R%d_ab_perf_ce_sh%d.m",transmission_mode,rx_type,mcs1,mcs2,channel_model,n_frames,num_rounds, intefr_unaw_shift);
else
sprintf(csv_fname,"dataout_tx%d_rec%d_mcs%d_mcsi%d_chan%d_nsimus%d_R%d_ab.m",transmission_mode,rx_type,mcs1,mcs2,channel_model,n_frames,num_rounds);
sprintf(csv_fname,"dataout_tx%d_rec%d_mcs%d_mcsi%d_chan%d_ns%d_R%d_ab_sh%d.m",transmission_mode,rx_type,mcs1,mcs2,channel_model,n_frames,num_rounds, intefr_unaw_shift);
// sprintf(csv_fname,"dataout_tx%d_mcs%d_mcs_interf%d_chan%d_nsimus%d_R%d_abstr_old.m",transmission_mode,mcs1,mcs2,channel_model,n_frames,num_rounds);
csv_fd = fopen(csv_fname,"w");
......@@ -4307,11 +4311,11 @@ n(tikz_fname,"w");
}
if (rx_type<rx_IC_dual_stream) {
if (((double)errs[0][0]/(round_trials[0]))<1e-2)
if (((double)errs[0][0]/(round_trials[0]))<1e-3)
break;
}
else{
if (((double)errs[0][0]/(round_trials[0]))<1e-2 && ((double)errs[1][0]/(round_trials[0]))<1e-2)
if (((double)errs[0][0]/(round_trials[0]))<1e-3 && ((double)errs[1][0]/(round_trials[0]))<1e-3)
break;
}
......
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