Import MSI antenna file into a custom antenna element
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (1)
Joshua Jones
am 17 Jun. 2021
Bearbeitet: Joshua Jones
am 17 Jun. 2021
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 Kommentare
Adam Danz
am 17 Jun. 2021
Welcome to the forum. Please edit your answer and use the code/text toggle in rich text editor to format your code.
Siehe auch
Kategorien
Mehr zu Array Geometries and Analysis finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!