Why am I receiving an error in conformalArray function while passing ElementSpacing as a parameter?

1 次查看(过去 30 天)
I am designing an Antenna Array and displaying the radiation charectoristics using functions like pcbstack and conformalArray but I am recieving error in the conformalArray function while passing ElementSpacing as a parameter. I am trying multiple ways to run the code but the code is still not ruuning. Can anyone please help me in resolving the issues in my code which will help me to run the code as I need the corrected program on an urgent basis. Thank You!
% Defining the parameters
f = 1.8e9; % Frequency (Hz)
lambda = physconst('LightSpeed') / f; % Wavelength (m)
d = lambda / 2; % Element spacing (m)
N = 4; % Number of elements
% Defining the substrate material properties
er = 4.4; % Relative permittivity
h = 1.6e-3; % Substrate thickness (m)
substrate = dielectric('Name', 'FR4', 'EpsilonR', er, 'Thickness', h);
% Creating the patch antenna element
patch = patchMicrostrip('Length', 0.5*lambda, 'Width', 0.25*lambda, 'GroundPlaneLength', 1.5*lambda, 'GroundPlaneWidth', 1.5*lambda, 'Substrate', substrate);
% Creating the antenna array
array = conformalArray('Element', patch, 'ElementSpacing', d, 'NumElements', N);
% Defining the radiation pattern measurement angles
azimuth = linspace(-180, 180, 361);
elevation = linspace(-90, 90, 181);
% Computing the radiation pattern
Pattern = pattern(array, f, azimuth, elevation);
% Plotting the 3D radiation pattern
Figure;
patternCustom(pattern, 'CoordinateSystem', 'rectangular', 'Type', 'powerdb');
title('3D Radiation Pattern');
xlabel('Azimuth (degrees)');
ylabel('Elevation (degrees)');
zlabel('Power (degrees)');
% Plotting the 2D radiation pattern in the azimuth plane
Figure;
patternAzimuth(pattern, 0, 'CoordinateSystem', 'rectangular', 'Type', 'powerdb');
title('Azimuth Plane Radiation Pattern');
xlabel('Angke (degree)');
ylabel('Elevation');

回答(1 个)

Pranavkumar Mallela
编辑:Pranavkumar Mallela 2023-7-27
Hi,
As per my understanding, you are trying to use 'ElementSpacing' attribute when using the 'conformalArray' function.
The 'conformalArray' constructor does not accept the parameter 'ElementSpacing', and hence you are getting the error, "'ElementSpacing' is not a recognized parameter". In addition, 'NumElements' is also not a accepted parameter.
'conformalArray' accepts the parameter 'ElementPosition' which is specified as an M-by-3 real matrix. M is the number of element positions. By default, M is 2.
Please find the modified part of the code below:
% Creating the antenna array
array = conformalArray('Element', patch, 'ElementPosition', [0 0 d; 0 0 2*d; 0 0 3*d; 0 0 4*d]); % stacks 4 elements with a gap of 'd'
For more information about the 'conformaArray' function, please refer to this documentation: https://www.mathworks.com/help/antenna/ref/conformalarray.html#bvcl4zp-1
Thanks! Hope this helps!

类别

Help CenterFile Exchange 中查找有关 Get Started with Antenna Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by