Directivity calculation in Matlab for circular array-suggestions?
Directivity calculation in Matlab for circular array-suggestions?
(OP)
Hi everyone,
Could someone help me out in calculating the Directivity of my circular array. I'm using Matlab and I'm pretty certain my method is not correct (explained a little below).
Very Briefly, this is how I generate the Array factor:
a1=-50;b1=50;c1=.2;
[fx,fy]=meshgrid(a1:c1:b1,a1:c1:b1);
t=linspace(0,2*pi,250)
And inside a loop:
for k=1:length(t)
x=cos((t)+offset); y=sin((t)+offset);
ArrF=exp(-i*2*pi*(fx*(rad(j)*x(k))+fy*(rad(j)*y(k))));
plot(rad(j)*x(k),rad(j)*y(k),'.b');
AF1=AF1+ArrF;
And I plot it with:
dbaf=20*log10(abs(AF1));
mesh(fx,fy,dbaf);
And this is how the Array and the Array factor looks if that helps:
http://img110.imageshack.us/img110/5355/af7rq.jpg
So now I have my Array factor AF1 which is a 501x501 array and here is where I could use some help in calculating the directivity.
I tried calculating the directivity this way:
theta=linspace(0,180*pi/180,501);
phi=linspace(0,360*pi/180,501);
[thtmesh,phimesh]=meshgrid(theta,phi);
dth=theta(2)-theta(1);
dph=phi(2)-phi(1);
Prad=sum(sum(abs(AF1).^2.*sin(thtmesh)*dth*dph));
Directivity=4*pi*max(max(abs(AF1).^2))/Prad;
But as I mentioned...I doubt this gives a correct value...I used linspace to set theta and phi to 501 so that the matrix dimensions match AF1...and I have no clue if the value I get is right.
Could someone help me out with the Directivity here?
Sorry if my query is too long but I thought it would help if I was as descriptive as possible.
Thanks!
Could someone help me out in calculating the Directivity of my circular array. I'm using Matlab and I'm pretty certain my method is not correct (explained a little below).
Very Briefly, this is how I generate the Array factor:
a1=-50;b1=50;c1=.2;
[fx,fy]=meshgrid(a1:c1:b1,a1:c1:b1);
t=linspace(0,2*pi,250)
And inside a loop:
for k=1:length(t)
x=cos((t)+offset); y=sin((t)+offset);
ArrF=exp(-i*2*pi*(fx*(rad(j)*x(k))+fy*(rad(j)*y(k))));
plot(rad(j)*x(k),rad(j)*y(k),'.b');
AF1=AF1+ArrF;
And I plot it with:
dbaf=20*log10(abs(AF1));
mesh(fx,fy,dbaf);
And this is how the Array and the Array factor looks if that helps:
http://img110.imageshack.us/img110/5355/af7rq.jpg
So now I have my Array factor AF1 which is a 501x501 array and here is where I could use some help in calculating the directivity.
I tried calculating the directivity this way:
theta=linspace(0,180*pi/180,501);
phi=linspace(0,360*pi/180,501);
[thtmesh,phimesh]=meshgrid(theta,phi);
dth=theta(2)-theta(1);
dph=phi(2)-phi(1);
Prad=sum(sum(abs(AF1).^2.*sin(thtmesh)*dth*dph));
Directivity=4*pi*max(max(abs(AF1).^2))/Prad;
But as I mentioned...I doubt this gives a correct value...I used linspace to set theta and phi to 501 so that the matrix dimensions match AF1...and I have no clue if the value I get is right.
Could someone help me out with the Directivity here?
Sorry if my query is too long but I thought it would help if I was as descriptive as possible.
Thanks!
RE: Directivity calculation in Matlab for circular array-suggestions?
* subtle joke.
RE: Directivity calculation in Matlab for circular array-suggestions?
compare that to your results as a quick check, it should be within 1 dB unless those sidelobes in your chart are very high.
kch