MIMO MMSE with Interference
8 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi everyone!
I'm doing a simulation of a MIMO system. My scenario is 3 cells, each cell with 3 base stations, each base station consists three antennas, and one user with 2 receive antennas in one the cells.
The base station are 200 m, 500 m, and 1000 m apart from the user.
The received signal should come from the nearest base station, while the other two signals coming from the other two base stations are considered as an interference.
What I'm doing is generating 3x5*10^5 vector of 1s and 0s, and send them through a channel with some SNR. Then whenever the SNR changes, so does the channel.
And when computing the BER, I've calculated the BER for every antenna (three antennas) and then taking the average of the three.
I guess I'm doing everything right, but for some reason, I don't get the desired BER (10^-4 in log scale at least) Here is my code:
%==========Simulating BER of MIMO system====================================%
% We are considering three cells, each with one BS that has 3 antennas.
% The user is in one of the three cells.
% The three BSs are 200 m, 500 m and 1000 m apart from the user respectively.
% We assume only path loss (Large-Scale fading)exists for simplicity.
% Also, we assume only multipath (Small-Scale fading) exist.
%========================================================================%
clc
clear
close all
%===========Parameters==============%
N=3; % # of BSs
K=1; % # of users
t=3; % # of Tx antennas at each BS
r=2; % # of antennas for the user
I=ones(r,t); % Identity matrix to be used in the Kronecker product
n=2; % Pathloss exponent, 2 for free space
do=1; % Reference distance in meters
Lo=63.0957; % Pathloss (in linear scale at frequency of 1.5 GHz) at do
d=[200 500 1000]; % The distance in meters from the user to the 1st, 2nd and 3rd
% BSs respectively
Csigma=(sqrt(Lo)*(1+d(1:3)./do).^(-n/2)); % Captial Sigma, Large-scale fading coeff. matrix
SNRdB=[0:2:30]; % Signal-to-noise ratio in dB
SNR=10.^(SNRdB/10); % Signal-to-noise ratio in linear scale
iter=5e5; % Iterations to compute the BER
M=2; % PSK modulation order (e.g. M=2 is BPSK)
%===========Calculations=============%
for ii=1:length(SNRdB)
% Generating 0s & 1s
xi1=randi([0 1],t,iter);
xi2=randi([0 1],t,iter);
xi3=randi([0 1],t,iter);
% BPSK modulation
x1=pskmod(xi1,M);
x2=pskmod(xi2,M);
x3=pskmod(xi3,M);
G=sqrt(1/2)*(randn(r*K,t)+sqrt(-1)*randn(r*K,t)); % Small-scale fading coeff. matrix
H1=(kron(Csigma(1),I)).*G; % Channel matrix to the 1st BS
H2=(kron(Csigma(2),I)).*G; % Channel matrix to the 2nd BS
H3=(kron(Csigma(3),I)).*G; % Channel matrix to the 3rd BS
n=(sqrt(1/2))*(randn(r,iter)+j*randn(r,iter)); % noise
y=sqrt(SNR(ii))*(H1*x1+H2*x2+H3*x3)+n; % Received vector
x_mmse=pinv(H1)*y; % Using MMSE receiver
x_hat=pskdemod(x_mmse,M); % BPSK demodulation
numerr=sum(abs(x_hat-xi1),2) % Number of erros, each row corresponds to an antenna
simBER1(ii)=(numerr(1)/iter) % BER for 1st antenna
simBER2(ii)=(numerr(2)/iter); % BER for 2nd antenna
simBER3(ii)=(numerr(3)/iter); % BER for 3rd antenna
end
simBER=(simBER1+simBER2+simBER3)/t; % Total BER
% Plotting the results
semilogy(SNRdB,simBER);
title('SNR vs BER')
xlabel('SNR (dB)')
ylabel('BER')
grid
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Propagation and Channel Models dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!