beampattern calculation for linear array.
12 ビュー (過去 30 日間)
古いコメントを表示
angle=0 degree.
N=100 Ref. node (x1,y1)=(600,400)
disatance between ref. node and destination node= 500
inter-element spacing =.1*(lambda)
angle=0*(pi/180);
D=500;%distance between ref. node and destination.
x1=600;%ref. node value.
y1=400;
xd=x1+(D*cos(angle)); %destination value
yd=y1+(D*sin(angle)); %destination value
N=100;%number of elements
freq=3e9;
c=3e8;
lambda=c/freq;
for n=1:N
d_s(n)=(x1-(.1*lambda))+(n*(.1*lambda));%inter-element spacing between sensor
d(n)= sqrt((yd-y1)^2+(xd-d_s(n))^2);
t(n)= ((2*pi)/lambda)*(d(1)-d(n));
c(n)=exp(-i*t(n));
for angle=1:360
d(n,angle)=sqrt((y1+(D*sin(angle)))-y1)^2+(((x1+(D*cos(angle)))-d_s(n))^2);%distance between destination and sensor
k(n,angle)=((2*pi)/lambda)*(d(1,angle)-d(n,angle)); %phase lag for each sensor
y(n,angle)=(exp(-i*k(n,angle))*c(n)); %weight multiplication to correct the phase lag
end
end
figure(1);
plot (x1, y1, '*b', xd, yd, 'o');
figure(2);
plot (d_s, y1, '.');
Y=sum(y);
YY=abs(Y);
figure(3);
plot(YY);
In figure(3), i tried to plot energy versus angle graph. i should get 100dB for energy since i have 100 elements. But, all im getting is (0-30)dB only. Can anyone help me with this? thanks in advance.
0 件のコメント
回答 (2 件)
the cyclist
2012 年 1 月 5 日
I haven't looked in detail, but it looks like maybe in your for loop, you are using "angle" in degrees, but calculating cos() and sin(), which expect radian input.
2 件のコメント
the cyclist
2012 年 1 月 5 日
Are you sure? After the statement "for angle=1:360", you seem to be using sin(angle) and cos(angle) without any conversion factor in there.
Honglei Chen
2012 年 1 月 5 日
Besides what cyclist mentioned, I think there are several other issues in your code:
- 100 elements translates to 20dB, not 100dB
- That 20dB is on power while your YY is in magnitude.
- You are assuming spherical wave, not plane wave, so I'm not sure if you will get 20dB
- Your phase compensation doesn't seem right. You are basically doing exp(-1i*k(n,angle))*exp(-1i*t(n)), which is incorrect.
HTH
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Array Geometries and Analysis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!