Category Archives: Fundamentals

The basic building blocks.

Wireless Channel Modeling: Back to Fundamentals

Simplified Wireless Communication Channel Model

When a wireless signal travels from a transmitter (Tx) to a receiver (Rx) it undergoes some changes. In simple terms the signal s(t) is scaled by a factor h(t) and noise n(t) is added at the receiver. Let’s take this discussion forward with a simple example. Suppose the Tx transmits one of two possible symbols, +1 or -1. In technical lingo this is called Binary Phase Shift Keying (BPSK). If the channel scaling factor is 0.1 we will either get a +0.1 or -0.1 at the Rx to which AWGN noise is added. The noise is random in nature (having a Gaussian distribution) but for simplicity we assume that it can have one of two values, +0.01 or -0.01.

Continue reading Wireless Channel Modeling: Back to Fundamentals

60 GHz Millimeter Wave Band – Seems Like a Free Lunch

Let us start by first listing down the advantages of the 60 GHz Millimeter Wave Band, a band spread between 57 GHz and 64 GHz. This unlicensed band was first released in the US in 2001 but with limited allowance for transmit power (EIRP of 40 dBm). Later on, in 2013, this limit was increased to allow for greater transmit power (EIRP of 82 dBm) and larger range. The higher EIRP can be achieved with an antenna gain of 51 dBi or higher (EIRP is simply the product of transmit power and antenna gain). But first the advantages:

  1. Unlicensed band means you do not have to pay for using the frequencies in this band.
  2. Wide bandwidth of 7 GHz allows high data rate transmissions. Remember Shannon Capacity Theorem?
  3. High atmospheric absorption resulting in greater path loss (up to 20 dB/km) and shorter range. This means lesser co-channel interference and higher reuse factor.
  4. Smaller antenna sizes allowing for multiple antennas to be put together in the form of an array providing high gain.
  5. This band is quite mature and electronic components are cheap and easily available.
Continue reading 60 GHz Millimeter Wave Band – Seems Like a Free Lunch

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


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.


The resultant signal can then be written as:


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
clear all
close all


for n=1:N
  for m=1:M 

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.


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


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

clear all
close all

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

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


% 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;

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)


  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:


We define H as:


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.

Basics of Beamforming in Wireless Communications

In the previous post we had discussed the fundamentals of a Uniform Linear Array (ULA). We had seen that as the number of array elements increases the Gain or Directivity of the array increases. We also discussed the Half Power Beam Width (HPBW) that can be approximated as 0.89×2/N radians. This is quite an accurate estimate provided that the number of array elements ‘N’ is sufficiently large.

Plane Wave Impinging Upon a ULA
Plane Wave Impinging Upon a ULA

But the max Gain is always in a direction perpendicular to the array. What if we want the array to have a high Gain in another direction such as 45 degrees. How can we achieve this? This has application in Radars where you want to search for a target by scanning over 360 degrees or in mobile communications where you want to send a signal to a particular user without causing interference to other users. One simple way is to physically rotate the antenna but that is not always a feasible solution.

Going back to the basics remember that the Electric field pattern depends upon the constructive and destructive interference of incoming waves. If we have a vector (usually called the steering vector) that aligns the rays coming in from a particular direction we would get a high Gain in that direction. Similarly we can steer a null in a particular direction if we want to reject a particular signal. This we will discuss in a future post.



clear all
close all



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

title ('Gain of a Uniform Linear Array')

The figure below shows the Electric field pattern of a 10 element array steered towards 0, 30, 60 and 90 degrees respectively. We see that selectivity of the array is higher on the Broadside than on the Endfire. In my opinion this has to do with how the cosine function behaves from 0 to 90 degrees. The rate of change of cosine function is much faster around 90 degrees than at 0 degrees or 180 degrees. The slowly changing cosine in the latter case causes a wide response on the Endfire.

Beamforming Using a Ten Element Array

We did calculate the HPBW for a range of steering angles and found that it varied widely from as small as 10.17 degrees to as large as 48.62 degrees. This shows that simple Beamforming using a steering vector has its limitations. The detailed results along with a graph are shown below. It is seen that as the steering angle increases from about 20 degrees there is a sudden decrease in HPBW. For one degree increase of steering angle (phi) from 24 to 25 degrees there is decrease of approx 9 degrees in HPBW. We will investigate this further in future posts.

Case 1: phi = 0, HPBW = 48.62  deg
Case 2: phi = 30, HPBW = 21.69 deg
Case 3: phi = 60, HPBW = 11.75 deg
Case 4: phi = 90, HPBW = 10.17 deg

Half Power Beamwidth of a ULA
Half Power Beamwidth of a ULA as a function of Steering Angle (Phi)

For further visualization of the variation in antenna pattern as a function of the steering angle please have a look at this Interactive Graph. The parameters that can be varied include the angle of the beam, number of antenna elements and separation of the antenna elements. This is taken from an excellent online resource by the name of Geogebra. For further information on how you can use this tool for your own mathematical problems please do visit their website.


Fundamentals of a Uniform Linear Array (ULA)


A Uniform Linear Array (ULA) is a collection of sensor elements equally spaced along a straight line. The most common type of sensor is a dipole antenna that can transmit and receive Electromagnetic Waves over the air. Other types of sensors include acoustic sensors that may be used in air or under water. The requirements of a ULA are different for different applications but the most common requirement is to improve the Signal to Noise Ratio (SNR) and to improve its response (Gain) in a particular direction. The second property means that the array accepts a signal from a particular direction and rejects the signal from another direction just as required in Radar.

Excess Path Length

The graphical representation and the mathematical framework for the problem are shown below. It is assumed that Electromagnetic Waves (Rays) arrive at the array in the form of a plane wave. This means that there is a large distance between the transmitter and receiver (the receiver is in the far field of the transmitter). The array elements are separated by a distance ‘d’ which must be less than or equal to half the wavelength (similar to the concept of minimum sampling frequency in DSP). Now we can see that the second ray travels an excess distance dcos(θ). Similarly, the third and fourth rays travel an excess distance of 2dcos(θ) and 3dcos(θ) respectively. In array processing it is this excess distance between the arriving rays that is important, absolute distance from the source does not matter (unless you are interested in large scale effects such as path loss). This excess distance between the different rays determines if the signals are going to add constructively or destructively.

Plane Wave Impinging Upon a ULA
Plane Wave Impinging Upon a ULA (four elements)

Mathematical Model of a ULA

Mathematical Framework for ULA (four elements)
Mathematical Framework for ULA (four elements)

Simulation Methodology

Given below is the MATLAB code for the scenario shown in the figure above. We have considered two methods, one employing a ‘for-loop’ and another using matrix manipulation. The second method is usually preferred as it is much faster and also allows us to directly apply techniques from linear estimation theory. We have plotted the array pattern for four cases with N=2,4,6 and 8. It is seen that as the number of array elements increases the Gain (or Directivity) of the array increases. In the case shown below we have considered that the four received signals are added with equal weights (w=1), but these weights can be adjusted to get various beam patterns (weights are typically complex quantities adjusting both phase and amplitude  of the signal). This is typically called Beamforming and we will discuss this in a future post.

Matlab Code


clear all
close all
for n=1:no_elements
title ('Gain of a Uniform Linear Array')


clear all
close all
title ('Gain of a Uniform Linear Array')


Uniform Linear Array with Varying Array Length

Note: For a Uniform Linear Array with N elements and half wavelength inter-element spacing the Half Power Beam Width (HPBW) can be estimated as 1.78/N Radians [source]. For the four element case shown above the formula gave a HPBW of 25.49 degrees whereas our simulation yielded 26.20 degrees. For ten element case the formula gave a HPBW of 10.19 degrees whereas the simulation result was 10.20 degrees. Similarly the result for 20 elements is also quite accurate. So we can say that the formula does help us to get a ballpark estimate and gives progressively more accurate results as the number of elements is increased. For a general case where the inter-element spacing is not equal to half wavelength the formula is 0.89*(wavelength/total aperture length).

Lastly, for those who still do not know what Half Power Beam Width also known as 3dB Bandwidth means, it is the width of the main lobe in degrees 3dB down from the peak value of the radiation pattern.

Ibn al-Haytham to Maxwell: A Long Road

As the Chinese proverb says “The journey of a thousand miles begins with a single step”. The journey that started with Ibn al-Haytham experimenting with his Camera Obscura in the eleventh century was completed eight hundred years later by James Clerk Maxwell and Heinrich Hertz. While Maxwell laid down the mathematical framework that described the behavior of Electromagnetic waves, Hertz conclusively proved the existing of these invisible waves through his experiments. There were several scientists on the way that played a crucial part in development of this Electromagnetic theory such as Gauss, Faraday and Ampere. Then there were others such as Huygens, Fresnel and Young who worked on nature of light, which was not known to be an Electromagnetic wave at that time. Once the theory  of Electromagnetic wave propagation was in place there was rapid progress in many fields, particularly in wireless communications (wireless telegraph, radio, radar etc.).

Maxwell’s equations that were proposed in 1861 were initially quite circuitous and were not well accepted. But later on these equations were simplified into the form we now know by Oliver Heaviside. There are still two popular forms of the equations, the integral form and the differential form. We present the integral form of these equations in this article as it is more intuitive and is also easier to represent graphically. The differential form requires understanding of the concepts of divergence and curl and we skip it in this article. The main take away from these equations (presented below) is that a changing Electric field produces a Magnetic field and a changing Magnetic field produces an Electric field. Another important result is that magnetic monopoles do not exist (simply put a magnet, however small, always has a north and south pole).

Maxwell's Equations in Integral Form
Maxwell’s Equations in Integral Form


  1. The dot product with a line segment means that only that component of the field vector is effective that is along the line segment. On the other hand the dot product with a surface means that only that component is considered that is perpendicular to the surface (since the unit vector of a surface is perpendicular to the surface). It means that only those field components are considered that are going perpendicularly in or out of the surface.
  2. For more on history of Maxwell equations visit IEEE Spectrum  and for a detailed explanation of the various forms of the Maxwell’s equations visit this page.
  3. In modern Electromagnetic simulation software the differential form is preferred and the algorithm used is called Finite Difference Time Domain (FDTD). However, if the area of interest is quite large (with respect to the wavelength) then the FDTD method becomes prohibitively complex and another method known as Ray-Tracing is used. Please do check out the Ray-Tracing engine that we have developed. Ray-Tracing is becoming increasingly important in RF Planning of Telecom Networks.