pattern data out of scanned phased antenna array, not just the plot

조회 수: 8 (최근 30일)
Mike
Mike 2014년 12월 12일
댓글: Mike 2014년 12월 17일
I've worked through a lot of examples, it is easy to create a plot for a phased-antenna array, one which is scanned to several angles using the plotResponse function. I'm sure it is easy to do what I want, just not for me.... which is get the numbers plotted on the plot. They are directivity referenced, etc. Values from a 3D plot would be helpful too.
In this example: "http://www.mathworks.com/help/phased/examples/antenna-array-analysis-with-custom-radiation-pattern.html" this command line is used to retrieve the actual numbers which represent the pattern:
"el_pat = abs(step(sArrayResponse,fmax,el_ang));"
The step function seems to be the answer to all problems of the world, but if I want to put my own weights to point the main beam in a particular direction, meaning in for ea element/s for the phases and possibly amplitude, I have not figured out how I can get just the pattern numbers (angle-magnitude) out afterwards. I would also like the values output for a 3D plot as well.
This code produces a pattern I want the actual numbers from:
frequency = 3e9
propagationSpeed = physconst('lightspeed')
h = phased.URA;
h.ElementSpacing = [0.0408163265306122 0.0408163265306122];
h.Size = [8 16];
h.Lattice = 'Rectangular';
% The element is just a cosine element
h.Element = ...
phased.CosineAntennaElement('CosinePower',[2 2]);
%Assign steering angles, frequencies and propagation speed
steeringAngle = [0;30]; %Steering angle
%Calculate Steering Weights
w = zeros(getNumElements(h), length(frequency));
elementVector = phased.SteeringVector('SensorArray',h, ...
'PropagationSpeed', 300000000,...
'IncludeElementResponse',true);%SV steering vector
%Find the weights and the strings for the legend
for idx = 1:length(frequency)
w(:, idx) = step(elementVector, frequency(idx), steeringAngle(:, idx));
end
figure;
plotResponse(h, frequency, propagationSpeed, 'Unit','dbi', ...
'Format', 'Line', 'RespCut', 'El', 'weights', w);

채택된 답변

Honglei Chen
Honglei Chen 2014년 12월 17일
What version of Phased Array System Toolbox do you have? If you are using R2014b, then you can use directivity method to retrieve the value, for example, to get the data you plot, you can do the following:
el = -90:90;
az = zeros(1,numel(el));
D = directivity(h,frequency,[az;el],'Weights',w);
You can verify it by plotting it as
plot(el,D)
and compare it to what you get from plotResponse
You can check the version of the toolbox using ver command. If you don't have R2014b, you may need to do some conversions. If you want, I can share a small script with you for this purpose. Alternatively, you can plot it and then retrieve value by obtaining the x and y data of the curve, e.g.
myCurve = plotResponse(h, frequency, propagationSpeed, 'Unit','dbi', ...
'Format', 'Line', 'RespCut', 'El', 'weights', w);
el = get(myCurve,'XData');
D = get(myCurve,'YData');
HTH
  댓글 수: 1
Mike
Mike 2014년 12월 17일
14b. Thank you for the prompt help and easily implemented answers.

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

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