Antenna Radiation - 8x1 Array : Beam Steering

This code is a script designed for visualizing the beam steering characteristics of an 8x1 antenna array through graphical representations. The script demonstrates how the directional radiation pattern of the antenna array changes when the steering angle is varied.

This MATLAB script visualizes the steering capabilities of an 8x1 phased array antenna by showing how the main beam can be directed across different angles by adjusting the steering angle. Through linear and polar plots, both in absolute and decibel scales, the script provides comprehensive insights into the array's directional radiation pattern, useful for understanding and designing phased array system

  • Parameter Definitions: The script sets up the angular range (theta) for which the beam pattern will be evaluated, spanning from -π/2 to π/2 in steps of π/100. It defines a phase shift (phaseShift) applied between the elements of the array, although it's defined but not used in the subsequent calculations. Variables such as pn, p, and d are specified for further control over the pattern, with p likely relating to phase adjustment and d being the element spacing factor. The steering angle (sta) is determined based on the variable sn, allowing for dynamic control over the beam's direction.
  • Array Factor Calculation: Constructs the array factor (a_theta) for each element of the array based on the element spacing d, the observed angle theta, and incorporates steering through multiplication with a steering vector stv. This results in the phased array effect, steering the beam to a specified direction. The array factor is calculated for each element and then combined to form the overall array factor.
  • Normalization and Conversion: The absolute value of the summed array factor is normalized and converted into decibels (dB). A threshold of -30dB is applied to limit the minimum value of the pattern, improving visualization clarity by focusing on the main lobe and significant side lobes.
  • Plotting: The script generates several plots to visualize the beam pattern:
    • A plot of the normalized absolute array factor versus theta, providing a direct view of the beam's shape in linear scale.
    • A polar plot of the same data, offering an angular representation of the beam pattern.
    • A plot of the array factor in decibels, highlighting the beam's dynamic range and sidelobe levels.
    • A polar plot in decibels, combining the advantages of decibel representation with angular visualization.



Followings are the code that I wrote in Octave to creates all the plots shown in this page. You may copy these code and play with these codes. Change variables and try yourself until you get your own intuitive understanding.


< Code 1 >


theta = -1.0*pi/2:pi/100:1.0*pi/2;

phaseShift = exp(-j*2*pi/8);


pn = 20;

p = pn*pi/20;

d = 2.0;

sn = 40;

sta = -sn*pi/40; %Steering Angle


a_theta = [exp(-j .* 0 .* d .* sin(theta)) ;

           exp(-j .* 1 .* d .* sin(theta));

           exp(-j .* 2 .* d .* sin(theta));

           exp(-j .* 3 .* d .* sin(theta));

           exp(-j .* 4 .* d .* sin(theta));

           exp(-j .* 5 .* d .* sin(theta));

           exp(-j .* 6 .* d .* sin(theta));

           exp(-j .* 7 .* d .* sin(theta))];

stv = [-exp(j * 0 * sta);

       -exp(j * 1 * sta);

       -exp(j * 2 * sta);

       -exp(j * 3 * sta);

       -exp(j * 4 * sta);

       -exp(j * 5 * sta);

       -exp(j * 6 * sta);

       -exp(j * 7 * sta)];       



a_theta =  stv .* a_theta;          

a_theta_sum = sum(a_theta);

%s_theta_sum = sum(s_theta);

a_theta_sum_abs = abs(a_theta_sum);

a_theta_sum_abs = a_theta_sum_abs ./ max(a_theta_sum_abs);

a_theta_sum_abs_dB = 10 .* log(a_theta_sum_abs);


for i = 1:length(a_theta_sum_abs_dB)

    if a_theta_sum_abs_dB(i) <= -30

        a_theta_sum_abs_dB(i) = -30;






a_theta_sum_abs_dB = a_theta_sum_abs_dB - min(a_theta_sum_abs_dB);

if max(a_theta_sum_abs_dB) != 0

   a_theta_sum_abs_dB = a_theta_sum_abs_dB/max(a_theta_sum_abs_dB);



hFig = figure(1,'Position',[300 300 700 600]);


subplot(2,5,[1 2]);


xlim([-pi/2 pi/2]);

ylim([0 1]);

tStr = sprintf("d = %0.2f, steering angle  = %d pi/40",d,sn);



set(gca,'xtick',[-pi -(3/4)*pi  -pi/2 -pi/4 0 pi/4 pi/2 (3/4)*pi pi]);

set(gca,'xticklabel',{'-pi','-3pi/4','-pi/2' '-pi/4' '0' 'pi/4' 'pi/2','-3pi/4','pi'});


subplot(2,5,[4 5]);


t = findall(gcf,'type','text');




subplot(2,5,[6 7]);plot(theta,10 .* log(a_theta_sum_abs));ylim([-30 1]);

xlim([-pi/2 pi/2]);

tStr = sprintf("d = %0.2f, steering angle  = %d pi/40",d,sn);



set(gca,'xtick',[-pi -(3/4)*pi  -pi/2 -pi/4 0 pi/4 pi/2 (3/4)*pi pi]);

set(gca,'xticklabel',{'-pi','-3pi/4','-pi/2' '-pi/4' '0' 'pi/4' 'pi/2','-3pi/4','pi'});


subplot(2,5,[9 10]);



t = findall(gcf,'type','text');