📄 transmitter.m
字号:
function V_blast_symble_block = transmitter(m_transmitter, QAM_bit, N_point_FFT, symbol_block_K);
%This is the system call fucntion
%the V_BLAST_OFDM system is blow
block_sim = 6; % blocks that the program to simulate
% Global simulation parameters
%m_transmitter = 4; % M
%n_receiver = 8; % N
%fir_len = 3; % L :the maximum length of every FIR channel in m_transmitter*n_receiver channels
%N_point_FFT = 4; % G
%symbol_block_K = 32; % the K symbols blocks
%QAM_bit = 4; % 16QAM
% M * 2^4 * G * K
init_data_len = m_transmitter * QAM_bit * N_point_FFT * symbol_block_K ; %inf_bits length;
%----------------------------------------------------------------
% Transmitter side
%----------------------------------------------------------------
% Generate the input bits
bits_inf = GetRandomSeries(init_data_len);
%bits)inf = randint(init_data_len);
%size(bits_inf);
% series - parallel
para_bits = series2paralle(bits_inf,m_transmitter);
%----------------------------------------------------------------
% channel encoding:here I choose Reed-Solomon code
% 16QAM Mapping
% this function needs to do 16QAM Mapping separately
%moduled_symbol = qam16_mapping(bits_inf,init_data_len);
size_para_bit = size(para_bits);
size_m_trans = size_para_bit(1,1); %this para is the number of transmitter
size_single_len = size_para_bit(1,2); %this para is the length of each parallel data bits
for i = 1:size_m_trans
moduled_symbol(i,:) = modulation( para_bits(i,:), QAM_bit);
% moduled_symbol(i,:) = qam16_mapping( para_bits(i,:), size_single_len);
end;
save moduled_symbol moduled_symbol;
load moduled_symbol;
%----------------------------------------------------------------
% V_blast Mapping
V_blast_symble_block = vblast_module(moduled_symbol);
save V_blast_symble_block V_blast_symble_block;
load V_blast_symble_block;
%----------------------------------------------------------------
% OFDM
% IDFT: to focous on every subcarrier to do the DFT transformation
% for the V_blast-OFDM, it has 2 series-parallel transformation
% first is at the V_blast side
% secend is at the OFDM side
% after the IFFT, the data bits is multiplexed in time-field
IFFT_symbols = ofdm_trans_freq(V_blast_symble_block, N_point_FFT)';
%the ' above is to adjust the IFFT_symbols to the paper 11
% paper 1x is xjWu
save IFFT_symbols IFFT_symbols;
load IFFT_symbols;
%----------------------------------------------------------------
% Space-freq symbols
% in the frequency defined channel this function is not use
%----------------------------------------------------------------
if 0
Space_freq_symbols = CreatTransSymbols(IFFT_symbols);
save Space_freq_symbols Space_freq_symbols;
load Space_freq_symbols;
end;
V_blast_symble_block = IFFT_symbols;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -