Import MSI antenna file into a custom antenna element

조회 수: 5 (최근 30일)
jim wild
jim wild 2020년 6월 8일
댓글: jim wild 2021년 6월 19일
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')
  댓글 수: 3
Munawar Kermalli
Munawar Kermalli 2020년 8월 23일
having the same problem - did you ever get an answer for this?
jim wild
jim wild 2020년 10월 29일
no unfortunatly! did you ?

댓글을 달려면 로그인하십시오.

답변 (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