www.pudn.com > mimoprecoding.rar > rx_timed_to_freqd.asv, change:2006-06-14,size:2487b


function [freq_tr_syms, freq_data_syms, freq_pilot_syms] = rx_timed_to_freqd(time_signal, sim_options) 
global sim_consts; 
[n_tx_antennas, n_rx_antennas] = get_n_antennas(sim_options); 
for rx_ant = 1:n_rx_antennas 
   % Long Training symbols 
%    if sim_options.ChannelEstimation    
       if ~sim_options.UseTxDiv 
           long_tr_syms = time_signal(rx_ant,193:320);  %训练序列提取,注意训练序列的构造和组合方式 
       else 
           %long_tr_syms = [time_signal(rx_ant,1:64) time_signal(rx_ant,81:144)]; 
           long_tr_syms = [time_signal(rx_ant,177:240) time_signal(rx_ant,257:320)]; 
       end 
       long_tr_syms = reshape(long_tr_syms, 64, 2); 
       % to frequency domain 
       freq_long_tr = fft(long_tr_syms)/(64/sqrt(52)/sqrt(n_tx_antennas)); 
       reorder = [33:64 1:32]; 
       freq_long_tr(reorder,:) = freq_long_tr; 
       % Select training carriers 
       freq_tr_syms = freq_long_tr(sim_consts.UsedSubcIdx,:); 
       % Take data symbols 
       if ~sim_options.UseTxDiv 
           data_syms = time_signal(rx_ant,321:length(time_signal));% 注意训练序列的构造 
       else 
           data_syms = time_signal(rx_ant, 321:length(time_signal)); % 
       end 
       %data_syms = time_signal; 
%    else 
%        reorder = [33:64 1:32]; 
%        data_syms = time_signal; 
%    end  
   data_sig_len = length(data_syms); %  
   n_data_syms = floor(data_sig_len/80);%  
   % Cut to multiple of symbol period 
   data_syms = data_syms(1:n_data_syms*80);% 1: 
   data_syms = reshape(data_syms, 80, n_data_syms); % 80* 
   % remove guard intervals 
   data_syms(1:16,:) = []; 
   % perform fft 
   freq_data = fft(data_syms)/(64/sqrt(52)/sqrt(n_tx_antennas)); 
   %Reorder pattern is [33:64 1:32] 
   freq_data(reorder,:) = freq_data; 
   %beafoming combine 
   if sim_options.UseTxDiv == 2 
    
   %Select data carriers 
   freq_data_syms = freq_data(sim_consts.DataSubcIdx,:); % 48*16 
   %Select the pilot carriers 
   freq_pilot_syms = freq_data(sim_consts.PilotSubcIdx,:); % 4*16 
   if sim_options.ChannelEstimation 
       tmp_freq_tr(rx_ant,:,:) = freq_tr_syms; %three dimension data 为什么用这种方式? 
   end 
   tmp_data_syms(rx_ant,:,:) = freq_data_syms; 
   tmp_pilot_syms(rx_ant,:,:) = freq_pilot_syms; 
end 
if sim_options.ChannelEstimation 
    freq_tr_syms = tmp_freq_tr; 
else 
    freq_tr_syms = 0; 
end 
freq_data_syms = tmp_data_syms; 
freq_pilot_syms = tmp_pilot_syms; 

2018无需申请注册送58体验金