📄 kalman_estimate.m
字号:
function [h, M] = kalman_estimate(initial_cir, y, num_ofdm)
% h0: a vector which describes the CIR of the pilot frequency in the first
% ofdm symbol. It is an initial values of the kalman estimator.
% num_ofdm: describes the number of the ofdm symbols in a single packet.
% h: a vector which describes the predicted CIR in the corresponding pilot
% frequency in every ofdm symbol.
% M: a vector which describes the MMS of the kalman estimator.
a = 1;
Q = 0.0001;
pilot = 1;
u = 0.01;
global sim_consts;
for i = 1:sim_consts.NumPilotSubc
h2 = initial_cir(i);
M2 = 1;
for j = 1:num_ofdm
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
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -