Guest User

Untitled

a guest
Apr 21st, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.55 KB | None | 0 0
  1. clear, %close all
  2. tic
  3. clc
  4. %for k = 1:24
  5. antenna_choices = {'11','21','22'};
  6. channel_choices = {'AWGN','AWGN+Baseline','AWGN+Rayleigh','AWGN+RayleighBlock'};
  7. channel_choices = {'AWGN+Rayleigh'};
  8. global seed
  9. set_no = 0;
  10. for antenna_choice = 1:length(antenna_choices)
  11. for channel_choice = 1:length(channel_choices)
  12. clearvars -except channel_choice channel_choices antenna_choice antenna_choices seed set_no
  13. set_no = set_no + 1;
  14. disp(['Starting Set No: ' , num2str(set_no)])
  15.  
  16. seed = 1;
  17. mastermfile = mfilename;
  18. extra_comment = [mfilename ' extra comment here'];
  19. % this variable is for logging an extra comment when the results are
  20. % written on disk: Write the aim of simulation in that variable
  21.  
  22. %% 1.1 Common simulation parameters for each burst
  23. handles_common.fft = '1024'; % Choices: {2048, 1024}
  24. handles_common.EsNo = [0:1:10]; % EbNo vector
  25. %handles_common.dectype = 'LLR';
  26. handles_common.trial_no = [20]; % 5 5 10 10 10 20 20 20 50 50 50 100]; %[ones(1,10)*50 ones(1,10)*300]; [50 50 50 100 100 500]; %[1 1 4 7 12 20]; %randint(size(handles_common.EsNo,1), size(handles_common.EsNo,2), [2 6]); % no. of trials at each EbNo
  27. %handles_common.trial_no = 1; %randint(size(handles_common.EsNo,1), size(handles_common.EsNo,2), [2 6]); % no. of trials at each EbNo
  28. %handles_common.trial_no = ones(size(handles_common.EsNo)) *
  29.  
  30. %% 1.2 Common channel and antenna configurations
  31. handles_common.antenna = antenna_choices{antenna_choice}; % 'SISO', 'MIMO - 2x1', 'MIMO- 2x2','11','21','22' are all valid
  32. demapchoice = 1;
  33. handles_common.channel = channel_choices{channel_choice}; %'AWGN+Rayleigh'; % 'AWGN + Baseline', 'AWGN + No Baseline', 'Baseline + No AWGN', 'AWGN + Rayleigh','No Channel'
  34. %handles_common.channel = 'nochannel'; % 'AWGN + Baseline', 'AWGN + No Baseline', 'Baseline + No AWGN', 'AWGN + Rayleigh','No Channel'
  35. handles_common.v = 3;
  36. handles_common.scenario = 3; % 1,2,3,4
  37. handles_common.timedomain = 0;
  38. handles_common.scatterplot = 0;
  39. handles_common.sameconf = 0;
  40.  
  41. %% 1.3 Plot parameters
  42. plot_param.log = 1; % 0 or 1
  43. plot_param.hold = 1; % 0 or 1
  44.  
  45. %% 2.1 Process variables for each burst
  46.  
  47. burst_codes_dl = {'C17','D16'}; %,'D16'}; %,num2str(jjj)],['D',num2str(jjj)], ['E',num2str(jjj)]};
  48. burst_codes_ul = {'C1'}; % {'A1'};
  49.  
  50. %% Burst frequency and OFDM symbol allocations
  51.  
  52. DL_burst(1,:) = [0, 22, 0, 10];
  53. DL_burst(2,:) = [0, 22, 10, 10];
  54. DL_burst(3,:) = [0, 22, 20, 10];
  55. DL_burst(4,:) = [0, 22, 15, 0];
  56. DL_burst(5,:) = [0, 22, 20, 0];
  57. DL_burst(6,:) = [0, 22, 25, 0];
  58.  
  59.  
  60. % Original burst configuration -- copy and paste from block if needed
  61. % DL_burst(1,:) = [0, 22, 0, 5];
  62. % DL_burst(2,:) = [0, 22, 5, 5];
  63. % DL_burst(3,:) = [0, 22, 10, 5];
  64. % DL_burst(4,:) = [0, 22, 15, 5];
  65. % DL_burst(5,:) = [0, 22, 20, 5];
  66. % DL_burst(6,:) = [0, 22, 25, 5];
  67.  
  68. UL_burst(1,:) = [0, 9, 0, 5];
  69. UL_burst(2,:) = [0, 9, 5, 5];
  70. UL_burst(3,:) = [0, 9, 10, 5];
  71. UL_burst(4,:) = [0, 9, 15, 5];
  72. UL_burst(5,:) = [0, 9, 20, 5];
  73. UL_burst(6,:) = [0, 9, 25, 5];
  74. scenarios_common
  75. % after the variables are defined, perform the common tasks to complete
  76. % the simulation of a scenario
  77. end
  78. end
  79.  
  80. toc
Add Comment
Please, Sign In to add comment