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

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

时间:2022-10-10 15:35:55浏览次数:61  
标签: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 eval(测量矩阵*正交反变换矩阵
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.操作步骤与仿真结论

运行

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

得到 

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

5.参考文献

[1]刘雨溪, 于蕾. 基于测量矩阵优化的OFDM系统CS信道估计[J]. 中国新通信, 2016(6):4.

D200

6.完整源码获得方式

方式1:微信或者QQ联系博主

方式2:​​订阅MATLAB/FPGA教程,免费获得教程案例以及任意2份完整源码​

标签:MMSE,No,矩阵,gg,re,信道,估计,mse,mean
From: https://blog.51cto.com/u_15815923/5743797

相关文章

  • 相机姿态估计
    总目标:计算相机运动2D-2D:对极几何对极约束\[x{_2}{^T}t^∧Rx_1=0\]\[p_2^TK^{-T}t^∧RK^{-1}p_1=0\]它的几何意义是\(O_1,P,O_2\)三者共面。对极约束中包含了平移和旋......
  • 这次操机撞了个大件,工作估计保不住了!
    师傅总是和我说调活的时候一定要慢走多看!!!今天干活时自己粗心大意,实现了工作生涯中第一次撞机。设备科说配件不好买,要跟原厂买,保守估计得2W左右…… 我忐忑去问师傅有什么后......
  • 点估计
    目录1点估计1.1矩法估计1.1.1概述(1)矩法估计的提出(2)总体矩(3)样本矩(4)矩法1.1.2实例1.2极大似然估计MLE1.2.1概述(1)极大似然法的提出(2)极大似然估计的统计学定义(3)极大似然......
  • 大盘点|6D姿态估计算法汇总(上)
    1、DenseFusion:6DObjectPoseEstimationbyIterativeDenseFusion(CVPR2019)原文链接:https://arxiv.org/abs/1901.04780代码链接:https://github.com/j96w/DenseFusio......
  • 物体的三维识别与6D位姿估计:PPF系列论文介绍(五)
    本文创新点:点对特征是一种广泛应用的检测点云中三维物体的方法,但在存在传感器噪声和背景杂波的情况下,它们很容易失效。本文引入了新的采样和投票方案,可以很好地降低杂波和传......
  • 核密度估计
    核函数估计参考这里KernelDensityEstimation,KDE这个东西的目的在于使用离散的样本估计概率密度函数。公式推导:\[\begin{aligned}&1:\quadf(x)=\lim......
  • 【概率论】大数定律与中心极限定理 & 参数估计
    本文已参与「新人创作礼」活动,一起开启掘金创作之路。大数定律与中心极限定理一、切比雪夫不等式设随机变量$X$具有期望$E(X)=\mu$,方差$D(X)=\sigma^{2}$,则对于任意正数$......
  • 现代功率谱估计(2):Levinson-Durbin递推方法求解AR模型参数
    现代功率谱估计(2):Levinson-Durbin递推方法求解AR模型参数p阶AR模型的差分方程形式和系统函数分别为:令\(z=e^{jw}\),则AR模型输出的功率谱密度为:AR模型的系统输出信号......
  • 现代功率谱估计(3):SVD-TLS,奇异值分解—总体最小二乘方法求解AR模型参数
    现代功率谱估计(3):SVD-TLS,奇异值分解—总体最小二乘方法求解AR模型参数Yuler-Walker方程及修正Yuler-Walker方程对于一个AR\((p)\)过程,其输出信号的自相关函数和AR系数有以......
  • PVN3D: 基于Deep Point-wise 3D关键点投票的6D姿态估计网络(香港科技大学提出)
    论文链接:​​https://arxiv.org/pdf/1911.04231v1.pdf​​代码链接:​​https://github.com/ethnhe/PVN3D.git​​.背景介绍由于光照变化、传感器噪声、场景遮挡和目标截断等......