MATLAB Answers

0

Getting the complex antenna response in the antenna library?

Asked by Yubei Xiong on 15 May 2019
Latest activity Commented on by Yubei Xiong on 27 May 2019
Is there a way of getting the complex antenna response (e-field magnitude as well as its phase) using the antenna library? This is possible with the phased library, by doing
aresp = phased.ArrayResponse('SensorArray',h);
resp = complex(zeros(181,361));
az = -180:1:180;
el = -90:1:90;
for m = 1:181
resp(m,:) = aresp(fc,[az;el(m)*ones(1,361)]);
end
And I can then obtain the phase of the radiated field. Is there something that allows me to do the same thing in the antenna library?
Thanks.

  0 Comments

Sign in to comment.

1 Answer

Honglei Chen 님의 답변 16 May 2019

Is this what you mean?
Or alternatively, if you want it to be in far field with input as an angle, you can always do
aresp = phased.ArrayResponse('SensorArray',phased.ConformalArray('Element',elem));
resp = complex(zeros(181,361));
az = -180:1:180;
el = -90:1:90;
for m = 1:181
resp(m,:) = aresp(fc,[az;el(m)*ones(1,361)]);
end
where elem is the element.
HTH

  3 Comments

Thanks for the reference! I think this could help but in fact i am trying to get the antenna field repsonse, which is something that could be generated by this:
pattern(antenna,fc,'Type','efield');
but it only gives the magnitude of the field whereas I need both of its magnitude and its phase. Would you know how I could get the field phase and generate its pattern?
Currently, I am trying to do this by the ehfields which you have suggested, but the result does not match the magnitude pattern generated by the pattern call. It would be appreciated if someone could give me some directions / correct me if I did something wrong here.
% generate pattern corresponding to a desired AZEL mesh
AZ = -180:10:180; % length N
EL = -90:5:90; % length M
[AZ_,EL_] = meshgrid(deg2rad(AZ),deg2rad(EL));
[X,Y,Z] = sph2cart(AZ_,EL_,1);
p = [X(:)';Y(:)';Z(:)'];
[e,h] = EHfields(antenna,fc,p);
% combine XYZ fields
efield = zeros(1,size(e,2));
for j = 1:size(e,2)
efield(j) = sum(e(:,j)) ;
end
% convert data to N by M matrix
efieldGrid = vec2mat(efield,length(EL));
% plot custom pattern
phi = AZ';
theta = 90-EL;
figure(1)
subplot(1,2,1)
patternCustom(abs(efieldGrid),theta,phi,...
'CoordinateSystem','polar');
title('Efield Magnitude Pattern');
subplot(1,2,2)
patternCustom(angle(efieldGrid),theta,phi,...
'CoordinateSystem','polar');
title('Efield Phase Pattern');
I got this for a dipole antenna, which is clearly incorrect.
Thanks
Have you tried my alternative code? That should give you both magnitude and phase. Does that help?
The code you gave was based on the phased library. My question is to ask how I could do the same thing in the antenna library.

Sign in to comment.