You are on page 1of 3

function dipole_1

% dipole_1--------------
% Tinh do dinh huong cucddai (D0)
% Tinh dien tro buc xa (Rrad)
% Tinh cong suat buc xa (Prad)
% Biet: lamda, chieu dai dipole (L), dong dien cuc dai (I0)
%------------------------------------------------------------
lamda = input('buoc song(mac dinh = 500): ');
if isempty(lamda)
lamda = 500;
end
mutiplier = input ('\nTy so giua chieu dai anten L va buoc song lamda\n (.5
voi L=lamda/2)\n (.005 voi anten vi phan)\n (1.25 de xem mot vai bup song
phu)\nEnter ty so (macdinh = .5): ');
if isempty(mutiplier)
mutiplier = .5;
end
% Tinh do dai cua anten
ant_lengh = mutiplier*lamda;
current = input('bien do dong dien(mac dinh = 1): ');
if isempty(current)
current = 1;
end
Prad = 0;
T = [0:2*pi/360:2*pi];
P = [0:2*pi/360:2*pi];
U = dipoleint1(T,P,lamda,ant_lengh, current); %Cuong do buc xa U =
r^2*Wrad_mat do buc xa(cong thuc 2_12 trang 40 cua Balanis.
%Tinh cong suat buc xa tong cua anten Prad theo U, sin(theta) dtheta...
% dphi(cong thuc 2_13 trang 41 cua Balanis).
%--------------------------------------------------------------
semicircle1 = sin (T(1:181));
prad1 = U(181,1:181);
prad1 = prad1.*(pi/180).*semicircle1;
Prad = sum(prad1)*2*pi;
% Theo cng thc 2_13 trang 41 cua Balanis sao li tnh th nh ?
% Tinh tich phan theo vong lap-----
% Prad = 0;
% for (i = 1:361)
% for (j = 1:181)
% Prad = Prad + U(i,j)*sin(T(j)*(pi/180)^2);
% end
%end
DM = 4*pi*U./Prad; % He so dinh huong duoc xa dinh theo (cong thuc 2_16 trang
44 cua Blanis)
D0 = max(max(DM)); % Do dinh huong cuc dai
%....Elevation
M1 =DM (91,:);%dua ra do thi toa do cuc quet goc theta=0:360 tai phi = 90.
figure; polar (T, M1); title('do dinh huong theo mat phang dung yoz hay phi =
90');
%....Azimuth
M2 =DM (:,91);%dua ra do thi toa do cuc quet goc phi = 0:360,tai theta= 90.
figure; polar (P, M2); title('do dinh huong theo mat phang ngang xoy hay
theta = 90');
% do thi dinh huong cua ca truong dien tu.
figure; mesh(DM);
xlabe1('Elevation');
ylabei('Azimuth');
zlabel('Cuong do buc xa(U)');
title(ant_lengh/lamda);
Rrad = 2*Prad/current^2;
% Hien thi cac thong so tren cua so command
D0
Prad
Rrad
=============================================================================
HM CON
================================================================
dipoleint1.m
function [F]= dipoleint1(theta, phi, lamda, length1, current)
% F = dipoleant(theta, phi, lamda, length1, current)
%calculate the radiation intensity of a dipole antenna using equations
% 4-62 on page 153 and 2-12a on page 38 of Balanis.
% theta = elevation angle
% phi = azimuthal angle
% lambda = wave length (in meters)
% length1 = antenna length (in meters).
% current = maximum current (in amps).
mu0 = 4*pi*10^-7; % permeability (in newtons/amp^2)
epsilon0 = 8.854187817*10^-12; % permittivity (in Farads/meter )
eta = sqrt(mu0/epsilon0); % intrinsic impedance (in ohms)
beta = (2*pi)/lamda; %wave number (in radians/meter)
P1 = ones(size(phi));
[MT MP] = meshgrid(theta, P1); % P1 is all ones for this case
% keyboard
n1=cos((beta*length1/2).*cos(MT))-cos(beta*length1/2);
denom = (2*pi.*sin(MT+.0000000001));
% .0000000001; %avoid divide by zero by ensuring sin() <> 0
eTheta = j*eta*current.*n1./denom;
%ePhi = eTheta; %ePhi = eta*hPhi and hPhi = eTheta/eta ePhi=(eta/eta)*eTheta
%ePhi = 0 for a dipole antenna.
ePhi = 0;
F = (abs(eTheta).^2 + abs(ePhi).^2)/(2*eta);

Nu mnh mun v th ca E v H theo r gs vi cc cng thc
nh:


trn t beta=k; length1 = l
Th ch phi lp nh th no:
R: chy t u n u ?
E: chy nh th no ?
Ch ngi c chiu cha xong chn qu !
Ch vit hai hm nh cng thc ,
M trn chnh l tnh theo cng thc trn ri m

You might also like