est.m

来自「这是Space-Time Codes and MIMO Systems一书的同步」· M 代码 · 共 26 行

M
26
字号
function [est_coefs,signal]=est(signal,ch_coefs,frames,sim_options)

%**************************************************************************
%This file carriers out channel estimation based on MMSE technique. It
%outputs the signal stripped of its preamble and the channel estimates.
%**************************************************************************

pilots=[0 0 0 0 0 0 0 0 0 0 1 -1 -1  1 -1 -1  1 -1  1  1;1 -1 -1 -1  1 -1 -1  1 -1  1 0 0 0 0 0 0 0 0 0 0];
pilots=pilots.';

tr_symbols=signal(1:20,:,:);
signal=signal(21:end,:,:);
for k=1:frames
    if sim_options.RxDiv==2
        h11=mean(tr_symbols(11:20,1,k).*conj(pilots(11:20,1)));
        h12=mean(tr_symbols(1:10,1,k).*conj(pilots(1:10,2)));
        h21=mean(tr_symbols(11:20,2,k).*conj(pilots(11:20,1)));
        h22=mean(tr_symbols(1:10,2,k).*conj(pilots(1:10,2)));
        est_coefs(:,:,k)=[[h11;h12]  [h21; h22]];
    else
       h11=mean(tr_symbols(11:20,1,k).*conj(pilots(11:20,1)));
       h21=mean(tr_symbols(1:10,1,k).*conj(pilots(1:10,2)));
       est_coefs(:,:,k)=[h11;h21];
    end
end

⌨️ 快捷键说明

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