Commit f991dc9e authored by rmagueta's avatar rmagueta

Apply channel models TDLA, TDLB and TDLC in DLSIM according to TS 138.101

parent 28438ab5
...@@ -200,8 +200,8 @@ ...@@ -200,8 +200,8 @@
-n100 -e16 -s11 -S13 -n100 -e16 -s11 -S13
-n100 -q1 -e26 -s30 -n100 -q1 -e26 -s30
-n100 -e0 -t95 -S-1.0 -i 2 1 0 -n100 -e0 -t95 -S-1.0 -i 2 1 0
-n10 -s20 -U 3 0 0 2 -gR -x1 -y4 -z4 -n10 -s20 -U 3 0 0 2 -gA -x1 -y4 -z4
-n10 -s20 -U 3 0 0 2 -gR -x2 -y4 -z4 -n10 -s20 -U 3 0 0 2 -gA -x2 -y4 -z4
-n10 -s20 -U 3 0 0 2 -x4 -y4 -z4</main_exec_args> -n10 -s20 -U 3 0 0 2 -x4 -y4 -z4</main_exec_args>
<tags>test1 test2 test3 test4 test5 test6 test7</tags> <tags>test1 test2 test3 test4 test5 test6 test7</tags>
<search_expr_true>PDSCH test OK</search_expr_true> <search_expr_true>PDSCH test OK</search_expr_true>
......
...@@ -314,6 +314,7 @@ int main(int argc, char **argv) ...@@ -314,6 +314,7 @@ int main(int argc, char **argv)
//uint8_t frame_mod4,num_pdcch_symbols = 0; //uint8_t frame_mod4,num_pdcch_symbols = 0;
SCM_t channel_model = AWGN; // AWGN Rayleigh1 Rayleigh1_anticorr; SCM_t channel_model = AWGN; // AWGN Rayleigh1 Rayleigh1_anticorr;
double DS_TDL = .03;
int delay = 0; int delay = 0;
//double pbch_sinr; //double pbch_sinr;
...@@ -378,42 +379,25 @@ int main(int argc, char **argv) ...@@ -378,42 +379,25 @@ int main(int argc, char **argv)
break;*/ break;*/
case 'g': case 'g':
switch((char)*optarg) { switch ((char)*optarg) {
case 'A': case 'A':
channel_model=SCM_A; channel_model = TDL_A;
break; DS_TDL = 0.030; // 30 ns
printf("Channel model: TDLA30\n");
case 'B': break;
channel_model=SCM_B; case 'B':
break; channel_model = TDL_B;
DS_TDL = 0.100; // 100ns
case 'C': printf("Channel model: TDLB100\n");
channel_model=SCM_C; break;
break; case 'C':
channel_model = TDL_C;
case 'D': DS_TDL = 0.300; // 300 ns
channel_model=SCM_D; printf("Channel model: TDLC300\n");
break; break;
default:
case 'E': printf("Unsupported channel model!\n");
channel_model=EPA; exit(-1);
break;
case 'F':
channel_model=EVA;
break;
case 'G':
channel_model=ETU;
break;
case 'R':
channel_model=Rayleigh1;
break;
default:
printf("Unsupported channel model!\n");
exit(-1);
} }
break; break;
...@@ -578,7 +562,7 @@ int main(int argc, char **argv) ...@@ -578,7 +562,7 @@ int main(int argc, char **argv)
printf("-s Starting SNR, runs from SNR0 to SNR0 + 5 dB. If n_frames is 1 then just SNR is simulated\n"); printf("-s Starting SNR, runs from SNR0 to SNR0 + 5 dB. If n_frames is 1 then just SNR is simulated\n");
printf("-S Ending SNR, runs from SNR0 to SNR1\n"); printf("-S Ending SNR, runs from SNR0 to SNR1\n");
//printf("-t Delay spread for multipath channel\n"); //printf("-t Delay spread for multipath channel\n");
printf("-g [A,B,C,D,E,F,G,R] Use 3GPP SCM (A,B,C,D) or 36-101 (E-EPA,F-EVA,G-ETU) models or R for MIMO model (ignores delay spread and Ricean factor)\n"); printf("-g Channel model: [A] TDLA30, [B] TDLB100, [C] TDLC300, e.g. -g A\n");
printf("-o Introduce delay in terms of number of samples\n"); printf("-o Introduce delay in terms of number of samples\n");
printf("-y Number of TX antennas used in gNB\n"); printf("-y Number of TX antennas used in gNB\n");
printf("-z Number of RX antennas used in UE\n"); printf("-z Number of RX antennas used in UE\n");
...@@ -779,7 +763,7 @@ int main(int argc, char **argv) ...@@ -779,7 +763,7 @@ int main(int argc, char **argv)
fs/1e6,//sampling frequency in MHz fs/1e6,//sampling frequency in MHz
0, 0,
txbw, txbw,
30e-9, DS_TDL,
0.0, 0.0,
CORR_LEVEL_LOW, CORR_LEVEL_LOW,
0, 0,
...@@ -1115,11 +1099,7 @@ int main(int argc, char **argv) ...@@ -1115,11 +1099,7 @@ int main(int argc, char **argv)
} }
// Apply MIMO Channel // Apply MIMO Channel
if (channel_model == AWGN) { multipath_channel(gNB2UE, s_re, s_im, r_re, r_im, slot_length, 0, (n_trials == 1) ? 1 : 0);
multipath_channel(gNB2UE, s_re, s_im, r_re, r_im, slot_length, 0, (n_trials == 1) ? 1 : 0);
} else {
multipath_tv_channel(gNB2UE, s_re, s_im, r_re, r_im, slot_length, 0);
}
add_noise(UE->common_vars.rxdata, (const double **) r_re, (const double **) r_im, sigma2, slot_length, slot_offset, ts, delay, pdu_bit_map, 0x1, frame_parms->nb_antennas_rx); add_noise(UE->common_vars.rxdata, (const double **) r_re, (const double **) r_im, sigma2, slot_length, slot_offset, ts, delay, pdu_bit_map, 0x1, frame_parms->nb_antennas_rx);
nr_ue_dcireq(&dcireq); //to be replaced with function pointer later nr_ue_dcireq(&dcireq); //to be replaced with function pointer later
......
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