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.

[thetacut,Emulti]=theta_cut(thmin,thstep,thmax,phi)
function [thetacut,Emulti]=theta_cut(thmin,thstep,thmax,phi)
% Cut in theta for single value of phi 
%
% Usage: [thetacut,Emulti]=theta_cut(thmin,thstep,thmax,phi)
%
% thmin......Minimum theta value (Deg)
% thstep.....Step size (Deg)
% thmax......Maximum theta value (Deg)
% phi........Phi value for pattern cut (Deg)
%
% Returned values :
%
% thetacut...theta 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)
%
% Theta 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;

thmin_rad=thmin*pi/180;
thmax_rad=thmax*pi/180;
thstep_rad=thstep*pi/180;

phi_rad=phi*pi/180;

index=0;
for th_rad=thmin_rad:thstep_rad:thmax_rad,
 index=index+1;
 Emultiple=fieldsum(range_config,th_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 vector
 Evp(index,1)=Emultiple(1,2);    % Add values to Evp to make vector
 Ehp(index,1)=Emultiple(1,3);    % Add values to Ehp to make vector
 Elhcp(index,1)=Emultiple(1,4);  % Add values to Elhcp to make vector
 Erhcp(index,1)=Emultiple(1,5);  % Add values to Erhcp to make 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

thetacut=(thmin:thstep:thmax)';                  % Output as a vector
Emulti=[Etot,Evp,Ehp,Elhcp,Erhcp,AR,Tau];        % Output as 7 vectors

Contact us