⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mappingscenarios.m

📁 空间无线信道建模程序matlab
💻 M
📖 第 1 页 / 共 4 页
字号:
% File MappingScenarios
%
% This is a set of scenarios for the Coded Modulation Library.
%
% The simulations specified in this file are for uncoded modulation.
%
% Last updated on Nov. 14, 2006

% determine where your root directory is
load( 'CmlHome.mat' );

% determine where to store your files
base_name = 'mapping';
if ispc
    data_directory = strcat( cml_home, '\output\', base_name, '\' );
else
    data_directory = strcat( cml_home, '/output/', base_name, '/' );
end
if ~exist( data_directory, 'dir' )
    mkdir(data_directory);
end

num_errors = 50;
BER = 1e-6;

% mappings
dt16_bin = [0 0 0 0
1 1 0 1
0 1 1 0
1 0 1 1
0 1 1 1
1 0 1 0
0 0 0 1
1 1 0 0
1 0 0 1
0 1 0 0
1 1 1 1
0 0 1 0
1 1 1 0
0 0 1 1
1 0 0 0
0 1 0 1];
dt16_dec = (2.^[3:-1:0])*dt16_bin';

dt64_bin = [0 0 0 0 1 1
1 1 0 1 0 0
0 1 1 0 1 1
1 0 1 1 0 0
0 1 0 0 0 1
1 0 0 1 1 0
0 0 1 0 0 1
1 1 1 1 1 0
0 1 1 1 0 0
1 0 1 0 1 1
0 0 0 1 0 0
1 1 0 0 1 1
0 0 1 1 1 0
1 1 1 0 0 1
0 1 0 1 1 0
1 0 0 0 0 1
1 0 0 1 1 1
0 1 0 0 0 0
1 1 1 1 1 1
0 0 1 0 0 0
1 1 0 1 0 1
0 0 0 0 1 0
1 0 1 1 0 1
0 1 1 0 1 0
1 1 1 0 0 0
0 0 1 1 1 1
1 0 0 0 0 0
0 1 0 1 1 1
1 0 1 0 1 0
0 1 1 1 0 1
1 1 0 0 1 0
0 0 0 1 0 1
0 0 0 1 1 0
1 1 0 0 0 1
0 1 1 1 1 0
1 0 1 0 0 1
0 1 0 1 0 0
1 0 0 0 1 1
0 0 1 1 0 0
1 1 1 0 1 1
0 1 1 0 0 1
1 0 1 1 1 0
0 0 0 0 0 1
1 1 0 1 1 0
0 0 1 0 1 1
1 1 1 1 0 0
0 1 0 0 1 1
1 0 0 1 0 0
1 0 0 0 1 0
0 1 0 1 0 1
1 1 1 0 1 0
0 0 1 1 0 1
1 1 0 0 0 0
1 1 1 0 1 1
1 0 1 0 0 0
0 1 1 1 1 1
1 1 1 1 0 1
0 0 1 0 1 0
1 0 0 1 0 1
0 1 0 0 1 0
1 0 1 1 1 1
0 1 1 0 0 0
1 1 0 1 1 1
0 0 0 0 0 0];
dt64_dec = (2.^[5:-1:0])*dt64_bin';

hr64_dec = [48 60 36 40 19 31 7 11 57 24 45 12 55 22 35 2 33 0 9 46 21 50 59 26 58 34 43 10 49 16 25 1 ...
    5 30 6 15 52 61 37 62 29 39 27 3 56 32 28 38 20 63 18 23 44 41 4 47 53 54 17 51 8 42 13 14];
hr16_dec = [4 1 14 13 8 2 11 7 15 5 12 0 3 6 9 10];

% BICM-ID: Convolutionally coded (K=7) gray mapped 16-QAM in Rayleigh
% fading, r=8/15
record = 1;
sim_param(record).comment = '16-QAM, Gray Mapped, K=7 Conv, Rayleigh fading';
sim_param(record).legend = 'gray mapped';
sim_param(record).sim_type = 'coded';
sim_param(record).code_configuration = 0; % Convolutional
sim_param(record).SNR = [0:0.5:13];
sim_param(record).SNR_type = 'Eb/No in dB';
sim_param(record).framesize = 2048;
sim_param(record).modulation = 'QAM';
sim_param(record).mapping = 'gray';
sim_param(record).mod_order = 16;
sim_param(record).channel = 'Rayleigh';
sim_param(record).bicm = 2; % BICM-ID
sim_param(record).demod_type = 0; % linear-log-MAP
sim_param(record).linetype = 'b:';
sim_param(record).g1 = [1 0 1 1 0 1 1
   1 1 1 1 0 0 1];
sim_param(record).pun_pattern1 = [1 1 1 1 1 1 1 0
    1 1 1 1 1 1 1 1 ];
sim_param(record).tail_pattern1 = ones(2,length(sim_param(record).g1)-1);
sim_param(record).nsc_flag1 = 1; % NSC convolutional code
sim_param(record).decoder_type =  0;  % linear-log-MAP
sim_param(record).max_iterations = 16;
sim_param(record).filename = strcat( data_directory, 'QAM16_gray_CC_K7_8r15_Rayleigh_bicmid.mat');
sim_param(record).reset = 0;
sim_param(record).max_trials = 1e9*ones( size(sim_param(record).SNR) );
sim_param(record).minBER = BER;    
sim_param(record).max_frame_errors = num_errors*ones( size(sim_param(record).SNR) );
sim_param(record).save_rate = 100;
sim_param(record).plot_iterations = [1 16];


% BICM-ID: Convolutionally coded (K=7) gray mapped 16-QAM in Rayleigh fading
% r=1/2
record = 2;
sim_param(record).comment = '16-QAM, Gray Mapped, K=7 Conv, Rayleigh fading';
sim_param(record).legend = 'gray mapped';
sim_param(record).sim_type = 'coded';
sim_param(record).code_configuration = 0; % Convolutional
sim_param(record).SNR = [0:0.5:13];
sim_param(record).SNR_type = 'Eb/No in dB';
sim_param(record).framesize = 2048;
sim_param(record).modulation = 'QAM';
sim_param(record).mapping = 'gray';
sim_param(record).mod_order = 16;
sim_param(record).channel = 'Rayleigh';
sim_param(record).bicm = 2; % BICM-ID
sim_param(record).demod_type = 0; % linear-log-MAP
sim_param(record).linetype = 'b:';
sim_param(record).g1 = [1 0 1 1 0 1 1
   1 1 1 1 0 0 1];
sim_param(record).nsc_flag1 = 1; % NSC convolutional code
sim_param(record).decoder_type =  0;  % linear-log-MAP
sim_param(record).max_iterations = 16;
sim_param(record).filename = strcat( data_directory, 'QAM16_gray_CC_K7_1r2_Rayleigh_bicmid.mat');
sim_param(record).reset = 0;
sim_param(record).max_trials = 1e9*ones( size(sim_param(record).SNR) );
sim_param(record).minBER = BER;    
sim_param(record).max_frame_errors = num_errors*ones( size(sim_param(record).SNR) );
sim_param(record).save_rate = 100;
sim_param(record).plot_iterations = [1 16];

% BICM-ID: Convolutionally coded (K=4) gray mapped 16-QAM in Rayleigh fading
% r=1/2
record = 3;
sim_param(record).comment = '16-QAM, Gray Mapped, K=4 Conv, Rayleigh fading';
sim_param(record).legend = 'gray mapped';
sim_param(record).sim_type = 'coded';
sim_param(record).code_configuration = 0; % Convolutional
sim_param(record).SNR = [0:0.5:15];
sim_param(record).SNR_type = 'Eb/No in dB';
sim_param(record).framesize = 2048;
sim_param(record).modulation = 'QAM';
sim_param(record).mapping = 'gray';
sim_param(record).mod_order = 16;
sim_param(record).channel = 'Rayleigh';
sim_param(record).bicm = 2; % BICM-ID
sim_param(record).demod_type = 0; % linear-log-MAP
sim_param(record).linetype = 'r:';
sim_param(record).g1 = [1 0 1 1
    1 1 0 1];
sim_param(record).nsc_flag1 = 1; % NSC convolutional code
sim_param(record).decoder_type =  0;  % linear-log-MAP
sim_param(record).max_iterations = 16;
sim_param(record).filename = strcat( data_directory, 'QAM16_gray_CC_K4_1r2_Rayleigh_bicmid.mat');
sim_param(record).reset = 0;
sim_param(record).max_trials = 1e9*ones( size(sim_param(record).SNR) );
sim_param(record).minBER = BER;    
sim_param(record).max_frame_errors = num_errors*ones( size(sim_param(record).SNR) );
sim_param(record).save_rate = 100;
sim_param(record).plot_iterations = [1 16];

% BICM-ID: Turbo coded gray mapped 16-QAM in Rayleigh fading r=1/2
record = 4;
sim_param(record).comment = '16-QAM, Gray Mapped, UMTS Turbo, Rayleigh fading';
sim_param(record).legend = 'gray mapped';
sim_param(record).sim_type = 'coded';
sim_param(record).code_configuration = 4; % UMTS
sim_param(record).SNR = [0:0.5:4.5 4.75:0.25:10];
sim_param(record).SNR_type = 'Eb/No in dB';
sim_param(record).framesize = 2048;
sim_param(record).code_bits_per_frame = 4096; % rate 1/2
sim_param(record).modulation = 'QAM';
sim_param(record).mapping = 'gray';
sim_param(record).mod_order = 16;
sim_param(record).channel = 'Rayleigh';
sim_param(record).bicm = 2; % BICM-ID
sim_param(record).demod_type = 0; % linear-log-MAP
sim_param(record).linetype = 'k-';
sim_param(record).code_interleaver = ...
    strcat( 'CreateUmtsInterleaver(', int2str(sim_param(record).framesize ), ')' );
sim_param(record).g1 = [1 0 1 1
        1 1 0 1];
sim_param(record).g2 = [1 0 1 1
        1 1 0 1];
sim_param(record).nsc_flag1 = 0; % RSC convolutional code
sim_param(record).nsc_flag2 = 0; % RSC convolutional code
sim_param(record).decoder_type =  0;  % linear-log-MAP
sim_param(record).max_iterations = 16;
sim_param(record).filename = strcat( data_directory, 'QAM16_gray_UMTS_1r2_Rayleigh_bicmid.mat');
sim_param(record).reset = 0;
sim_param(record).max_trials = 1e9*ones( size(sim_param(record).SNR) );
sim_param(record).minBER = BER;    
sim_param(record).max_frame_errors = num_errors*ones( size(sim_param(record).SNR) );
sim_param(record).save_rate = 100;
sim_param(record).plot_iterations = 16;

% BICM: Turbo coded gray mapped 16-QAM in Rayleigh fading r=1/2
record = 5;
sim_param(record).comment = '16-QAM, Gray Mapped, UMTS Turbo, Rayleigh fading';
sim_param(record).legend = 'gray mapped';
sim_param(record).sim_type = 'coded';
sim_param(record).code_configuration = 4; % UMTS
sim_param(record).SNR = [0:0.5:4.5 4.75:0.25:10];
sim_param(record).SNR_type = 'Eb/No in dB';
sim_param(record).framesize = 2048;
sim_param(record).code_bits_per_frame = 4096; % rate 1/2
sim_param(record).modulation = 'QAM';
sim_param(record).mapping = 'gray';
sim_param(record).mod_order = 16;
sim_param(record).channel = 'Rayleigh';
sim_param(record).bicm = 1; % BICM
sim_param(record).demod_type = 0; % linear-log-MAP
sim_param(record).linetype = 'k:';
sim_param(record).code_interleaver = ...
    strcat( 'CreateUmtsInterleaver(', int2str(sim_param(record).framesize ), ')' );
sim_param(record).g1 = [1 0 1 1
        1 1 0 1];
sim_param(record).g2 = [1 0 1 1
        1 1 0 1];
sim_param(record).nsc_flag1 = 0; % RSC convolutional code
sim_param(record).nsc_flag2 = 0; % RSC convolutional code
sim_param(record).decoder_type =  0;  % linear-log-MAP
sim_param(record).max_iterations = 16;
sim_param(record).filename = strcat( data_directory, 'QAM16_gray_UMTS_1r2_Rayleigh_bicm.mat');
sim_param(record).reset = 0;
sim_param(record).max_trials = 1e9*ones( size(sim_param(record).SNR) );
sim_param(record).minBER = BER;    
sim_param(record).max_frame_errors = num_errors*ones( size(sim_param(record).SNR) );
sim_param(record).save_rate = 100;
sim_param(record).plot_iterations = 16;

% BICM-ID: Convolutionally coded (K=7) dt mapped 16-QAM in Rayleigh fading
% r=1/2
record = 6;
sim_param(record).comment = '16-QAM, DT Mapped, K=7 Conv, Rayleigh fading'; %%
sim_param(record).legend = 'dt mapped'; %%
sim_param(record).sim_type = 'coded';
sim_param(record).code_configuration = 0; % Convolutional
sim_param(record).SNR = [0:0.5:8 8.25:0.25:10];
sim_param(record).SNR_type = 'Eb/No in dB';
sim_param(record).framesize = 2048;
sim_param(record).modulation = 'QAM';
sim_param(record).mapping = dt16_dec; %%
sim_param(record).mod_order = 16;
sim_param(record).channel = 'Rayleigh';
sim_param(record).bicm = 2; % BICM-ID
sim_param(record).demod_type = 0; % linear-log-MAP
sim_param(record).linetype = 'c:';
sim_param(record).g1 = [1 0 1 1 0 1 1
   1 1 1 1 0 0 1];
sim_param(record).nsc_flag1 = 1; % NSC convolutional code

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -