首页 > 其他分享 >【信道估计】LS/MMSE信道估计,CS信道估计的MATLAB仿真

【信道估计】LS/MMSE信道估计,CS信道估计的MATLAB仿真

时间:2022-11-26 21:34:26浏览次数:45  
标签:MMSE No gg re 信道 估计 mse mean

1.软件版本

MATLAB2021a

2.本算法理论知识

构造测量矩阵是压缩感知技术中关键的研究方向之一, 在实现压缩的过程中需要构建一个满足RIP法则的特殊矩阵来保证较高的重构精度.在这篇文章中,我们通过一个简单的方式利用混沌序列构造测量矩阵,并证明在大多数情况下这种矩阵满足RIP法则.同时,在基于压缩感知的OFDM系统信道估计中应用这种观测矩阵,与基于最小二乘法的信道估计方法进行比较,通过实验仿真说明基于压缩感知的信道估计算法和利用混沌序列构造测量矩阵的优势.
3.核心代码

function [cs_mse_ave,ls_mse_ave,mmse_mse_ave]=MSE_com(N,L,K,h,N1)
W_h=1/sqrt(N)*fft(eye(N,L));
H=W_h*h;
H1=H(1:N1,:);
H2=H((N1+1):N,:);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%-----------------------------training sequence----------------------%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
d=randn(1,N);
d=d/std(d);
d=d-mean(d);
X=diag(d);
X1=X(1:N1,1:N1);
X2=X((N1+1):N,(N1+1):N);
XH=X*H;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% --------------------求h的自协方差矩阵-Rhh-------------------------%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
gg=diag(h);
gg_myu = sum(gg, 1)/L;
gg_mid = gg - gg_myu(ones(L,1),:);
sum_gg_mid= sum(gg_mid, 1);
Rgg = (gg_mid' * gg_mid- (sum_gg_mid' * sum_gg_mid) / L) / (L- 1);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%---------------------------添加高斯白噪声,得Y-----------------------%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
n1=ones(N,1);
for m=1:20%多组实验取平均
for n=0:6
SNR(n+1)=5*n;%比较不同SNR
clear j;
n1=n1*0.01j;%保证下面的awgn函数输入的是复高斯噪声
No=awgn(n1,SNR(n+1));%white Gaussian noise
%variance=var(noise);
SNR_log=10^(SNR(n+1)/10);
variance=var(XH)/SNR_log;
No=variance/var(No)*No;
var_No=var(No);
%No=fft(noise);
%Y = AWGN(X,SNR) adds to X. The SNR is in dB.The power of X is assumed to be 0 dBW. If X is complex, then AWGN adds complex noise.
%No=fft(noise);
Y=XH+No;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%-----------------------LS/MMSE信道估计,得MSE-------------------------%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
mean_squared_error_ls=LS_MSE_calc(X,H,Y,N);
%Evaluating the mean squared error for the MMSE estimator..
mean_squared_error_mmse=MMSE_MSE_calc(X,H,Y,Rgg,var_No,N,L);
mmse_mse(m,n+1)=mean_squared_error_mmse;
ls_mse(m,n+1)=mean_squared_error_ls;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%--------------------------CS信道估计H,得MSE--------------------------%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%CS evaluate H
s=Y;
Phi=X;
T=Phi*W_h; % 恢复矩阵(测量矩阵*正交反变换矩阵
re_H=zeros(1,N); % 待重构的谱域(变换域)向量
re_y=zeros(1,L);
[pos_arry,aug_y]=omp(K,s,T); % pos_arry:最大投影系数对应的位置,
[cos_pos_arry,aug_y]=omp(K,s,T); % pos_arry:最大投影系数对应的位置,
re_y(pos_arry)=aug_y;
re_H=W_h*re_y.'; % 做傅里叶变换重构得到原信号
diff_value=abs((re_H) -(H));
re_error=mean((diff_value./abs(H)).^2);
cs_mse(m,n+1)=re_error;
end
end
mmse_mse_ave=mean(mmse_mse);
ls_mse_ave=mean(ls_mse);
cs_mse_ave=mean(cs_mse);

4.操作步骤与仿真结论

 

 D200

标签:MMSE,No,gg,re,信道,估计,mse,mean
From: https://www.cnblogs.com/matlabfpga/p/16928340.html

相关文章

  • Vulnhub之Insomnia靶机详细解题估计出
    Insomnia作者:jason_huawen靶机基本信息名称:Insomnia:1地址:https://www.vulnhub.com/entry/insomnia-1,644/识别目标主机IP地址......
  • 什么是梯度下降?用线性回归解释和R语言估计GARCH实例
    全文链接:http://tecdat.cn/?p=23606原文出处:拓端数据部落公众号梯度下降是什么?最近我们被客户要求撰写关于梯度下降的研究报告,包括一些图形和统计输出。梯度下降是一种......
  • 信息论与编码:信道的定义和分类
    信道是任何一种通信系统中必不可少的组成部分。任何一个通信系统都可以视为由发送,信道与接收三部分组成。信道通常指以传输媒介为基础的信号通道。信号在信道中传输,可能遇到......
  • 【短时幅度谱】短时幅度谱估计在语音增强方面的MATLAB仿真
    1.软件版本matlab2021a2.本算法理论知识处理宽带噪声的最通用技术是谱减法,即从带噪语音估值中减去噪声频谱估值,而得到纯净语音的频谱。由于人耳对语音频谱分量的相位不......
  • 频段和信道
    结合前文的概念和网络覆盖设计中有效传输距离计算公式,可以分别计算出2.4G、5G和6G频段的射频覆盖范围。通过计算结果会发现单个AP的覆盖范围有限,通常需要部署多个AP才能......
  • 用SPSS估计HLM多层(层次)线性模型模型|附代码数据
    原文链接:http://tecdat.cn/?p=3230作为第一步,从一个不包含协变量的空模型开始 ( 点击文末“阅读原文”获取完整代码数据******** )。每所学校的截距,β0J,然后设置为平......
  • 随参信道的传输特性
    1.随参信道的特性    2.多径传播的影响         ......
  • 恒参信道的传输特性
    1.理想恒参信道的特性      2.实际恒参信道的特性       ......
  • 信道的定义与数学模型
    1.信道的定义与分类:定义:以传输媒介为基础的信号通道狭义信道:根据传输媒介分为有线信道和无线信道。有限信道:同轴电缆,光纤无线信道:微波视距传播,卫星中继,移动通......
  • AR Engine光照估计能力,让虚拟物体在现实世界更具真实感
    AR是一项现实增强技术,即在视觉层面上实现虚拟物体和现实世界的深度融合,打造沉浸式AR交互体验。而想要增强虚拟物体与现实世界的融合效果,光照估计则是关键能力之一。人们所......