✅作者简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,matlab项目合作可私信。
🍎个人主页:Matlab科研工作室
🍊个人信条:格物致知。
更多Matlab仿真内容点击👇
大规模MIMO系统上行链路数据检测问题中的格基(信道矩阵)自然短且正交,因此建议我们可以将混合方案应用于这种场景而不使用格减少。仿真结果证实了该扩展的有效性。
function xhat=AMPT(y,H,epsi,sigma2)
% AMP algorithm with ternery prior
% written by Shanxiang Lyu (s.lyu14@imperial.ac.uk), Imperial College
% Last updated on oct 2018
% Ref: "Hybrid Vector Perturbation Precoding: The Blessing of Approximate Message Passing,", IEEE Transactions on Signal Processing
% Digital Object Identifier: 10.1109/TSP.2018.2877205
[m,n]=size(H);
if nargin <= 2
epsi=.5;
sigma2=(norm(y)^2)/(m^1.5);
elseif nargin <= 3
sigma2=(norm(y)^2)/(m^1.5);
end
r=y;%residual vector
x_hat=zeros(n,1);
l_hat=1*ones(n,1);
alpha=1e4;
alphabar=1e4;
Theta=diag(1./(diag(H'*H)));
for t=1:20
r=y-H*x_hat+(n/m)*alphabar/alpha*r;
alpha=sigma2+(n/m)*alphabar;
x_in=Theta*H.'*r+x_hat;
u=x_in;v=Theta*alpha*ones(n,1);
for i=1:n
x_hat(i)=sinh(u(i)/v(i))/((1-epsi)/epsi*exp(1/(2*v(i)))+cosh(u(i)/v(i)));
l_hat(i)=((1-epsi)/epsi*exp(1/(2*v(i)))*cosh(u(i)/v(i))+1)/(((1-epsi)/epsi*exp(1/(2*v(i)))+cosh(u(i)/v(i)))^2);
end
alphabar=mean(Theta^(-1)*l_hat);
x_hat_all(1:n,t)=round(x_hat);
FIT(t)=norm(y-H*x_hat_all(1:n,t));
if FIT(t)>=1e5
break;
end
end
ind=find(FIT==min(FIT));
if isempty(ind)==1
xhat=zeros(n,1);
else
xhat=x_hat_all(1:n,ind(end));
if norm(y)<=FIT(ind(end))
xhat=zeros(n,1);
end
end
Lyu, Shanxiang, and Cong Ling. “Hybrid Vector Perturbation Precoding: The Blessing of Approximate Message Passing.” IEEE Transactions on Signal Processing, Institute of Electrical and Electronics Engineers (IEEE), 2018, pp. 1–1, doi:10.1109/tsp.2018.2877205.
❤️部分理论引用网络文献,若有侵权联系博主删除
❤️ 关注我领取海量matlab电子书和数学建模资料