Strange result when using plotting antenna pattern with CustomAntennaElement

4 次查看(过去 30 天)
I have designed an antenna in CST MW studio and want to import the antenna element into Matlab. I am using CustomAntennaElement in the Phased Array toolbox to do this while following this guide. https://www.mathworks.com/help/phased/ug/antenna-array-analysis-with-custom-radiation-pattern.html
The output pattern that I get after importing it into Matlab is close to what I expect except for this weird result on the z-axis. There is some weird spike at the +/- z-axis while it should be a smooth transition. I have also attached a surf() figure of the output of pattern() function I used to plot the pattern of which I don't see anything wrong with.
Code I used
clear;
clc;
data = importdata('29ghz_3d_pattern36090.txt');
datas = data.data;
theta = datas(:,1); phi = datas(:,2); gain = datas(:,3);
theta = 0:360; phi = unique(phi);
fc = 29e9;
datascopy = datas;
patternphi_theta = [];
len = length(theta);
startind = 1;
endind = 360;
N = length(phi);
for i = 1:N
rowvect = gain(startind:endind);
rowvect = [rowvect; rowvect(1)];
patternphi_theta(i, :) = rowvect;
startind = startind +360;
endind = endind+360;
end
freqVector = [29 29.1].*1e9;
% change phi and theta around for MATLAB coordinates
antenna = phased.CustomAntennaElement('FrequencyVector',freqVector, ...
'PatternCoordinateSystem','phi-theta', 'PhiAngles',theta,...
'ThetaAngles', phi, 'MagnitudePattern',patternphi_theta,...
'PhasePattern',zeros(size(patternphi_theta)));
[pat az el] = pattern(antenna,fc,'CoordinateSystem','polar','Type','directivity');
surf(pat)
shading interp
figure
pattern(antenna,fc,'CoordinateSystem','polar','Type','directivity')
grid on

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Antennas, Microphones, and Sonar Transducers 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by