This repository contains MATLAB codes that demonstrate different applications of a Uniform Linear Array (ULA), including beam steering to a desired direction and null steering.
i will divide the discussion into two parts :
- we have access to all phases (we can apply continuous phase shift to our phase shifters that are located before the antenna) in this part we will see four codes :
1.1 the simplest case with no progressive phase shift
1.2 applying a progreesive phase shift to change beam steering direction
1.3 this code accepts an angle (degree) and beemsteers to that angle (points a maxima to that direction)
1.4 this code accepts an angle (degree) and null steers to that angle (points a null to that direction)
- in second part we assume controlling phase shifters digital with 4 bits so we have access to 16 phases for each antenna and also the phase shifter in reality can not be exactly the same so we will also consider this issue (two phase shifters will not produce the same phase shift by applying the same voltage )
First, let’s understand the concept behind ULA. Suppose that you have multiple isotropic antenna (an antenna whose power is distributed equally in all directions). If you arrange this antennas in a line and feed them with sinusoids that have no phase shift relative to each other, the power distribution in different directions changes. In other words, the array now focuses the power in a particular direction (which is 90 degree in this example without any progressive phase shift)
like what you see in below image, when we use this antennas together, the power won't be equally distributed anymore :
In this project, our approach is to start with a simple code and gradually increase the complexity to demonstrate more advanced scenarios while investigating the physics behind the codes.
our assumptions for this codes include :
1. no coupling between antennas
2. isotropic antennas
3. d = λ / 2 (distance between two adjacent antennas and is the wave λ length)
4. far field assumption (we are distant away from the ULA)
now take a look at this image to better visulize the concept :
so there is a π cos(θ) difference between two adjacent antennas . now take the first antenna as reference so there is π cos(θ) difference between the the second antenna and reference , 2π cos(θ) with third and reference and so on. we will add up this differences and find the total addition formula in a desired direction . so we can write the array factor formula as :you can check both formats (exponential and sinusoidal) in this codes :
exponential form
sinusoidal form
in the first code the addition of exponentials is used to make the array factor :
u=pi*cos(teta);
for n= 0:N-1
AF=AF + exp(1j*u*n);
end
and in second code AF is made by the fraction of two sinusoids :
u=(2*pi*d/lambda)*cos(teta);
AF = sin(N/2*u)./sin(u/2);
the only difference in coding is the addition of one pps (progressive phase shift to formulas ) the calculations are as below :
so we just need to add a progressive phase shift to the previous code :pps = input('desired progressive phase shift: ');
u=pi*cos(teta)+pps;
for n= 0:N-1
AF=AF + exp(1j*u*n);
end
check codes here :
exponential form
sinusoidal form
if we want to beamsteer to a location it means that we want to focus our power to that point. to achive this goal we will use this calculations :
phi = input('desired angle for maxima : '); %desired direction for maxima
pps = -pi*cosd(phi); %calculation of progressive phase shift
as an example i have beemsteered to three angles (60,75,120):
you can check the code here
below image shows the concept behind the code :
which is demonstrated in this lines of the code :nullphi = input('desired angle for nulling : ');
pps = 2*pi/N-pi*cosd(nullphi);
an examples is provided :(null steering to 40 degree)
you can check the code here
now we assume that we dont have access to all phases for a phase shifter. we are controlling the phases using 4 control bits that leads to 16 phases . so we can expect some error.
what i will do is that i will perform an exhaustive search which means that i will check all possible cases and make a look up table of all directions . in this part i assume that N = 4 and there are four antennas.
an exhaustive search is done from 0 t0 180 with 0.1 degree steps and the final result for each phase is provided in an excel file .
for a=1:16
for b=1:16
for c=1:16
for d=1:16
y=abs(amp1(a)*exp(1j*Pshifter1(a))+amp2(b)*exp(1j*(x) ...
+1j*Pshifter2(b))+amp3(c)*exp(2j*(x)+1j*Pshifter3(c))+amp4(d)*exp(3j*(x)+1j*Pshifter4(d)));
if(y<res)
res=y;
a1=a;
b1=b;
c1=c;
d1=d;
end
end
end
end
end
check the code here and you can check the excel file in images folder.