www.gusucode.com > phased 案例源码 matlab代码程序 > phased/UniformCircularArrayExample.m

    %% Uniform Circular Array Created from Conformal Array
% This example shows how to construct a 60-element uniform circular array.
% In constructing a uniform circular array, you can use either the
% <docid:phased_ref.bunrdbe-1> or the <docid:phased_ref.bso2dsw> System
% object(TM). The conformal array approach is more general because it
% allows you to point the array elements in arbitrary directions. A UCA
% restricts the array element directions to lie in the plane of the array. This
% example illustrates how you can use the <docid:phased_ref.bso2dsw> System
% object(TM) to create any other array shape. Assume an operating frequency
% of 400 MHz. Tune the array by specifying the arclength between the
% elements to be 0.5&lambda; where &lambda; is the wavelength corresponding
% to the operating frequency. Array elements lie in the _x-y_-plane.
% Element normal directions are set to $(\phi_{n},0)$ where $\phi_{n}$ is
% the azimuth angle of the $n^{th}$ array element.
%%
% Set the number of elements and the operating frequency of the array.
N = 60;
fc = 400e6;
%%
% Compute the element spacing in radians.
theta = 360/N;
thetarad = deg2rad(theta);
%%
% Choose the radius so that the inter-element arclength is one-half wavelength.
arclength = 0.5*(physconst('LightSpeed')/fc);
radius = arclength/thetarad;

%%
% Compute the element azimuth angles. Azimuth angles must lie in the range
% _(-180&deg;,180&deg;)_.
ang = (0:N-1)*theta;
ang(ang >= 180.0) = ang(ang >= 180.0) - 360.0;
array = phased.ConformalArray;
array.ElementPosition = [radius*cosd(ang);...
    radius*sind(ang);...
    zeros(1,N)];
array.ElementNormal = [ang;zeros(1,N)];
%%
% Show the UCA array geometry.
viewArray(array)
%%
% Plot the array response pattern at 1 GHz.
pattern(array,1e9,[-180:180],0,'PropagationSpeed',physconst('LightSpeed'),...
    'CoordinateSystem','polar','Type','powerdb','Normalize',true)