###### Introduction

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.

###### Mathematical Model of a ULA

###### 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

FOR LOOP IMPLEMENTATION

```
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% SIMPLE UNIFORM LINEAR ARRRAY
% WITH VARIABLE NUMBER OF ELEMENTS
% COPYRIGHT RAYMAPS (C) 2018
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear all
close all
f=1e9;
c=3e8;
l=c/f;
d=l/2;
no_elements=4;
theta=0:pi/180:2*pi;
r=zeros(1,length(theta));
for n=1:no_elements
dx(n,:)=(n-1)*d*cos(theta);
r=r+exp(-i*2*pi*(dx(n,:)/l));
end
polar(theta,abs(r),'b')
title ('Gain of a Uniform Linear Array')
```

MATRIX IMPLEMENTATION

```
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% SIMPLE UNIFORM LINEAR ARRRAY
% WITH VARIABLE NUMBER OF ELEMENTS
% MATRIX IMPLEMENTATION
% COPYRIGHT RAYMAPS (C) 2018
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear all
close all
f=1e9;
c=3e8;
l=c/f;
d=l/2;
no_elements=4;
theta=0:pi/180:2*pi;
n=1:no_elements;
n=transpose(n);
A=(n-1)*(i*2*pi*d*cos(theta)/l);
X=exp(-A);
w=ones(1,no_elements);
r=w*X;
polar(theta,abs(r),'r')
title ('Gain of a Uniform Linear Array')
```

###### MATLAB Plot

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.

#### Author: John (YA)

John has over 20 years of Research and Development experience in the field of Wireless Communications. He has worked for a number of companies around the world including Qualcomm Inc. USA.

Dear John your blog is very much useful for array signal processing.

Suppose we have a coprime array in which we take two subarrays i.e., M and N arrays where M and N are coprime numbers. In this the two sub-arrays are placed along a straight line such that the 1st element is reference. Then we take elements from M and N sub-arrays and make a single array. The distance of M elements from reference is Nd, 2Nd, 3Nd ,… and distance of N elements from reference is Md, 2Md, 3Md,….

Now the formulas for the last two rows of a steering matrix are given by:

x2ndlast=exp(-jpi(N-1)Mcos(u1))+exp(-jpi(N-1)Mcos(u2))+……+exp(-jpi(N-1)Mcos(last element of u))

xLast=exp(-jpi(M-1)Ncos(u1))+exp(-jpi(M-1)Ncos(u2))+……+exp(-jpi(M-1)Ncos(last element of u))

My question is: if I take a vector u in which I take my desired amplitudes and thetas e.g.

u=[A1 A2 A3 A4 theta1 theta2 theta3 theta4]

u=[1 3 5 7 50 130 150 170]

and put these values in the above formulas, how can I get a row vector x(x, M+N-1) that contains the values of all array?

Q. I have a problem regarding my code when I try to plot it in Polar I receive wrong plotting.

A. Please find the corrected code below.

how can i convert this code from uniform to non uniform linear array

If the non-uniform spacing is also a multiple of ‘d’ you can just change ‘n’ from being 1,2,3,4 to lets say 1,2,4,8 etc.

Today I was searching for the mathematical model of Circular Array. I found your stuff and it helped me a lot. I am also looking for the mathematical model of co-prime array with Matlab code. Can you help me in this regard? Waiting for your prompt response.

Regards,

i’d like to design linear array antenna according to tschepy chev with two sets of coefficients z&y what

Hi,

Great Article. Thank you so much for this. Please I wanted to ask how you were able to get the Half Power Beam width from your simulation (Code). I am trying to do that but I cannot seem to get it.

Thank you.

Hi,

Happy that you liked my post!

One way to calculate HPBW is to vary theta and calculate the array response for each value of theta. Measure how many degrees you need to increase to get from peak array response to 3dB down and double it. That will give you Half Power Beam Width.

PS: You might need to take 20*log10(r) and not 10*log10(r).

Hope this helps.

YA

OK I will give it away. Use the following piece of code after running the above code:

thank you

http://www.ju.edu.jo