All posts by Yasir Ahmed (aka John)

About Yasir Ahmed (aka John)

More than 20 years of experience in various organizations in Pakistan, the USA, and Europe. Worked as a Research Assistant within the Mobile and Portable Radio Group (MPRG) of Virginia Tech and was one of the first researchers to propose Space Time Block Codes for eight transmit antennas. The collaboration with MPRG continued even after graduating with an MSEE degree and has resulted in 12 research publications and a book on Wireless Communications. Worked for Qualcomm USA as an Engineer with the key role of performance and conformance testing of UMTS modems. Qualcomm is the inventor of CDMA technology and owns patents critical to the 4G and 5G standards.

Path Loss at Millimeter Wave Frequencies

The mmWave Channel

It is well known that wireless signals at millimeter wave frequencies (mmWave) suffer from high path loss, which limits their range. In particular there are higher diffraction and penetration losses which makes reflected and scattered signals to be all the more important. Typical penetration losses for building materials vary from a few dBs to more than 40 dBs [1]. There is also absorption by the atmosphere which increases with frequency. But there are also some favorable bands where atmospheric losses are low (<1dB/km).

Continue reading Path Loss at Millimeter Wave Frequencies

Multicarrier Beamforming at mmWave

Some Background

We have previously discussed beamforming for single carrier signals. Now we turn our attention to multicarrier signals particularly at mmWave where the bandwidths are two orders of magnitude (100x) higher than at sub 6GHz band. We want to investigate that whether there is any distortion in the array response due to high signal bandwidths at mmWave.

But let us start with the case that we have discussed so far i.e. 1GHz single carrier case and a Uniform Linear Array (ULA). We then add two other carriers at 1.2GHz and 0.80GHz, quite an extreme case, stretching the bandwidth to 400MHz. Antenna spacing is still λ/2=0.15m corresponding to the center frequency of 1GHz.

Continue reading Multicarrier Beamforming at mmWave

Fundamentals of a Circular Array – Mathematical Model and Code

Array Factor and Element Factor

In the previous post we discussed the case of a Square Array which is a special case of a Rectangular Array. The code we shared can handle both the cases as well as Uniform Linear Array. We did briefly talk about the response of an element vs the response of an array, but we did not put forward the mathematical relationship. So here it is:

Response of an Array = Array Factor x Element Factor

In this post as well as previous posts we have assumed the element response to be isotropic (or at least omni-directional in the plane of the array) giving us an Element Factor of 1. So the array response is nothing but equal to the Array Factor.  In this post we mostly discuss the 2D Array Factor but briefly touch upon the 3D case well at the end. Continue reading Fundamentals of a Circular Array – Mathematical Model and Code

Fundamentals of a Rectangular Array – Mathematical Model and Code

Background

In the previous few posts we discussed the fundamentals of Uniform Linear Arrays (ULAs), Beamforming, Multiuser Detection and Massive MIMO ([1], [2], [3], [4]). Now we turn our attention to more complicated array structures such as rectangular, triangular and circular. We still assume each element of the array to have an isotropic or omni-directional (in the plane of the array) radiation pattern. The mathematical models for more complicated radiation patterns are an extension of  the what is developed here.

Square and Rectangular Arrays

In this post we consider a square array which is a special case of rectangular array.  We build up from the most basic case of a 2 x 2 array and derive the equation of the resultant signal, which is simply the summation of the individual signals received at the four array elements. Later on we give the MATLAB code which can be used to plot the radiation pattern of any size rectangular array.

Derivation of the Array Pattern

Lets consider a plane wave impinging upon a 2 x 2 receive array. The source is considered to be in the far field of the receive array making the plane wave assumption to be realistic. The equations for the received signal at the four array elements are given below. Please note that since the combined signal only depends upon the relative phase of the four components we assume the phase at the wavefront (red line in the figure below) to be zero. Also note that we have assumed that dx=dy=d.

r1=1
r2=e-j2πdcos(θ)/λ
r3=e-j2πdsin(θ)/λ
r4=e-j2πd(cos(θ)+sin(θ))/λ

The resultant signal can then be written as:

rt=r1+r2+r3+r4

Rectangular Array
Rectangular Array Geometrical Representation

In general for an N x M array the resultant signal can be written as:

rt=∑∑ e-j2πd(ncos(θ)+msin(θ))/λ

When the array is not square i.e. the separation along the x and y axes is not the same we have:

rt=∑∑ e-j2π(ndxcos(θ)+mdysin(θ))/λ

The range of n and m is 0 to N-1 and 0 to M-1 respectively.

8 x 8 Square Array Radiation Pattern

8x8 Rectangular Array
8×8 Square Array Radiation Pattern

MATLAB Code for a Rectangular Array
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% SIMPLE RECTANGULAR ARRRAY
% WITH N x M ELEMENTS
% COPYRIGHT RAYMAPS (C) 2018
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear all
close all

f=1e9;
c=3e8;
l=c/f;
dx=l/3;
dy=l/3;
theta=0:pi/1800:2*pi;
N=8;
M=8;

r=0;
for n=1:N
  for m=1:M 
    r=r+exp(-i*2*pi*(dx*(n-1)*cos(theta)+dy*(m-1)*sin(theta))/l);
  end
end

polar(theta,abs(r),'bo-')
title ('Gain of a Uniform Linear Array')
Discussion of Simulation Results

In the above code we have assumed a carrier frequency of 1 GHz which gives us a wavelength of 0.3 meter. The element separation along the x and y axis is assumed to be 0.1 meter (lambda/3). The total number of elements is 8 x 8 = 64. The maximum gain obtained is equal to 8 on the  linear scale or 9 dB on the logarithmic scale. The radiation pattern has four peaks which does not make this array structure to be of much practical use. More complex array structures resulting in more desirable radiation patterns will be discussed in future posts.

Note:

Please note that we have simplified the problem significantly by assuming an omnidirectional pattern of the array elements and plotting the composite radiation pattern only in the plane of the array. In reality the array elements do not always have an omnidirectional radiation pattern (one popular antenna that does have an omnidirectional pattern is a dipole) and we have to plot the 3D pattern of the array (or cuts along different planes) to get a better understanding of the characteristics such as Half Power Beamwidth, First Null Beamwidth and Side Lobe Level etc. More on this later.

Massive MIMO Fundamentals and Code

Background

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.

Description of the Scenario

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.

Plane Wave Impinging Upon a ULA
Plane Wave Impinging Upon a ULA from a Particular User/Direction

Beamforming Using a Uniform Linear Array
Beamforming Using a Uniform Linear Array

Linear Signal Processing Techniques for Massive MIMO

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

  1. Matched Filtering (MF)
  2. Moore Penrose Pseudo-Inverse without controlling the threshold (PINV)
  3. Moore Penrose Pseudo-Inverse with a specified threshold (PINV with tol)
  4. Minimum Mean Squared Error (MMSE)
Simulation Results

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.

BER as a Function of Receive Array Size
BER of a MU-MIMO Receive Array at the Base Station (LOS)

MATLAB Code for Massive MIMO Scenario
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 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)

Note:

  1. In the code above, N=nR and M=nT
  2. What is labelled here as Matched Filter (MF) is strictly speaking Maximal Ratio Combining (MRC)
  3. The case we discuss above is categorized as Multiuser MIMO (MU-MIMO) for the uplink
  4. MU-MIMO for the downlink is not that straight forward and will be the subject of some future post
  5. We have considered a deterministic channel model as opposed to a probabilistic channel model
  6. Probabilistic channel model 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
  7. The initial results we have obtained using this probabilistic channel model are much better than the results shown above, but the question remains which is the more accurate representation of a real channel
Update: Simulation Using a Probabilistic Channel

Since most of the literature in Massive MIMO uses a probabilistic channel instead of a deterministic channel, we decided to investigate this further. To implement such a channel model we simply need to change one line of the MATLAB code shown above. Instead of defining H as:

H=exp(-i*(n-1)*2*pi*d*cos(theta)/l);

We define H as:

H=(1/sqrt(2))*randn(N,M)+i*(1/sqrt(2))*randn(N,M);

The results are shown below. It is seen that the BER performance is orders of magnitude better. We would next investigate the performance degradation if the channel coefficients are not independent and identically distributed (IID) but have some correlation. This is closely tied to inter-element separation of the antenna array.

BER as a Function of Receive Array Size
BER of a MU-MIMO Receive Array at the Base Station (NLOS)

Concluding Remarks

The fundamental question that needs to be asked is why the performance in the NLOS scenario (probabilistic) is better than LOS scenario (deterministic). This has to do with the Signal to Noise Ratio [1]. In the above we have assumed the Signal to Noise Ratio (SNR) for the two scenarios to be the same. But realistically speaking this is never the case. Although the NLOS case assumes a rich scattering environment providing a high multiplexing gain (dependent on the rank of the channel matrix H) its SNR would always be lower due to reflection, diffraction and scattering loss. So a fair comparison between the LOS and NLOS case is only possible if we downward adjust the SNR for the NLOS case. Simulation results have shown that the SNR for the NLOS case needs to be downgraded by about 25 dB to have similar BER performance as the LOS case. Lastly it must be noted that the BER performance of the NLOS case would deteriorate once the channel coefficients are not IID and there is some correlation between them.

[1] Zimu Cheng, Binghao Chen, and Zhangdui Zhong “A Tradeoff between Rich Multipath and High Receive Power in MIMO Capacity”, International Journal of Antennas and Propagation, Volume 2013.

Fundamentals of Linear Array Processing – Receive Beamforming

In the previous two posts we discussed the fundamentals of array processing particularly the concept of beamforming (please check out array processing Part-1 and Part-2). Now we build upon these concepts to introduce some linear estimation techniques that are used in array processing. These are particularly suited to a situation where multiple users are spatially distributed in a cell and they need to be separated based upon their angles of arrival. But first let us introduce the linear model; I am sure you have seen this before.

x=Hs+w

Here, s is the vector of symbols transmitted by M users, H is the N x M channel matrix, w is the noise vector of length N and x is the observation vector of length N. The channel matrix formed by the channel coefficients is deterministic (as opposed to probabilistic) in nature as it is purely dependent upon the phase shifts that the channel introduces due to varying path lengths between the transmit and receive antennas. The impact of a channel coefficient can be thought of as a rotation of the complex signal without altering its amplitude.

This means that the channel acts like a single tap filter and the process of convolution is reduced to simple multiplication (a reasonable assumption if the symbol length is much larger than the channel delay spread). The channel model does not accommodate for path loss and fading that are also inherent characteristics of the channel. But the techniques are general enough for these effects to be factored in later. Furthermore, it is assumed that the channel H is known at the receiver. This is a realistic assumption if the channel is slowly varying and can be estimated by sending pilot signals.

Beamforming Using a Uniform Linear Array
Beamforming Using a Uniform Linear Array

So going back to the linear model we see that we know x and H while s and w are unknown. Here w cannot be estimated since it’s random in nature (remember what the term AWGN stands for?) and we ignore it for the moment. The structure of s is known. For example if we are using BPSK modulation then the m symbols of the signal vector s can either be +1 or -1. So we can start the process of symbol detection by substituting all possible combinations of s1, s2…sm and determine the combination that minimizes

||x-Hs||

This is called the Maximum Likelihood (ML) solution as it determines the combination that was most likely to have been transmitted based upon the observation.

Although ML is conceptually very appealing and yields good results it becomes prohibitively complex as the constellation size or number of transmit antennas increases. For example for 2-Transmit case and BPSK modulation there are 2^(1 bit x 2 antennas)=2^2=4 combinations, which seems quite simplistic. But if 16-QAM modulation is used and there are 4-Transmit antennas the number of combinations increases to 2^(4 bits x 4 antennas)=2^16=65536. So we conclude that ML is not the solution we are looking for if computational complexity is an issue (which might become less of an issue as the processing power of devices increases).

Next we turn our attention to a technique popularly known as Zero Forcing or ZF (the origins of the name I still do not know). According to this technique the channel has a multiplicative effect on the signal. So to remove this effect we simply divide the signal by the channel or in the language of matrices we perform matrix inversion. Mathematically we have:

x=Hs+w

H-1x=H-1Hs+H-1w

H-1x=s+H-1w=s̄

So we see that we get back the signal s but we also get a noise component enhanced by inverse of the channel matrix. This is the well-known problem of ZF called Noise Enhancement. Then there are other problems such as non-existence of the inverse when the channel H is not a square matrix (which only happens when the number of transmit and receive antennas is the same). The inverse of H also cannot be calculated if H is not full rank or determinant of H is zero.  So we now introduce another technique called Least Squares (LS). According to this the signal vector can be estimated as

s̄=(HHH)-1HHx

This is also sometimes referred to as the Minimum Variance Unbiased Estimator, as described by Steven M. Kay in his classical book on Estimation Theory [Fundamentals of Statistical Signal Processing Vol-1]. This can be easily implemented in MATLAB using Moore Penrose Pseudo Inverse or pinv(H). This is much more stable than going for the direct inversion methods.

We next plot the Bit Error Rate (BER) using the code below. The number of receive antennas is varied from two to ten while the number of transmit antennas is fixed at four. The transmit antennas are assumed to be positioned at 30, 40, 50 and 60 degrees from the axis of the receive array. The receive antennas are separated by λ/2 meters. The frequency of operation is 1GHz but it is quite irrelevant to the scenario considered as everything is measured in multiples of wavelengths. The Eb/No ratio (roughly the signal to noise ratio) is varied from 5dB to 20dB in steps of 5dB.

Bit Error Rate for Changing Rx Array Length
Bit Error Rate for Changing Rx Array Length

As expected the BER for the two methods, other than ML, is more or less the same and decreases rapidly once the number of receive antennas becomes greater than number of transmit antennas (or number of signals).  The case where the number of receive antennas is less than number of signals (equal powered and with a small angular separation) is dealt with by Overloaded Array Processing (OLAP) techniques and have been discussed in detail by James Hicks [Doctoral Dissertation] a student of Dr. Reed at Virginia Tech.

Strangely enough it is seen that the overloaded case is not the worst part of the BER curve. The worst BER is observed when the number the number of transmit and receive antennas is the same (four in this case). In other words the BER gradually increases as the rank of the channel matrix increases and then decreases once it reaches its maximum value. This is quite interesting and obviously has to do with Noise Enhancement that we discussed earlier. This will be further investigated in future posts.

For further information on the above methods visit this interesting article.

Update-1

So we struggled for a while to find out why the BER is worst at full rank and thought that there is something wrong in our model but ultimately we found that this has to do with how the pseudoinverse works and the way the tolerance limit (tol in MATLAB) for the singular values is set. We have found quite interesting results while experimenting with various inversion methods and the results are pending publication. Will keep you updated about the progress.

Update-2

We experimented with the MATLAB function pinv by changing the tolerance parameter. Previously we had used the default tolerance that is built into the function pinv. The default tolerance (tol) is defined as:

tol = max (size (H)) * sigma_max (H) * eps

where sigma_max (H) is the maximal singular value of channel matrix H

and eps is the machine precision.

More precisely, eps is the relative spacing between any two adjacent numbers in the machine’s floating point system. This number is obviously system dependent. On machines that support IEEE floating point arithmetic, eps is approximately 2.2204e-16 for double precision and 1.1921e-07 for single precision.

So back to the subject we experimented with two values of tol; 1.0 and 0.1 while changing the signal to noise ratio. The number of transmit antennas (users) is fixed at 4 while number of receive antennas is varied from 2 to 8. For tol value of 1.0 it is seen that changing the value of EbNo does not change the results much up to 6 receive antennas but after that the BER results rapidly diverge. For tol value of 0.1 the results are quite unexpected. The BER drops with increasing number of antennas up to N=5 but then there is an unexpected increase in the BER for N=6. This needs to be further investigated.

BER for tolerance of 1.0

BER for tolerance of 0.1

MATLAB CODE USED TO GENERATE ABOVE PLOT

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% MULTIUSER DETECTION USING 
% A UNIFORM LINEAR ARRRAY
% AKA RECEIVE 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=10;         %Receive array length

theta=([30 40 50 60])*pi/180;   %Angular placement of Tx array (users)
EbNo=10;                        %Energy per bit to noise PSD
sigma=1/sqrt(2*EbNo);           %Standard deviation of noise

n=1:N;                          %Rx array vector
n=transpose(n);                 %Converting row to column
M=length(theta);                %Tx array length 

% 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

% PINV without tol
% y=pinv(H)*x;

% PINV with tol
y=pinv(H, 0.1)*x;

% DEMODULATION AND BER CALCULATION
s_est=sign(real(y));          %Demodulation
ber=sum(s!=s_est)/length(s);  %BER calculation