Why does the pattern() function draws the wrong 3D directivity pattern of my weighted antenna array ?

14 views (last 30 days)
I am simulating a 4-element phased array beamformer.
For this, I first define the geometry of the antenna element locations, which is a uniform rectangular arry (URA). Step2, I define two incident signals with distinct angles of arrival. Step3, I build the covariance matrix of the antenna array's seen signals. Step4, I compute the weights of the beamformed with 1 constraint. Then, I visualize the 3D directivity pattern of this weighted antenna array.
When using my own 3D vizualization script, I get the following result.
Above figure is the actually expected beamformer response (correct response) because at Step2 I had defined [ Azimut 0 Elevation 45 ] and [ Azimut 120 Elevation 45 ] for the incident signals, respectively.
The problem is that I fail to get the same shape with matlab's phased array toolbox as shown below.
Can someone explain to me why we don't get the correct 3D directivity shape ?
The above figure is not correct because there is no 120 degrees angular difference between the two blue nulls. (It happens as if these two nulls were the mirroring of one single null).
Thank you very much in advance !!
The above figure is generated by this script:
clear;
close all;
% constants
ant.fc = 1.575420e+09; % Hz center frequency
wavelength = 0.190293672798365; % m
ant.manual.rayon = 0.5; % scale factor, geometry
const.c = 3e8; % m/s
% Create the uniform rectangular array object matching the 'ant' object
Array = phased.URA('Size',[2 2],...
'Lattice','Rectangular','ArrayNormal','z');
% The multiplication factor for lambda units to meter conversion
Array.ElementSpacing = [0.5 0.5]*wavelength*ant.manual.rayon;
% Calculate Row taper
rwind = ones(1,2).';
% Calculate Column taper
cwind = ones(1,2).';
% Calculate taper
taper = rwind*cwind.';
Array.Taper = taper.';
% Create an isotropic antenna element
Elem = phased.IsotropicAntennaElement;
Elem.FrequencyRange = [0 ant.fc];
Array.Element = Elem;
format = 'polar';
plotType = 'Directivity';
% Step 1, define the geometry of the array
arrayPos = [...
-0.2500 0.2500 0.2500 -0.2500;...
-0.2500 -0.2500 0.2500 0.2500;...
0 0 0 0];
% Step 2, define the angle of arrival of incident signals
aOa = [ 0 120;...
45 45];
% Step 3: build the covariance matrix of said signals, seen by the
% antenna array
xcov = sensorcov(arrayPos,aOa,db2pow(-40)*eye(4));
% Step 4 :
% custom weights generation
constraintVector = [1; 0; 0; 0];
constraintRespnse = 1;
myweights = lcmvweights(constraintVector,constraintRespnse,xcov);
% Try to get the correct 3D directivity pattern
figure;
pattern(Array, ant.fc , 'PropagationSpeed', const.c,...
'CoordinateSystem', format,'weights', myweights,...
'ShowArray',true,'ShowLocalCoordinates',true,...
'ShowColorbar',true,'Orientation',[0;0;0],...
'Type', plotType);

Answers (1)

Aditya
Aditya on 13 Oct 2025 at 6:44
Hi Lola ,
It appears to me that there are some problems with the code.
I think following code should fix this issue.
clear;
close all;
% constants
ant.fc = 1.575420e+09; % Hz center frequency
wavelength = 0.190293672798365; % m
ant.manual.rayon = 0.5; % scale factor, geometry
const.c = 3e8; % m/s
% Create the uniform rectangular array object matching the 'ant' object
Array = phased.URA('Size',[2 2],...
'Lattice','Rectangular','ArrayNormal','z');
Array.ElementSpacing = [0.5 0.5]*wavelength*ant.manual.rayon;
% Calculate Row and Column taper
rwind = ones(1,2).';
cwind = ones(1,2).';
taper = rwind*cwind.';
Array.Taper = taper.';
% Create an isotropic antenna element
Elem = phased.IsotropicAntennaElement;
Elem.FrequencyRange = [0 ant.fc];
Array.Element = Elem;
format = 'polar';
plotType = 'Directivity';
% Step 1, define the geometry of the array
arrayPos = [...
-0.2500 0.2500 0.2500 -0.2500;...
-0.2500 -0.2500 0.2500 0.2500;...
0 0 0 0];
% Step 2, define the angle of arrival of incident signals
aOa = [ 0 120;...
45 45];
% Step 3: build the covariance matrix of said signals, seen by the antenna array
xcov = sensorcov(arrayPos, aOa, db2pow(-40)*eye(4));
% Step 4: Use steering vectors as constraints
% Main beam at [0; 45], null at [120; 45]
C = [steervec(arrayPos/wavelength, [0; 45]), steervec(arrayPos/wavelength, [120; 45])];
d = [1; 0];
myweights = lcmvweights(C, d, xcov);
% Try to get the correct 3D directivity pattern
figure;
pattern(Array, ant.fc , 'PropagationSpeed', const.c,...
'CoordinateSystem', format,'weights', myweights,...
'ShowArray',true,'ShowLocalCoordinates',true,...
'ShowColorbar',true,'Orientation',[0;0;0],...
'Type', plotType);

Products


Release

R2025a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!