ctyz
Newbie level 4
my professor wanted me to design 2x2 antenna array which gives a pattern similar to cardioid but it has to be 1 everywhere except a narrow notch point. i have been trying 2 weeks around 2000 combination but i still can't find it. my matlab code is :
Code:
clear all
f = 1e6;
c = 3e8;
lamd = c/f;
k = 2*pi/lamd;
dx = [0.25*lamd/2 : 0.25*lamd/2 :2 * lamd/2];
dy = [0.25*lamd/2 : 0.25*lamd/2 :2 * lamd/2];
phi = [0:0.1:360];
phir = phi / 180 * pi;
theta = [0:0.1:180];
thetar = theta / 180 * pi;
AX1 = 1;
AX2 = 1;
AY1 = 1;
AY2 = 1;
BX1 = pi; %phases of each antennas
BX2 = 0;
BY1 = pi/2;
BY2 = 3*pi/2;
len = length(dx);
for ix=1:len
for iy=1:len
kdx = k * dx(ix) ;
kdy = k * dy(iy) ;
AFX1 = AX1 .* exp( i .* (kdx .* cos(phir) + BX1));
AFX2 = AX2 .* exp(-i .* (kdx .* cos(phir) + BX2));
AFY1 = AY1 .* exp( i .* (kdy .* sin(phir) + BY1));
AFY2 = AY2 .* exp(-i .* (kdy .* sin(phir) + BY2));
AF = AFX1 + AFX2 + AFY1 + AFY2;
aAF = abs(AF);
figure(1);hold off
fprintf('Dx = %.2f lamd Dy = %.2f lamd\n',dx(ix)/lamd*2,dy(iy)/lamd*2);
polar(phir,aAF);
pause;
end
end
Last edited: