dft_estimate.asv

来自「OFDM系统的仿真代码MATLAB环境下」· ASV 代码 · 共 35 行

ASV
35
字号
function data_cir = dft_estimate(pilot_freq_cir)
% pilot_freq_cir: cir at the pilot frequency
% channel_cir: cir at all the frequency

global sim_consts;

N1 = sim_consts.NumPilotSubc; % the length of the window should be the same as the number of pilot per ofdm symbol
N2 = 64;
a = 1;
Q = 0.0001;
u = 0.01;
pilot = 1;

for i = 1:size(pilot_freq_cir,2) 
    window_pilot_freq_cir = pilot_freq_cir(:,i);
    window_pilot_time_cir = ifft(window_pilot_freq_cir);
    h2 = pilot_freq_cir(1,i);
    M2 = 1;
    for j = 1:size(pilot_freq_cir,1)
        h1 = a*h2;
        M1 = a.^2*M2+Q;
        K = M1*pilot/(u+M1);
        h0 = h1+K*(y(i,j)-h1);
        M0 = (1-K)*M1;
        h2 = h0;
        M2 = M0;
        h(i,j) = h0;
        M(i,j) = M0;
    end
    window_subchan_time_cir = [window_pilot_time_cir;zeros(58,1)];    
    window_subchan_freq_cir = fft(window_subchan_time_cir);
    subchan_freq_cir(:,i) = window_subchan_freq_cir;
end
 
data_cir = subchan_freq_cir(sim_consts.DataSubcIdx,:);

⌨️ 快捷键说明

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