Code covered by the BSD License  

Highlights from
Phased Array Design Toolbox v2.4.2

image thumbnail

Phased Array Design Toolbox v2.4.2

by

 

10 Feb 2009 (Updated )

A toolbox allowing rapid definition and evaluation of 2D and 3D phased array antennas.

[phicut,Emulti]=phi_cut(phimin,phistep,phimax,theta)
function [phicut,Emulti]=phi_cut(phimin,phistep,phimax,theta)
% Cut in phi for single value of theta 
%
% Usage: [phicut,Emulti]=phi_cut(phimin,phistep,phimax,theta)
%
% phimin......Minimum phi value (Deg)
% phistep.....Step size (Deg)
% phimax......Maximum phi value (Deg)
% theta.......Theta value for pattern cut (Deg)
%
% Returned values :
%
% phicut..phi values (Deg)
%         
% Emulti..[Etot,Evp,Ehp,Elhcp,Erhcp,AR,Tau] where :
%         
%         Etot  =  Total E-field
%         Evp   =  Vertical E-field component (Z-axis in global coords)
%         Ehp   =  Horizontal E-field component (X-Y plane in global coords)
%         Elhcp =  Left Hand Circular Polarisation
%         Erhcp =  Right Hand Circular Polarisation
%         AR    =  Axial ratio (Linear)
%         Tau   =  Tilt angle of polarisation ellipse (radians)
%
% Phi and components of Emulti (Etot,Evp...etc) are of the 
% form variable[npoints,1] 
%         
%         
%         z
%         |-theta   (theta 0-180 measured from z-axis)
%         |/
%         |_____ y
%        /\
%       /-phi       (phi 0-360 measured from x-axis)
%      x    
%

global array_config;
global freq_config;
global range_config;

phimin_rad=phimin*pi/180;
phimax_rad=phimax*pi/180;
phistep_rad=phistep*pi/180;

theta_rad=theta*pi/180;

index=0;
for phi_rad=phimin_rad:phistep_rad:phimax_rad,
 index=index+1;
 Emultiple=fieldsum(range_config,theta_rad,phi_rad);

 for param=1:7
   if Emultiple(1,param)==0
    Emultiple(1,param)=1e-9;         % Stops plotting of nulls, log 0 error
   end
 end
 
 Etot(index,1)=Emultiple(1,1); % Add values to Etot to make a vector
 Evp(index,1)=Emultiple(1,2);  % Add values to Evp to make a vector
 Ehp(index,1)=Emultiple(1,3);  % Add values to Ehp to make a vector
 Elhcp(index,1)=Emultiple(1,4);  % Add values to Elhcp to make a vector
 Erhcp(index,1)=Emultiple(1,5);  % Add values to Erhcp to make a vector
 AR(index,1)=Emultiple(1,6);  % Add values to AR to make a vector
 Tau(index,1)=Emultiple(1,7);  % Add values to Tau to make a vector
end

phicut=(phimin:phistep:phimax)';                 % Output as a vector
Emulti=[Etot,Evp,Ehp,Elhcp,Erhcp,AR,Tau];        % Output as 7 vectors
 

Contact us