Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

problem implementing directivity of array factor in matlab

Status
Not open for further replies.

yefj

Advanced Member level 4
Joined
Sep 12, 2019
Messages
1,255
Helped
1
Reputation
2
Reaction score
3
Trophy points
38
Activity points
7,588
Hello, I am trying to impelemnt in matlab directivity of an array factor .
first i have implemented array factor using formula 1 but instead of cosine i have used sine.
then i have combined two definitions from books as shown bellow and tried to implement them into matlab.
first i have tried to plot simple 2 element array factor as shown bellow and i get the logical 3dB.

but when i have built the formula in matlab exactly as shown by the formulas as shown bellow i get directivity of -24 dB.
where did i go wrong?
Thanks.
Code:
clc
clear all
theta=linspace(-pi/2,pi/2,1000);
theta_0=pi*(0/180);
f=10;

N=2;

lambda=300/f;
k=(2*pi)/lambda;
d=1*lambda;

delta=-k*d*sin(theta_0);
ksi=k*d.*sin(theta)+delta;
AF2=0;
for m=1:N
AF2=AF2+exp(1i*(m-1)*(k*d*sin(theta)+delta));
end 

dir=(AF2.^2)./(sum(1+(exp(1i*(k*d*sin(theta)+delta))).^2));
plot(theta/pi*180,10*log10(dir))

1642142602680.png

1642142691110.png

1642142882056.png
1642142927251.png

1642143019333.png


1642152605000.png

1642152683184.png

1642152851233.png
 
Last edited:

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top