资源简介
程序是比较MMSE和LS的SER,已经运行过了,可以出图
代码片段和文件信息
clc;
clear all;
%生成训练序列
%用BPSK调制
X=zeros(6464);
d=rand(641);
for i=1:64
if(d(i)>=0.5)
d(i)=+1;
else
d(i)=-1;
end
end
for i=1:64
X(ii)=d(i);
end
%计算出信道向量G
%信道特性
tau=[0.5 3.5];
for k=1:64
s=0;
for m=1:2
s=s+(exp(-j*pi*(1/64)*(k+63*tau(m))) * (( sin(pi*tau(m)) / sin(pi*(1/64)*(tau(m)-k)))));
end
g(k)=s/sqrt(64);
end
G=g‘;%信道向量
H=fft(G);% 频域
XFG=X*H;
n1=ones(641);
n1=n1*0.000000000000000001i;%加入复高斯白噪声
noise=awgn(n18);%设置SNR为8db
variance=var(noise);
N=fft(noise);
Y=XFG+N;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%求出G的自相关矩阵Rgg
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
gg=zeros(6464);
for i=1:64
gg(
- 上一篇:bpsk 调制与解调实现
- 下一篇:辅助变量最小二乘法matlab程序
评论
共有 条评论