Just like different frequency bands and time slots can be used to multiplex users, spatial domain can also be exploited to achieve the same result. It is well known that if there are 4 transmit antennas and 4 receive antennas then four simultaneous data streams can be transmitted over the air. This can be scaled up to 8 x 8 or in the extreme case to 128 x 128. When the number of transmit or receive antennas is greater than 100 we typically call it a Massive MIMO scenario and we need specialized signal processing techniques to handle this case. Computationally complex techniques like Maximum Likelihood (ML) become quite difficult to implement in real-time and we have to resort to some simplified linear array processing techniques. This is the topic of this blog post.

To understand the scenario that we will discuss here, please look at our previous post. Also note that when we talk about nT x nR case we do not necessarily mean nT transmit antennas and nR receive antennas, it could also mean nT users with 1 antenna each and co-located nR receive antennas, such as at a base station. We typically assume that the number of receive antennas is greater than the number of users. When the number of users is greater than the number of receive antennas we call it overloaded case and this is not discussed here. Here the number of users is fixed at 16 (randomly distributed between 0 and 360 degrees within the cell) and the number of receive antennas is varied from 20 to 100.

The four signal processing techniques that are applied at the receive array are:

- Matched Filtering (MF)
- Moore Penrose Pseudo-Inverse without controlling the threshold (PINV)
- Moore Penrose Pseudo-Inverse with a specified threshold (PINV with tol)
- Minimum Mean Squared Error (MMSE)

There are some other techniques that we experimented with but are omitted here for the sake of brevity. The MATLAB code and simulation results showing bit error rate as a function of receive array size (nR) are given below. It is seen that simple Matched Filter works quite well when the receive array size is small but with increasing nR the performance improvement is not that great. Least Squares (LS) technique using Moore-Penrose Pseudo Inverse shows improved performance with increasing nR and this can be further improved by controlling the threshold (tol). We found that a threshold of 0.1 gave significantly improved results as compared to no threshold case. Lastly we implemented MMSE and found that it gave us the best results. It must be noted that we also implemented ML for a limited size of receive array and found that its BER performance was far superior than any other technique.

Note:

- In the code below, nR=N and nT=M
- What is labelled here as Matched Filter is strictly speaking Maximal Ratio Combining
- The case we discuss above and in the code below is categorized as Multiuser MIMO (MU-MIMO) for the uplink
- MU-MIMO for the downlink is not that straight forward and will be the subject of some future post
- We have considered a deterministic channel model as opposed to a probabilistic channel model
- This can be easily implemented by assuming that channel coefficients are independent and identically distributed (IID) complex Gaussian random variables with mean zero and variance of 0.5 per dimension
- The initial results we have obtained using this alternate channel model are much better than the results shown below, but the question remains which is the more accurate representation of a real channel

```
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% MASSIVE MIMO BEAMFORMING
% COPYRIGHT RAYMAPS (C) 2018
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear all
close all
% SETTING THE PARAMETERS FOR THE SIMULATION
f=1e9; %Carrier frequency
c=3e8; %Speed of light
l=c/f; %Wavelength
d=l/2; %Rx array spacing
N=20; %Receive array size
M=16; %Transmit array size (users)
theta=2*pi*(rand(1,M)); %Angular separation of users
EbNo=10; %Energy per bit to noise PSD
sigma=1/sqrt(2*EbNo); %Standard deviation of noise
n=1:N; %Rx array number
n=transpose(n); %Row vector to column vector
% RECEIVE SIGNAL MODEL (LINEAR)
s=2*(round(rand(M,1))-0.5); %BPSK signal of length M
H=exp(-i*(n-1)*2*pi*d*cos(theta)/l); %Channel matrix of size NxM
wn=sigma*(randn(N,1)+i*randn(N,1)); %AWGN noise of length N
x=H*s+wn; %Receive vector of length N
% LINEAR ARRAY PROCESSING - METHODS
% 1-MATCHED FILTER
y=H'*x;
% 2-PINV without tol
% y=pinv(H)*x;
% 3-PINV with tol
% y=pinv(H,0.1)*x;
% 4-Minimum Mean Square Error (MMMSE)
% y=(H'*H+(2*sigma^2)*eye([M,M]))^(-1)*(H')*x;
% DEMODULATION AND BER CALCULATION
s_est=sign(real(y)); %Demodulation
ber=sum(s!=s_est)/length(s); %BER calculation
%Note: Please select the array processing technique
%you want to implement (1-MF, 2-LS1, 3-LS2, 4-MMSE)
```