Animation

Beamforming by Phased Array Antennas

In this second video of the series on beamforming, we show the time domain wave propagation for two phased array antennas at different phase differences. Thanks to the constructive and destructive interferences, the main beam of the wave is steered towards angle of interest.

See also previous animation where the effect of different antenna array separation on the beamforming patterns:

The formulation for the beamforming was taken from Ulaby’s Fundamentals of Applied Electromagnetics and the code can be found below:


clear all; clc;
set(0,'defaultFigureColor',[1 1 1]) 

%% Simulation parameters
freq = 1e9; % Hz
c = 3e8; % free space speed
lambda = c/freq;
T = 1/freq;
omega = 2*pi*freq;
k = 2*pi/lambda;

Ns = 30; % Number of samples per wavelength
ds = lambda/Ns; % Spatial Discretization 

Nt = 35; % Number of time samples per period
dt = T/Nt; % Temporal discretization
t = 0:dt:(T); % Duration of simulation: Default is single period
 % Increase the number of periods here for longer simulations

R = (0*lambda):ds:(8*lambda); % Spatial extent
Ntheta = 240; % Number of angular discretization
dtheta = 2*pi/Ntheta;

theta = 0:dtheta:(2*pi); % Angular extent

deltaAll=0:dtheta:2*pi; % Optional phase shift to be applied to each antenna

%% Generate Domain
x=R.'*cos(theta);
y=R.'*sin(theta);

teal = [ 0 0.5 0.5]; % maps for unconventional coloring
origBrownColor=[114/256 70/256 43/256];

%% Animate
for ps=1:length(deltaAll) % Sweep through angles
% for ps=1:1 % Sweep through angles

 delta=deltaAll(ps);

% for it=1:length(t) % Sweep through time
 for it=1:1 % Sweep through time

 % --- Antenna array with separation of d=lambda/2 & 7 antennas ----
 d = lambda/2;
 r1y=0; r1x=-3*d;
 r2y=0; r2x=-2*d;
 r3y=0; r3x=-d;
 r4y=0; r4x=0;
 r5y=0; r5x=d;
 r6y=0; r6x=2*d;
 r7y=0; r7x=3*d;

 % Calculate the electric field of each individual antenna
 for ix=1:length(R)
 for iy=1:length(theta)
 R1=sqrt( (x(ix,iy)-r1x)^2 + (y(ix,iy)-r1y)^2 );
 E1(ix,iy) = cos(omega * t(it) - k*R1 + delta*-3) ;

 R2=sqrt( (x(ix,iy)-r2x)^2 + (y(ix,iy)-r2y)^2 );
 E2(ix,iy) = cos(omega * t(it) - k*R2 + delta*-2) ;

 R3=sqrt( (x(ix,iy)-r3x)^2 + (y(ix,iy)-r3y)^2 );
 E3(ix,iy) = cos(omega * t(it) - k*R3 + delta*-1) ;

 R4=sqrt( (x(ix,iy)-r4x)^2 + (y(ix,iy)-r4y)^2 );
 E4(ix,iy) = cos(omega * t(it) - k*R4 + delta*0) ;

 R5=sqrt( (x(ix,iy)-r5x)^2 + (y(ix,iy)-r5y)^2 );
 E5(ix,iy) = cos(omega * t(it) - k*R5 + delta*1) ;

 R6=sqrt( (x(ix,iy)-r6x)^2 + (y(ix,iy)-r6y)^2 );
 E6(ix,iy) = cos(omega * t(it) - k*R6 + delta*2) ;

 R7=sqrt( (x(ix,iy)-r7x)^2 + (y(ix,iy)-r7y)^2 );
 E7(ix,iy) = cos(omega * t(it) - k*R7 + delta*3) ;
 end
 end

 E=E1+E2+E3+E4+E5+E6+E7; % Total Electric Field
 % -----------------------------------------------------------------

 f1=figure (1); clf; set(gcf,'Color',[1 1 1]); Fs=10;
 d = lambda/2;
 A = [1 1 1 1 1 1 1]; % (Relative) Amplitude of each array antenna
 Fa=zeros(1,length(theta));
 for i=0:(7-1)
 temp = (A(i+1) * exp(-1i*i*delta + 1i*k*(i*d-3*d)*cos(theta)));
 Fa = Fa + temp;
 end
 % Fa=abs(Fa).^2;
 Fa=abs(Fa);
 kk=polar(theta,-Fa/max(Fa)); hold on; axis off

 % Remove ticks for visualization
 set(findall(gca,'String','210'),'String',' ')
 set(findall(gca,'String','240'),'String',' ')
 set(findall(gca,'String','270'),'String',' ')
 set(findall(gca,'String','300'),'String',' ')
 set(findall(gca,'String','330'),'String',' ')
 set(findall(gca,'String','180'),'String',' ')
 set(findall(gca,'String','150'),'String',' ')
 set(findall(gca,'String','120'),'String',' ')
 set(findall(gca,'String','90'),'String',' ')
 set(findall(gca,'String','60'),'String',' ')
 set(findall(gca,'String','30'),'String',' ')
 set(findall(gca,'String','0'),'String',' ')

 %%
 pcolor(x/max(max(x)),y/max(max(y)),E); shading interp;
 pbaspect([1 1 1]); %axis off;
 ylim([0 1])

 kk=polar(theta,-Fa/max(Fa),'k'); set(kk,'LineWidth',2); hold on;
 xlabel(['Antenna separation: d=\lambda/2'],'FontSize',Fs+2,'FontName','Century Gothic')
 text(-0.85,1.15,['{\bf Relative phase difference: \delta=' ...
 num2str(floor(delta/pi*180)) '^o}'],'FontSize',Fs+2,...
 'Color',teal,'FontName','Century Gothic')

 % Array locations (For visualization)
 yoffset=0.04;
 xloc=-0.02; yloc=0.067; %(For smaller one)
 text(xloc,yloc-yoffset,1,'.','FontSize',Fs+12)
 text(d/max(max(x))+xloc,yloc-yoffset,1,'.','FontSize',Fs+12)
 text(2*d/max(max(x))+xloc,yloc-yoffset,1,'.','FontSize',Fs+12)
 text(3*d/max(max(x))+xloc,yloc-yoffset,1,'.','FontSize',Fs+12)
 text(-d/max(max(x))+xloc,yloc-yoffset,1,'.','FontSize',Fs+12)
 text(-2*d/max(max(x))+xloc,yloc-yoffset,1,'.','FontSize',Fs+12)
 text(-3*d/max(max(x))+xloc,yloc-yoffset,1,'.','FontSize',Fs+12)

 set(gcf,'Renderer','Zbuffer')

 pause(0.1);
 end
end

 

Also the link to the same code can be found at Matlab Central.

Antenas en fase, Antenne réseau à commande de phase, フェーズドアレイレーダー, Фазированная антенная решётка, Фазована антенна решітка, 相位陣列, Szyki fazowane, Fázisvezérelt antennarács, מערך מופע, آرایه فازی

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s