📄 est.m
字号:
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==3 %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)));
h13=mean(tr_symbols(11:20,3,k).*conj(pilots(11:20,1)));%%%
h23=mean(tr_symbols(1:10,3,k).*conj(pilots(1:10,2)));%%%
est_coefs(:,:,k)=[[h11;h12;h13] [h21; h22;h23]];
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)));
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)));
h13=mean(tr_symbols(11:20,3,k).*conj(pilots(11:20,1)));%%%
h23=mean(tr_symbols(1:10,3,k).*conj(pilots(1:10,2)));%%%
h14=mean(tr_symbols(11:20,4,k).*conj(pilots(11:20,1)));%%%
h24=mean(tr_symbols(1:10,4,k).*conj(pilots(1:10,2)));%%%
est_coefs(:,:,k)=[[h11;h12;h13; h14] [h21; h22;h23; h24]];%%%%est_coefs(:,:,k)=[h11;h21];
end
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -