changes for link adaptation and abstraction

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4150 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
latif
2013-09-17 07:45:13 +00:00
parent c5196908d5
commit 2d68cc0f68
11 changed files with 166 additions and 292 deletions
@@ -6,11 +6,11 @@
<PATHLOSS_EXPONENT>3.67</PATHLOSS_EXPONENT>
<PATHLOSS_0_dB>-128</PATHLOSS_0_dB><!--pathloss at 1km -->
</FREE_SPACE_MODEL_PARAMETERS>
<SMALL_SCALE>Rayleigh8</SMALL_SCALE>
<SMALL_SCALE>Rayleigh1</SMALL_SCALE>
</FADING>
<SYSTEM_BANDWIDTH_MB>7.68</SYSTEM_BANDWIDTH_MB>
<SYSTEM_FREQUENCY_GHz>1.9</SYSTEM_FREQUENCY_GHz>
<TRANSMISSION_MODE>2</TRANSMISSION_MODE> <!-- validavalue: 1, 2, 5, 6 -->
<TRANSMISSION_MODE>6</TRANSMISSION_MODE> <!-- validavalue: 1, 2, 5, 6 -->
<ANTENNA>
<eNB_ANTENNA>
<RX_NOISE_LEVEL_dB>0</RX_NOISE_LEVEL_dB>
+2 -3
View File
@@ -110,7 +110,7 @@ void get_simulation_options(int argc, char *argv[]) {
{NULL, 0, NULL, 0}
};
while ((c = getopt_long (argc, argv, "aA:b:B:c:C:D:d:eE:f:FGg:hi:j:IJ:k:l:m:M:n:N:oO:p:P:rR:s:S:Q:t:T:u:U:vVx:y:w:W:X:z:Z:", long_options, &option_index)) != -1) {
while ((c = getopt_long (argc, argv, "aA:b:B:c:C:D:d:eE:f:FGg:hi:IJ:k:L:l:m:M:n:N:oO:p:P:rR:s:S:t:T:u:U:vVx:y:w:W:X:z:Z:", long_options, &option_index)) != -1) {
switch (c) {
case 0:
if (! strcmp(long_options[option_index].name, "pdcp_period")) {
@@ -567,14 +567,13 @@ void init_ocm() {
s32 UE_id, eNB_id;
/* Added for PHY abstraction */
if (abstraction_flag) {
if (0) { //the values of beta and awgn tables are hard coded in PHY/vars.h
get_beta_map();
#ifdef PHY_ABSTRACTION_UL
get_beta_map_up();
#endif
get_MIESM_param();
}
}
for (eNB_id = 0; eNB_id < NB_eNB_INST; eNB_id++) {
enb_data[eNB_id] = (node_desc_t *)malloc(sizeof(node_desc_t));
+3 -3
View File
@@ -1,6 +1,6 @@
function plot_results(tm)
data_abs = dlmread(sprintf('eNB_stats_abs_th_tx%d.txt',tm));
data = dlmread(sprintf('eNB_stats_th_tx%d.txt',tm));
data_abs = dlmread(sprintf('UE_stats_abs_th0_tx%d.txt',tm));
data = dlmread(sprintf('UE_stats_th0_tx%d.txt',tm));
figure
plot(data(:,1),data(:,2))
hold on
@@ -54,4 +54,4 @@ hold off
%ylabel('Throughput [kbps]')
%legend('Full PHY','PHY ABSTRACTION')
%hold off
%end
%end
+22 -10
View File
@@ -495,16 +495,17 @@ void calculate_sinr(channel_desc_t* eNB2UE, node_desc_t *enb_data, node_desc_t *
void get_beta_map() {
char *file_path = NULL;
//int table_len = 0;
int t;
int t,u;
int mcs = 0;
char *sinr_bler;
char buffer[1000];
FILE *fp;
double perf_array[13];
file_path = (char*) malloc(512);
for (mcs = 0; mcs < MCS_COUNT; mcs++) {
sprintf(file_path,"%s/SIMULATION/LTE_PHY/BLER_SIMULATIONS/AWGN/awgn_abst/awgn_snr_bler_mcs%d.csv",getenv("OPENAIR1_DIR"),mcs);
sprintf(file_path,"%s/SIMULATION/LTE_PHY/BLER_SIMULATIONS/AWGN/Perf_Curves_Abs/awgn_bler_tx1_mcs%d.csv",getenv("OPENAIR1_DIR"),mcs);
fp = fopen(file_path,"r");
if (fp == NULL) {
LOG_W(OCM,"ERROR: Unable to open the file %s, try an alternative path\n", file_path);
@@ -518,21 +519,32 @@ void get_beta_map() {
}
}
// else {
fgets(buffer, 1000, fp);
fgets(buffer, 1000, fp);
table_length[mcs]=0;
while (!feof(fp)) {
sinr_bler = strtok(buffer, ",");
sinr_bler_map[mcs][0][table_length[mcs]] = atof(sinr_bler);
sinr_bler = strtok(NULL,",");
sinr_bler_map[mcs][1][table_length[mcs]] = atof(sinr_bler);
table_length[mcs]++;
fgets(buffer, 1000, fp);
u=0;
sinr_bler = strtok(buffer, ";");
while(sinr_bler != NULL){
perf_array[u]=atof(sinr_bler);
u++;
sinr_bler = strtok(NULL,";");
}
if((perf_array[4]/perf_array[5]) < 1){
sinr_bler_map[mcs][0][table_length[mcs]] = perf_array[0];
sinr_bler_map[mcs][1][table_length[mcs]] = (perf_array[4]/perf_array[5]);
table_length[mcs]++;
}
fgets(buffer, 1000, fp);
}
fclose(fp);
// }
LOG_D(OCM,"Print the table for mcs %d\n",mcs);
// LOG_D(OCM,"Print the table for mcs %d\n",mcs);
printf("Print the table for mcs %d\n",mcs);
for (t = 0; t<table_length[mcs]; t++)
LOG_D(OCM,"%lf %lf \n ",sinr_bler_map[mcs][0][t],sinr_bler_map[mcs][1][t]);
// LOG_D(OCM,"%lf %lf \n ",sinr_bler_map[mcs][0][t],sinr_bler_map[mcs][1][t]);
printf("%lf %lf \n ",sinr_bler_map[mcs][0][t],sinr_bler_map[mcs][1][t]);
}
free(file_path);
}