Anyone having MATLAB codes of Massive MIMO.
Hi Lavish,
Here the matlab code for Approximate message passing (AMP) for Massive MIMO detection.
function main()
clc;clear; close all;
m=256;% # of received antennas
n=32;% # of users
SNRrange=[1:20];
count=0;
for s=SNRrange
SNRdb=s;
for monte=1:1000
x=(2*randi([0,1],n,1)-ones(n,1))+sqrt(-1)*(2*randi([0,1],n,1)-ones(n,1));
sigmas2=2;%signal variance in QPSK
H=1/sqrt(2*m)*randn(m,n)+sqrt(-1)/sqrt(2*m)*randn(m,n);
sigma2=2*n/m*10^(-SNRdb/10); %noise variance in control by SNR in DB
w=sqrt(2*sigma2)*randn(m,1)+sqrt(-1)*sqrt(2*sigma2)*randn(m,1);
y=H*x+w; %channel model
%iterAMP is # of iterations in AMP
iterAMP1=2;
xhat1=AMP(y,H,sigma2,sigmas2,iterAMP1,m,n);
iterAMP2=4;
xhat2=AMP(y,H,sigma2,sigmas2,iterAMP2,m,n);
x_mmse=(sigma2/sigmas2*eye(n)+H'*H)^(-1)*H'*y;
x_mmse=sign(real(x_mmse))+sqrt(-1)*sign(imag(x_mmse));
errorAMP1(monte)=sum(x~=xhat1);
errorAMP2(monte)=sum(x~=xhat2);
errorMMSE(monte)=sum(x~=x_mmse);
end
count=count+1;
serAMP1(count)=mean(errorAMP1);
serAMP2(count)=mean(errorAMP2);
serMMSE(count)=mean(errorMMSE);
figure(1)% plot the SER
semilogy(SNRrange,serAMP1,'-+r', SNRrange,serAMP2,'-pk',SNRrange, serMMSE,'-ob');
grid on;
legend(['AMP iteration=' int2str(iterAMP1)], ['AMP iteration=' int2str(iterAMP2)], 'MMSE');
xlabel('SNR (dB)'); ylabel('SER');
title(['BER performance comparison in system m= ' int2str(m) ' n=' int2str(n)]);
function xhat=AMP(y,H,sigma2,sigmas2,iterAMP,m,n)
% AMP detector in Massive MIMO
r=zeros(m,1);
xhat=zeros(n,1);
alpha=sigmas2;%initial estimation variance
for t=1:iterAMP
r=y-H*xhat+(n/m)*sigmas2/(sigmas2+alpha)*r;
alpha=sigma2+(n/m)*sigmas2*alpha/(sigmas2+alpha);
xhat=(sigmas2/(sigmas2+alpha))*(H'*r+xhat);
xhat=sign(real(xhat))+sqrt(-1)*sign(imag(xhat));
Hi, Lavish, tell me exactly what are you looking for. May be I can provide you the complete code.
Hi, Lavish, Gurjot is expert in massive mimo research field you can request him for the Code may be he will provide you some of his latest codes.
Hello all, In SPSS I am going to code 2 open-ended questions. I have already read all the answers and I made a list of the most important categories to which I can code the answers. This question...
02 March 2021 1,757 4 View
Dear Researchers I am trying to perform a PIL simulation using STM32F4 Discovery board and comunication serial USB TO TTL. During simulation I receive the following timeout error: An error...
01 March 2021 2,327 1 View
The following code (see 1st 2 images attached) is used to produce PID controller values that are designed to control the system (G). The code finds the PID controller values (noted as k) by using...
28 February 2021 6,560 14 View
I have input and output data set for "ANFIS modeling in MATLAB", and I am getting some negative predicted values of output in testing. However, the predicted values of output in training are...
28 February 2021 3,459 3 View
I am working on modeling and simulation of biomecanical material behaviour, I have succeded on simulating skin using anisotropic hyperelastic material, on APDL and in our lab's finite element...
28 February 2021 552 3 View
I am required to learn about Flyback converters and I got stuck not knowing to full design of the power supply flyback converter Based USB Charger Model using Simulink, especially the design model...
25 February 2021 5,435 2 View
Hello, As part of simulation of gases mixture and water, I need to calculate viscosity of the fluid components and I am using relationships proposed by Chung et al. (1988). The irony is while I...
25 February 2021 8,053 5 View
I do need the Matlab code of Fractal Discrete Cosine Transform (FDCT). Can anyone who has already implement this code, help me with the implementation of this transform?
24 February 2021 5,602 2 View
Hi Hope you are well. Can you please share your code for D2D implementation in Matlab. I want to implement D2D in Matlab based Vienna simulator and struggling to deploy D2D. Thanks
24 February 2021 9,378 3 View
Dear colleagues If anyone has a model of multi-effect distillation in EES or MATLAB software, please send it to me.
24 February 2021 7,282 1 View