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

    %% Create Grating Lobe Diagram for ULA With Different Phase-Shifter Frequency
% Plot the grating lobe diagram for a 4-element uniform
% linear array having element spacing greater than one-half
% wavelength. Apply a phase-shifter frequency that differs from
% the signal frequency. Grating lobes are
% plotted in u-v coordinates.
% 
% Assume the signal frequency is 3 GHz and the
% spacing between elements is 0.65 $\lambda$. All elements are
% isotropic antenna elements. The phase-shifter frequency is set to
% 3.5 GHz. Steer the array in the direction $45^{\circ}$
% azimuth, $0^{\circ}$ elevation.

% Copyright 2015 The MathWorks, Inc.

c = physconst('LightSpeed');
f = 3e9;
f0 = 3.5e9;
lambda = c/f;
sIso = phased.IsotropicAntennaElement;
sULA = phased.ULA('Element',sIso,'NumElements',4,...
    'ElementSpacing',0.65*lambda );
plotGratingLobeDiagram(sULA,f,[45;0],c,f0);

%%
% As a result of adding the shifted frequency, the mainlobe
% shifts right towards larger $u$ values. The beam no 
% longer points toward the actual source arrival angle.
%
% The mainlobe of the array is indicated by a filled black
% circle. The grating lobes in the visible and nonvisible regions are
% indicated by empty black circles. The visible region, marked by the two
% black vertical lines, corresponds to arrival
% angles between $\mbox{-90}^{\circ}$ and $\mbox{90}^{\circ}$. The
% visible region is defined by the direction
% cosine limits $-1 \le u \le 1$. Because the array spacing is greater than
% one-half wavelength, there is now a grating
% lobe in the visible region of space. There are an infinite
% number of grating lobes in the nonvisible regions, but only those
% for which $-3 \le u \le 3$ are shown.
%
% The grating-lobe free region, shown in green, is the range of
% directions of the main lobe for which there are no grating
% lobes in the visible region. In this case, it lies inside 
% the visible region.