Import MSI antenna file into a custom antenna element

2 次查看(过去 30 天)
Hello i've downloaded a correct MSI radiation pattern file. I've imported it using MSI read, i'm able to visualize to azimuth and elevation cut patterns.
i want to use its radiation pattern and create a custom antenna element using phased.CustomAntennaElement
the issue is when i try using phased.CustomAntennaElement arguments 'HorizontalMagnitudePattern', and 'VerticalMagnitudePattern' i get a size error since the vertical and horizontal magnitute patterns ive imported from the msi files have 360x1 size instead the arguments of the custom antenna expects 181x361?
"
Error using phased.internal.AbstractElement (line 25)
Expected HorizontalMagnitudePattern to be of size 181x361, but it is of size 360x1.
"
here is my code
clear;clc;
azang = [-180:180];
elang = [-90:90];
[Horizontal,Vertical,Optional] = msiread('Kathrein\80010652_2655_x_co_p45_08t_rs.msi');
phasepattern = zeros(361);
antena = phased.CustomAntennaElement('AzimuthAngles',azang, ...
'ElevationAngles',elang,'SpecifyPolarizationPattern',true,...
'HorizontalMagnitudePattern', Horizontal.Magnitude, ...
'VerticalMagnitudePattern',Vertical.Magnitude,'PhasePattern',phasepattern);
pattern(antena,2.655e9,[-180:180],[-180:180],'CoordinateSystem',...
'Polar','Type','powerdb')

回答(1 个)

Joshua Jones
Joshua Jones 2021-6-17
编辑:Joshua Jones 2021-6-17
Here's what I did. You have to match the # of angles with the # of magnitude points. *Edit: This isn't right, it's mapping the values starting at 0:360 for the MSI import to either -180:180 or -90:90. I'll keep tinkering and will update the code when I figure it out. Sorry
clear all;
close all;
clc
%Import MSI data
[Horizontal,Vertical,Optional] = msiread('KRE1012249_1_P+45_1990_PWR_08T.msi');
%% Define Variables
fc = Optional.frequency;
el_ang = -90:90;
el_mag = Vertical.Magnitude;
el_mag = [el_mag; el_mag(1)]; %repeat first value
az_ang = -180:180;
az_mag = Horizontal.Magnitude;
az_mag = [az_mag; az_mag(1)]; %repeat first value
%% Create Phase pattern
az_phase = zeros(181,361);
el_phase = zeros(181,361);
%% Transpose and Convert Magnitude Patterns
az_mag_matrix = repmat(az_mag', 181, 1);
el_mag_matrix = repmat(el_mag', 181, 1);
%% Build Custom Antenna from MSI data
antenna = phased.CustomAntennaElement(...
'AzimuthAngles', az_ang, ...
'ElevationAngles', el_ang, ...
'SpecifyPolarizationPattern', true, ...
'HorizontalMagnitudePattern', az_mag_matrix, ...
'VerticalMagnitudePattern', el_mag_matrix, ...
'HorizontalPhasePattern', az_phase, ...
'VerticalPhasePattern', el_phase);
%% Plots for confirmation
% figure
% subplot(1,2,1)
% Pel = polarpattern(Vertical.Elevation, Vertical.Magnitude);
% subplot(1,2,2)
% Paz = polarpattern(Horizontal.Azimuth, Horizontal.Magnitude);
%
% subplot(1,3,3)
figure
pattern(antenna, fc, ...
'CoordinateSystem', 'polar', ...
'Type', 'powerdb')
  2 个评论
Adam Danz
Adam Danz 2021-6-17
Welcome to the forum. Please edit your answer and use the code/text toggle in rich text editor to format your code.
jim wild
jim wild 2021-6-19
Hi joshua thanks for your reply i tried your code ut gave me some ideas ill try them later
altough the topic is old im still very interested in this case
thanks BR

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Array Geometries and Analysis 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by