资源简介
最简单的ofdm信道估计算法 LS最小二乘信道估计算法最简单的ofdm信道估计算法 LS最小二乘信道估计算法
代码片段和文件信息
clear all;%%%% 一列情况下的LS %%%
clc;
carrier_count=128;%
bits_per_symbol=2;%用4进制调制
symbols_per_carrier=1;%%
I=10;%%
pilot=[1:I:carrier_count]%%%%%%%%%%%%%%%%%
if max(pilot)~=carrier_count
pilot_index=[pilotcarrier_count];
else
pilot_index=pilot;
end
M= size(pilot_index2)%%%%%%%%%%%%%%%%%%%%
N=carrier_count;%总载波数 128
N_number=carrier_count*symbols_per_carrier*bits_per_symbol;%总二进制数
fd=0.01;%假设多普勒频移为
Ts=1;%采样周期
CP=11;%保护时间
L=10;
SNR_number=7;%SNR数量
err_rate=ones(1SNR_number);
mse=ones(1SNR_number);
h=zeros(L1);
W_h=fft(eye(NL))/sqrt(N);
%--------------------生成信号----------------------------------------------
X_msg=randint(1N4);
%--------------------QPSK调制----------------------------------------------
X=pskmod(X_msg4);
%%%%%%% 串并变换 %%%%%%%%%%%
X1=X.‘;
X2=ifft(X1);
%--------------------循环前缀----------------------------------------------
for i=1:carrier_count;
x(i+CP1)=X2(i1);
end
for i=1:CP;
x(i1)=X2(i+carrier_count-CP1);
end
%%%%%%% 并串变换 %%%%%%%%%%%
X3=x.‘;
for n=1:50;
%------------------- 生成信道----------------------------------------------
K=6;%稀疏度为4
delay=[1 3 5 7 8 9];%各径延迟
% a=[0 -0.12 -0.78 -1 -1.25 -2];
% a=[0 -0.87 -2.17 -3.04 -3.91 -4.34];
%a=[0 -1.87 -4.17 -7.04 -9.91 -10.34];
a=[0 -2.87 -7.17 -12.04 -17.91 -19.34];
RLchannel=rayleighchan(Tsfddelaya);
RLchan.ResetBeforeFiltering=0; %必须设置为0这样多径信道对符号的拖尾就可以算到下一个符号上
RLchannel.StorePathGains=1;
评论
共有 条评论