微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 微波和射频技术 > 天线设计和射频技术 > Planer dipole array matlab code

Planer dipole array matlab code

时间:04-04 整理:3721RD 点击:
Hi
i have done matlab code for 3*2 dipole array in xy plane but i am not sure if it is correct or no
this is my code :
Code:
%3D Array Factor of a 3x2 planar array antenna 
% first step AF calculation %
c=3e8;
f=2e9;
lambda=c/f;
k=(2*pi)/lambda;
L=lambda/2;
n=377;
Io=1;
r=10;
dx=lambda/2; %distance between elements (X)
dy=lambda/4;%distance between elements (Y)
alfa = pi/4; %Phase between elements
AB=[1 1 1 ;
    1 1 1 ]; % Array amplitudes


AB_phase=[alfa 2*alfa 3*alfa ;
          alfa 2*alfa 3*alfa  ]*pi/180; %Array phases
      
AB_coe=AB.*(cos(AB_phase)+1i*sin(AB_phase));
theta0=0:0.01:2*pi;
phi0=0:0.01:2*pi;
[phi,theta]=meshgrid(phi0,theta0);
sinU=sin(theta).*cos(phi);
sinV=sin(theta).*sin(phi);
% Syn = exp(1i*(n-1)*k*dx*(sinU))
% Sxn = exp(1i*(m-1)*k*dy*(sinV))
for n= 1:3
    for m = 1:2
        
    SynSxm =AB_coe(m,n)* exp(1i*(n-1)*k*dx*(sinU))* exp(1i*(m-1)*k*dy*(sinV));
    
    end
end

AF = sum ( sum ( SynSxm));


%%%%%%%%%%%%%%%%%% dipole calculation%%%%%%%%%%%%%%%%%%%%%%%
theta1=0:0.01:2*pi;
E_dipole=1i*n*Io*exp(-1i*k*r)*(1/(2*pi*r))*((cos(k*L*cos(theta1)/2)-cos(k*L/2))./sin(theta1));
E_array = E_dipole.*AF;
polar(theta1, abs(E_array))
if someone know how to do it in matlab plz tell me
and if my code is not correct tell me the mistake
thank u

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top