赞
踩
获取代码方式1:
完整代码已上传我的资源:【信道估计】基于matlab OMP算法压缩感知信道估计【含Matlab源码 3932期】
点击上面蓝色字体,直接付费下载,即可。
获取代码方式2:
付费专栏Matlab信号处理(初级版)
备注:
点击上面蓝色字体付费专栏Matlab信号处理(初级版),扫描上面二维码,付费29.9元订阅海神之光博客付费专栏Matlab信号处理(初级版),凭支付凭证,私信博主,可免费获得1份本博客上传CSDN资源代码(有效期为订阅日起,三天内有效);
点击CSDN资源下载链接:1份本博客上传CSDN资源代码
%seqnum_compare.m
%频域信道估计主函数,调用了channel和MSE_com两个函数
clc;
clear all;
L1=31;
taps=6;%抽头数6
K=taps;%单个信道的稀疏度为6
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%---------------------------频域的信道冲激响应----------------------%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
l1=channel(L1,taps);%调用信道函数产生时域的信道冲激响应l1,抽头数6,信号长度31
l2=channel(L1,taps);%调用信道函数产生时域的信道冲激响应l2,抽头数6,信号长度31
h=cat(2,l1,l2)';%将l1,l2左右拼接起来并转置为列向量,信道稀疏度为12
L=size(h,1);%时域的信道脉冲响应的行数62
cs=zeros(3,7);%基于压缩感知的信道估计的均方差构成的矩阵初始化
ls=zeros(3,7);%基于最小二乘法的信道估计的均方差构成的矩阵初始化
mmse=zeros(3,7);%基于最小均方误差的信道估计的均方差构成的矩阵初始化
for t=1:3
N1=16t;%训练序列长度变化三次
N=N12;
[cs_mse_ave,ls_mse_ave,mmse_mse_ave]=MSE_com(N,L,K,h,N1);
cs(t,:)=cs_mse_ave;
ls(t,:)=ls_mse_ave;
mmse(t,:)=mmse_mse_ave;
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%-------------------------------图示比较-----------------------------%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%…
for n=0:6
SNR(n+1)=5*n;
end
figure(1);
semilogy(SNR,cs(1,:),‘ro-.’,‘LineWidth’,1.5);%半对数坐标系一个轴(x轴)是分度均匀的普通坐标轴,另一个轴(y轴)是分度不均匀的对数坐标轴
%r红色,b蓝色,m粉色,p五角星,s正方形,o空心圆,-.表示点划线,-表示实线.
grid on;
hold on;
semilogy(SNR,cs(2,:),‘rp-’,‘LineWidth’,1.5);
hold on;
semilogy(SNR,cs(3,:),‘rs-’,‘LineWidth’,2.5);
hold on;
semilogy(SNR,ls(1,:),‘bo-.’,‘LineWidth’,1.5);
hold on;
semilogy(SNR,ls(2,:),‘bp-’,‘LineWidth’,1.5);
hold on;
semilogy(SNR,ls(3,:),‘bs-’,‘LineWidth’,2.5);
hold on;
semilogy(SNR,mmse(1,:),‘mo-.’,‘LineWidth’,1.5);
hold on;
semilogy(SNR,mmse(2,:),‘mp-’,‘LineWidth’,1.5);
hold on;
semilogy(SNR,mmse(3,:),‘ms-’,‘LineWidth’,2.5);
hold on;
xlabel(‘SNR in DB’);
ylabel(‘均方误差MSE’);
1 matlab版本
2014a
2 参考文献
[1]焦明伟,贾振红,覃锡忠,李涛,赵君凯.改进LMS在低压电力线OFDM信道估计中的应用[J].计算机工程与应用. 2010,46(34)
3 备注
简介此部分摘自互联网,仅供参考,若侵权,联系删除
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。