3D pattern rotation

조회 수: 3 (최근 30일)
John Adams
John Adams 2023년 2월 4일
댓글: Yash Srivastava 2023년 3월 20일
Hello,
I have an exported radiation pattern with the following form: a T1 matrix [Nx3], where:
1st column Amplitude;
2nd column Theta (from -180 to 180);
3rd column Phi (from -90 to 90);
By using the following code:
figure();
patternCustom(T1(:,1),T1(:,2),T1(:,3));
I get the correct radiation pattern, which is the following:
My problems are the following:
1) When I use another way to plot the pattern, I get something which is deformed (not talking about the rotation, but the shape itself)
This is how I try to plot the second one:
th_a = 360/stepsize;
phi_a = 180/stepsize;
T2= zeros(phi_a+1,th_a+1);
for n=1:phi_a+1
for i=1:th_a
T2(n,i) = T1(i+((n-1)*th_a),1);
end
end
theta = 0:stepsize:180;
phi = 0:stepsize:360;
freqVector = [30 30.00005].*1e9; % Frequency range for element pattern
antenna = phased.CustomAntennaElement('FrequencyVector',freqVector, ...
'PatternCoordinateSystem','phi-theta',...
'PhiAngles',phi,...
'ThetaAngles',theta,...
'MagnitudePattern',T2,...
'PhasePattern',zeros(size(T2)));
fmax = freqVector(end);
figure();
pattern(antenna,fmax,'Type','powerdb')
I think it's related to the fact that in the second way, phi is required from 0:360 and theta from 0:180, while from the exported way, I have phi from -90:90 and theta from -180:180.
How can I solve this issue? Of course, this is not the main problem, considering the fact I can use the first representation. The main problem, which I think it's quite related, is that this happens also when I try to use the rotpat function.
2) If I use the rotpat function, I get something deformed as well.
el = -90:stepsize:90;
az = -180:stepsize:180;
newax=roty(90);
pat = rotpat(T2,az,el,newax);
for n=1:phi_a+1
for i=1:th_a
T3(i+((n-1)*th_a),1) = pat(n,i);
end
end
figure();
patternCustom(T3(:,1),T1(:,2),T1(:,3));
How can I solve this issue? Of course, my main goal would be to rotate the radiation pattern.
Many thanks in advance.
  댓글 수: 1
Yash Srivastava
Yash Srivastava 2023년 3월 20일
Hi John,
To have better understanding of your question, please provide T1 data.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Benchmarking and Verification에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by