Professional Documents
Culture Documents
feature=player_deta
ilpage&v=j4grRsIX8xg
www.google.co.in/url?sa=t&rct=j&q=&esrc=s&source
=web&cd=9&cad=rja&ved=0CE0QtwIwCA&url=http%3A%2F
%2Fwww.youtube.com%2Fwatch%3Fv%3D4wIB1UCQ2MU&ei=
pS8SUe6fOsWJrAfnpoDQCg&usg=AFQjCNEzww52VCTfP9kXy
VcNsP9xKNIIzw&bvm=bv.41934586,d.bmk
Laboratory experiments:
Ex. No.1: MATLAB Implementation to obtain radiation pattern of
an antenna.
clear all
%Defining variables in spherical coordinates
theta=[0:0.12:2*pi];%theta vector
phi=[0:0.12:2*pi];%phi vector
l_lamda1=1/100;% length of antenna in terms of wavelengths
I0=1;% max current in antenna structure
n=120*pi;%eta
% evaluating radiation intensity(U)
U1=( n*( I0^2 )*( ( cos(l_lamda1*cos(theta-(pi/2))/2) cos(l_lamda1/2) )./ sin(theta-(pi/2)) ).^2 )/(8*(pi)^2);
%converting to dB scale
U1_1=10*log10(U1);
%normalizing in order to make U vector positive
min1=min(U1_1);
U=U1_1-min1;
Ex. No. 2:
antenna.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
theta = 0:0.001:2*pi;
CHI=b.*d.*sin(theta)-psi;
A = (sin(N.*CHI./2)./(N.*sin(CHI./2)));
F = ((cos(c.*cos(theta))-cos(b.*L./2))./sin(theta));
figure
polar(theta,abs(F),'k')
title('radition pattern intensity for single halfwave dipole
antenna elemant has F=900,L=0.5')
figure
polar(theta,A,'k')
title('radiation pattern intensity for antenna array with
isotropic elemants has psi=60,F=900,N=16 and d=0.5 ')
figure
polar(theta,A.*F,'k')
title('radiation pattern intensity for antenna array with
halfwave dipole antenna elemants has psi=60,F=900,N=16,d=0.5 and
L=0.5')
Ex.No.3:
A=(pi*sqrt(2*(Er+1)))*(Zc/Z0)+((Er-1)/(Er+1))*(0.23+0.11/Er);
ratio1=4/(0.5*exp(A)-exp(-A));
B=(pi/(2*sqrt(Er)))*(Z0/Zc);
ratio2=((Er-1)/(pi*Er))*(log(B-1)+0.39-0.61/Er)+(2/pi)*(B-1log(2*B-1));
if ratio1 <= 2
ratio = ratio1;
else ratio = ratio2;
end
W_tln=h*ratio;
W=(c0/(2*fr))*sqrt(2/(Er+1));
% The effective dielectric constant
Ereff=(Er+1)/2+((Er-1)/2)*(power((1+12*h/W),-0.5));
% Wavelength in effective medium
Lambda=Lambda0/sqrt(Ereff);
% Speed of light in effective medium
c=c0/sqrt(Ereff);
%Length of microstrip TLN for a 360 degree phase shift
L_tln=Lambda
inset required
Ex.No. 4:
Measurement techniques of radiation characteristics of
an antenna.
This program calculates the radiation characteristics of a helical antenna, both in the Normal mode and
the Axial(End-fire) mode. The radiation characteristics which are calculated are:
I. Normal Mode
a. Pitch angle alpha (in degrees)
b. Axial ratio (AR)
c. HPBW (in degrees)
c. Directivity (dimensionless and in dB)
else
ERR = 0;
end
end
%---Input spacing between turns-------------------------------------ERR = 1;
while(ERR ~= 0)
fprintf('\n
*** NOTICE: For Normal mode, S << lambda.');
fprintf('\n
It is recommended that S/lambda <=
1/20.\n\n');
S = str2num(input('Spacing between turns S (in lambda) = ','s'));
if (isempty(S))
fprintf('\n
*** ERROR: Please enter a number!\n\n');
elseif (S <= 0)
fprintf('\n
*** ERROR: The number has to be greater than
0!\n\n');
else
ERR = 0;
end
end
%---Normal mode main program---------%---Setup----------------------------step=0.1; % Step: accuracy control
delta=1e-2; % To avoid sigularity in calculation
angle=[0+delta:step:360+delta];
theta=angle*pi/180;
%---Pitch angle----------alpha=atan(S/C)*180/pi;
%---Axial Ratio--AR=2*S/C;
%---Pattern-------------------------L0=sqrt(C^2+S^2);
E=sin(theta); % Element factor
M=2*N; % Image due to ground plane
kesi=2*pi*(S*cos(theta));
AF=sin(M*kesi/2)./sin(kesi/2)/N; % Array factor
U=(E.*AF).^2; % Pattern mutiplicatin
[Umax,Index]=max(U);
U=U/Umax;
Umax=1;
U_dB=10*log10(U);
%---HPBW(From pattern)-------HP_dB=(1/sqrt(2));
for i=Index:length(U)
if U(i)<HP_dB
HPBW=angle(i)+angle(i-1)-2*angle(Index);
break;
end
end
%---Directivity-----------------------integrand=U.*sin(theta)*step*pi/180;
Prad=2*pi*sum(integrand(1:round(length(integrand)/2)));
D0=4*pi*Umax/Prad;
D_dB=10*log10(D0);
%---Create output-----------if(DEVICE == 2)
fid = fopen(FILNAM,'w');
else
fid = DEVICE;
end
%---Echo input parameters and output computed parameters--------fprintf(fid,'\nHELIX: NORMAL MODE:\n');
fprintf(fid,'\nInput parameters:\n-----------------');
fprintf(fid,'\nNumber of turns N = %3.0f',N);
fprintf(fid,'\nCircumference of loops C (in lambda) = %6.4f',C);
fprintf(fid,'\nSpacing between turns S (in lambda) = %6.4f',S);
fprintf(fid,'\nLength (one-turn) L0 (in lambda) = %6.4f',sqrt(C^2+S^2));
fprintf(fid,['\nLength (',num2str(N),'-turn) LN (in lambda) =
%6.4f'],N*sqrt(C^2+S^2));
fprintf(fid,'\n\nOutput parameters:\n------------------');
fprintf(fid,'\nPitch angle alpha (in degrees) = %6.4f',alpha);
fprintf(fid,'\nAxial Ratio AR (dimensionless) = %6.4f',AR);
fprintf(fid,'\nHPBW (in degrees) = %6.4f',HPBW);
fprintf(fid,'\nDirectivity(approximate) (dimensionless) = 1.5');
fprintf(fid,'\nDirectivity(approximate) (in dB) = 1.7609');
fprintf(fid,'\nDirectivity(numerical from pattern) (dimensionless) =
%6.4f',D0);
fprintf(fid,'\nDirectivity(numerical from pattern) (in dB) \t= %6.4f',D_dB);
fprintf(fid,'\n\n');
if(DEVICE == 2)
fclose(fid);
end
%---Plot normalized radiation pattern(in dB:-60-0dB)---------------------polar_dB(angle,U_dB,-60,0,4,'-');
title('Normalized Radiation Pattern of Normal Mode Helical Antenna(in dB)');
case 2
%---Axial(End-fire) mode
fprintf('\nInput:\n');
fprintf('--------\n');
%---Input turn numbers------------------------------ERR = 1;
while(ERR ~= 0)
N = str2num(input('Number of turns N = ','s'));
N = round(N);
if (isempty(N))
fprintf('\n
*** ERROR: Please enter an integer!\n\n');
elseif (N <= 0)
fprintf('\n
0!\n\n');
else
ERR = 0;
end
end
%---Input circumference of loops-------------------------------------ERR = 1;
while(ERR ~= 0)
fprintf('\n
*** NOTICE: To achieve nearly circular polarizaion, it
is');
fprintf('\n
recommended that 3/4 <= (C/lambda) <=
4/3.\n\n');
C = str2num(input('Circumference of loops C (in lambda) = ','s'));
if (isempty(C))
fprintf('\n
*** ERROR: Please enter an number!\n\n');
elseif (C <= 0)
fprintf('\n
*** ERROR: The number has to be greater than
0!\n\n');
else
ERR = 0;
end
end
%---Input spacing between turns-------------------------------------ERR = 1;
while(ERR ~= 0)
fprintf('\n
*** NOTICE: To achieve nearly circular polarizaion, it
is');
fprintf('\n
recommended that S/lambda is approximately
1/4.\n\n');
S = str2num(input('Spacing between turns S (in lambda) = ','s'));
if (isempty(S))
fprintf('\n
*** ERROR: Please enter an number!\n\n');
elseif (S <= 0)
fprintf('\n
*** ERROR: The number has to be greater than
0!\n\n');
else
ERR = 0;
end
end
%---Axial(End-fire) mode main program--%---Setup------------------------------step=0.1; % Step: accuracy control
delta=1e-2; % To avoid sigularity in calculation
angle=[0+delta:step:360+delta];
theta=angle*pi/180;
break;
end
end
%---FNBW(From pattern)--------for i=1:length(U)
if U(i)<1e-4 % set "zero" point to be less than 1e-4
FNBW=angle(i)+angle(i-1);
break;
end
end
else
%---HPBW(From pattern)-------HP_dB=(1/sqrt(2));
[temp,imax]=max(U);
end
for i=imax:-1:2
if U(i)<HP_dB
HPBW=angle(imax-i)+angle(imax-i+1);
break;
end
end
%---FNBW(From pattern)--------for i=imax:-1:2
if U(i)<1e-4 % set "zero" point to be less than 1e-4
FNBW=angle(imax-i)+angle(imax-i+1);
break;
end
end
integrand=U.*sin(theta)*step*pi/180;
Prad=2*pi*sum(integrand(1:round(length(integrand)/2)));
D0=4*pi*Umax/Prad;
D_dB=10*log10(D0);
%---Create output-----------if(DEVICE == 2)
fid = fopen(FILNAM,'wt');
else
fid = DEVICE;
end
polar_dB(angle,U_dB,-60,0,4,'-');
if SELECT_end == 1
title('Normalized Radiation Pattern of Ordinary End-Fire Helical
Antenna(in dB)');
elseif SELECT_end == 2
title('Normalized Radiation Pattern of Hansen-Woodyard End-Fire Helical
Antenna(in dB)');
else
title('Normalized Radiation Pattern of End-Fire (p=1) Helical Antenna(in
dB)');
end
if SELECT_end == 1
fprintf(fid,'\n HELIX: ORDINARY END-FIRE MODE:\n');
elseif SELECT_end == 2
Ex. No. 5:
Analysis of E plane and H-plane Horns
function []=horn;
disp('E-Plane and H-Plane Horn Specifications');
R1=[]; R2=[];
R1 = input('rho1(in wavelengths) = ');
R2 = input('rho2(in wavelengths) = ');
a=[]; b=[];
a = input('a(in wavelengths) = ');
b = input('b(in wavelengths) = ');
a1=[]; b1=[];
a1 = input('a1(in wavelengths) = ');
b1 = input('b1(in wavelengths) = ');
u = (1/sqrt(2))*((sqrt(R2)/a1)+(a1/sqrt(R2)));
v = (1/sqrt(2))*((sqrt(R2)/a1)-(a1/sqrt(R2)));
u = Fresnel(u);
v = Fresnel(v);
w = Fresnel(b1/sqrt(2*R1));
DH = 4*pi*b*R2/a1*((real(u)-real(v))^2 + (imag(u)-imag(v))^2);
DE = 64*a*R1/(pi*b1)*((real(w))^2 + (imag(w))^2);
DP = pi/(32*a*b)*DE*DH;
k = 2*pi;
Emax = 0;
Hmax = 0;% E and H plane Outputs% E-Plane Amplitude
for(theta = 0:0.5:360);
I = theta*2 + 1;
theta = theta*pi/180;
phi = pi/2;
ky = k*sin(theta);
kxp = pi/a1;
kxdp = -pi/a1;
t1 = sqrt(1/(pi*k*R1))*(-k*b1/2-ky*R1);
t2 = sqrt(1/(pi*k*R1))*(k*b1/2-ky*R1);
t1p = sqrt(1/(pi*k*R2))*(-k*a1/2-pi/a1*R2);
t2p = sqrt(1/(pi*k*R2))*(k*a1/2-pi/a1*R2);
t1dp = -t2p;
t2dp = -t1p;
I1 =.5*sqrt(pi*R2/k)*(exp(j*R2/(2*k)*kxp^2))*(Fresnel(t2p-Fresnel(t1p)))
+ exp(j*R2/(2*k)*kxdp^2)*(Fresnel(t2dp) - Fresnel(t1dp));
I2 = sqrt(pi*R1/k) * exp(j*R1/(2*k)*ky^2) * (Fresnel(t2) - Fresnel(t1));
y(I) = (1 + cos(theta))*I1*I2;
y(I) = abs(y(I));
end
for(I = 1:721)
if(y(I) > Emax)
Emax = y(I);
end
end
for(I = 1:721)
if(y(I) <= 0)
Edb = -100;
else
Edb = 20*log10(abs(y(I))/Emax);
end
theta = (I-1)/2;
x(I)=theta;
q1(I)=Edb;
end
% H-Plane Amplitude
for(theta = 0:0.5:360);
I = theta*2 + 1;
theta = theta*pi/180;
phi = 0;kxp = k*sin(theta) + pi/a1;
kxdp = k*sin(theta) - pi/a1;
t1 = sqrt(1/(pi*k*R1))*(-k*b1/2);
t2 = sqrt(1/(pi*k*R1))*(k*b1/2);
t1p = sqrt(1/(pi*k*R2))*(-k*a1/2-kxp*R2);
t2p = sqrt(1/(pi*k*R2))*(k*a1/2-kxp*R2);
t1dp = sqrt(1/(pi*k*R2))*(-k*a1/2-kxdp*R2);
t2dp = sqrt(1/(pi*k*R2))*(k*a1/2-kxdp*R2);
I1 = .5*sqrt(pi*R2/k)*(exp(j*R2/(2*k)*kxp^2)*(Fresnel(t2p)Fresnel(t1p)) + exp(j*R2/(2*k)*kxdp^2)*(Fresnel(t2dp) - Fresnel(t1dp)));
I2 = sqrt(pi*R1/k) * exp(j*R1/(2*k)*ky^2) * (Fresnel(t2) Fresnel(t1));
y(I) = (1 + cos(theta))*I1*I2;
y(I) = abs(y(I));
end
for(I = 1:721)
if(y(I) > Hmax)
Hmax = y(I);
end
end
for(I = 1:721)
if(y(I) <= 0)
Hdb = -100;
else
Hdb = 20*log10(abs(y(I))/Hmax);
end
theta = (I-1)/2;
x(I)=theta;
q2(I)=Hdb;
end
% Figure 1
ha=plot(x,q1);
set(ha,'linestyle','-','linewidth',2);
hold on;
hb=plot(x,q2,'r--');
set(hb,'linewidth',2);
xlabel('Theta (degrees)');
ylabel('Field Pattern (dB)');
title('Horn Analysis');
legend('E-Plane','H-Plane');
grid on;
axis([0 360 -60 0]);
% Figure 2
figure(2);
ht1=elevation(x*pi/180,q1,-60,0,4,'b-');
hold on;
ht2=elevation(x*pi/180,q2,-60,0,4,'r--');
set([ht1 ht2],'linewidth',2);
legend([ht1 ht2],{'E-plane','H-plane'});
title('Field patterns');
% Directivity Output
directivity = 10*log10(DP)
% Fresnel Subfunction
function[y] = Fresnel(x);
A(1) = 1.595769140;
A(2) = -0.000001702;
A(3) = -6.808508854;
A(4) = -0.000576361;
A(5) = 6.920691902;
A(6) = -0.016898657;
A(7) = -3.050485660;
A(8) = -0.075752419;
A(9) = 0.850663781;
A(10) = -0.025639041;
A(11) = -0.150230960;
A(12) = 0.034404779;
B(1) = -0.000000033;
B(2) = 4.255387524;
B(3) = -0.000092810;
B(4) = -7.780020400;
B(5) = -0.009520895;
B(6) = 5.075161298;
B(7) = -0.138341947;
B(8) = -1.363729124;
B(9) = -0.403349276;
B(10) = 0.702222016;
B(11) = -0.216195929;
B(12) = 0.019547031;
CC(1) = 0;
CC(2) = -0.024933975;
CC(3) = 0.000003936;
CC(4) = 0.005770956;
CC(5) = 0.000689892;
CC(6) = -0.009497136;
CC(7) = 0.011948809;
CC(8) = -0.006748873;
CC(9) = 0.000246420;
CC(10) = 0.002102967;
CC(11) = -0.001217930;
CC(12) = 0.000233939;
D(1) = 0.199471140;
D(2) = 0.000000023;
D(3) = -0.009351341;
D(4) = 0.000023006;
D(5) = 0.004851466;
D(6) = 0.001903218;
D(7) = -0.017122914;
D(8) = 0.029064067;
D(9) = -0.027928955;
D(10) = 0.016497308;
D(11) = -0.005598515;
D(12) = 0.000838386;
if(x==0)
y=0;
return
elseif(x<0)
x=abs(x);
x=(pi/2)*x^2;
F=0;
if(x<4)
for(k=1:12)
F=F+(A(k)+j*B(k))*(x/4)^(k-1);
end
y = F*sqrt(x/4)*exp(-j*x);
y = -y;
return
else
for(k=1:12)
F=F+(CC(k)+j*D(k))*(4/x)^(k-1);
end
y = F*sqrt(4/x)*exp(-j*x)+(1-j)/2;
y =-y;
return
end
else
x=(pi/2)*x^2;
F=0;
if(x<4)
for(k=1:12)
F=F+(A(k)+j*B(k))*(x/4)^(k-1);
end
y = F*sqrt(x/4)*exp(-j*x);
return
else
for(k=1:12)
F=F+(CC(k)+j*D(k))*(4/x)^(k-1);
end
y = F*sqrt(4/x)*exp(-j*x)+(1-j)/2;
return
end
end
Ex.No. 6:
Significance of pocklingtons integral equation.
Current distribution
B.
Input impedance
C.
of a linear symmetrically excited dipole. This program uses pulse expansion for the electric current
mode and point-matching the electric field at the center of each wire segment; delta-gap feed model is
used in both formulations. In addition, magnetic-frill generator is available in the Pocklington's integral
equation.
2. a
3. NM =
4. IEX =
IEX =
1: magnetic-frill generator
IEC =
2: delta-gap feed
clear;
close;
%*********************************************************
%*** OUTPUT DEVICE OPTION # : 1 ---> SCREEN
%
2 ---> OUTPUT FILE
%*********************************************************
disp('OUTPUT DEVICE OPTION FOR THE OUTPUT PARAMETERS');
disp('
OPTION (1):SCREEN');
disp('
OPTION (2):OUTPUT FILE');
option_a=0; option_b=0; filename=0;
while((option_a~=1)&(option_a~=2))
option_a=input('OUTPUT DEVICE =');
if(option_a==2)
zb1=zn-zm+b;
roc=sqrt(ra*ra+zb1*zb1);
cgp2=exp(-j*beta*roc)*((1.0+j*beta*roc)*(2.0*roc*roc3.0*ra*ra)+(beta*ra*roc)^2)/(2.0*beta*roc^5);
crt=cgp1+cgp2;
for k = 1: n
xk=a+k*hd;
zx1=zn-zm+xk;
r=sqrt(ra*ra+zx1*zx1);
cgp3=exp(-j*beta*r)*((1.0+j*beta*r)*(2.0*r*r3.0*ra*ra)+(beta*ra*r)^2)/(2.0*beta*r^5);
if mod(k,2)~=0
crt=crt+4.0*cgp3;
else
crt=crt+2.0*cgp3;
end
end
crt=crt*hd*0.33333;
zmn(I)=crt;
if I~=1
zmn(nm+I-1)=crt;
end
end
rb=2.3*ra;
tlab=2.0*log(2.3);
for i = 1: nm
zi=hl-(i-0.5)*dz;
r1=beta*sqrt(zi*zi+ra*ra);
r2=beta*sqrt(zi*zi+rb*rb);
j=0.0+j*1.0;
if iex==1
cga(i)=-j*beta^2/(eta*tlab)*(expm(-j*r1)/r1-expm(-j*r2)/r2);
else
if i~=nmh
cga(i)=0;
else
cga(i)=-j*beta/(eta*dz);
end
end
end
t2=length(zmn);
t1=length(wa);
m=nm;
a=zmn;
b=cga;
wa=wa;
m=nm;
a1=a;
a2=a(m+1:t2);
t=b;
c1=wa;
c2=wa(m-1:t1);
r1=a1(1);
t(1)=b(1)/r1;
if m ~=1
for n=2:m
n1=n-1;
n2=n-2;
r5=a2(n1);
r6=a1(n);
if n ~= 2
c1(n1)=r2;
for i1=1:n2
i2=n-i1;
r5=r5+a2(i1)*c1(i2);
r6=r6+a1(i1+1)*c2(i1);
end
end
r2=-r5/r1;
r3=-r6/r1;
r1=r1+r5*r3;
if n~=2
r6=c2(1);
c2(n1)=0.0+j*0.0;
for i1=2:n1
r5=c2(i1);
c2(i1)=c1(i1)*r3+r6;
c1(i1)=c1(i1)+r6*r2;
r6=r5;
end
end
c2(1)=r3;
r5=0.0+j*0.0;
for i1=1:n1
i2=n-i1;
r5=r5+a2(i1)*t(i2);
end
r6=(b(n)-r5)/r1;
for i1=1:n1
t(i1)=t(i1)+c2(i1)*r6;
end
t(n)=r6;
end
end
cga=t;
%******************************************************************
%
Output files for curr-MoM.dat
%******************************************************************
fid=fopen('Curr-MoM_m.dat','wt');
fprintf(fid,'CURRENT DISTRIBUTION ALONG ONE HALF OF THE DIPOLE\n');
fprintf(fid,'POSITION Z:
MAGNITUDE:
REAL PART:
IMAGINARY PART:
SECTION #:\n\n');
%****************************************************************************
*
%
OUTPUT THE CURRENT DISTRIBUTION ALONG OF THE DIPOLE
%****************************************************************************
*
for i=1:nmh
xi=hl-(i-0.5)*dz;
yi=abs(cga(i));
table2=[xi,yi,real(cga(i)),imag(cga(i)),i];
fprintf(fid,'%1.4f
%1.6f
%1.6f
%1.6f
%2.1f \n\n',table2);
end
%******************************************************************
%
Output figure for curr-MoM.dat
%******************************************************************
i=[1:nmh];
xi=hl-(i-0.5)*dz;
yi=abs(cga(i));
stem(xi,yi)
grid on;
xlabel('Position (z)')
ylabel('Magnitude')
title('CURRENT DISTRIBUTION ALONG ONE HALF OF THE DIPOLE')
figure;
fclose(fid);
%******************************************************
%
COMPUTATION OF THE INPUT IMPEDANCE
%******************************************************
zin=1.0/cga(nmh);
%******************************************************************
%
COMPUTATION OF AMPLITUDE RADIATION PATTERN OF THE ANTENNA
%******************************************************************
for i=1:181
theta=(i-1.0)*rad;
cth=cos(theta);
sth=sin(theta);
if abs(cth)<0.001
ft=1;
else
ft=sin(beta*dz*cth*0.5)/(beta*dz*cth*0.5);
end
crt=0;
for m=1:nm
zm=hl-(m-0.5)*dz;
crt=crt+exp(j*beta*zm*cth)*ft*cga(m)*dz;
end
ptt=abs(crt)*sth*sth*eta*0.5;
etmm(i)=ptt;
end
amax=etmm(1);
for i=2:181
if etmm(i)>=amax
amax=etmm(i);
end
end
for i=1:181
ptt=etmm(i)/amax;
if ptt<=0.00001
ptt=0.00001;
etmm(i)=20*log10(ptt);
end
etmm(i)=20*log10(ptt);
end
%******************************************************************
%
Output files for Patt-MoM_m.dat
%******************************************************************
pok=fopen('Patt-MoM_m.dat','wt');
fprintf(pok,'RADIATION PATTERN
fprintf(pok,'THETA (in degrees)
vs
for i=1:181
xi=i-1;
table3=[xi,etmm(i)];
fprintf(pok,'%3.1f
%3.3f
\n',table3);
end
%******************************************************************
%
Output figure for Patt-MoM_m.dat
%******************************************************************
i=[1:181];
xi=i-1;
% Polar Plot
etmm1=[etmm(1:181),fliplr(etmm(1:180))];
q=polar_dB([0:360],etmm1,-40,0,4,'-');
set(q,'linewidth',1.5);
title('RADIATION PATTERN
vs
for i=182:361
xi=i-1;
table4=[xi,etmm(362-i)];
fprintf(pok,'%3.1f
end
OBSERVATION ANGLE')
%3.3f
\n',table4);
%
CALCULATE THE RADIATION PATTERN OF THE ANTENNA
%****************************************************************************
*****
maxang=181;
pmax=-1.0;
for j=1:maxang
theta=(j-1)/(maxang-1)*pi;
sth=sin(theta);
cth=cos(theta);
arg=pi*dz*cth;
if abs(arg) <= 0.001
ft=1.0;
else
ft=sin(arg)/arg;
end
n2=n-1;;
crt=0.0+j*0.0;
for k=1:n2
argp=pi*(-l+(k-1)*2.0*dz+dz)*cth;
crt=crt+exp(cj*argp)*ft*elecur(k);
argp=pi*(-l+(n2+k-1)*2.0*dz+dz)*cth;
crt=crt+exp(cj*argp)*ft*elecur(k);
end
power=abs(crt)*sth*sth;
pwr(j)=power;
if pwr(j)>=pmax
pmax=pwr(j);
end
end
%******************************************************************
%
Output files for Patt-MoM_m.dat
%******************************************************************
hel=fopen('Patt-MoM_m.dat','wt');
fprintf(hel,'RADIATION PATTERN
vs OBSERVATION ANGLE THETA\n');
fprintf(hel,'THETA (in degrees)
MAGNITUDE (in dB)\n');
%*******************************************************************
%
WRITE THE RADIATION PATTERN IN dB
%*******************************************************************
for i=1:maxang
theta=(i-1)/(maxang-1)*180;
pattrn=pwr(i)/pmax;
if pattrn <=0.00001
pattrn=-100;
else
pattrn=20*log10(pattrn);
end
table1=[theta,pattrn];
fprintf(hel,'%3.1f
%3.3f
\n',table1);
end
%******************************************************************
%
Output figure for Patt-MoM_m.dat
%******************************************************************
i=[1:181];
theta=(i-1);
pattrn=pwr(i)/pmax;
pattrn=20*log10(pattrn);
% Polar Plot
pattrn=[pattrn,fliplr(pattrn(1:180))];
q=polar_dB([0:360],pattrn,-40,0,4,'-');
set(q,'linewidth',1.5);
title('RADIATION PATTERN
vs
OBSERVATION ANGLE')
for i=182:361
theta=(i-1)/(maxang-1)*180;
pattrn=pwr(362-i)/pmax;
if pattrn <=0.00001
pattrn=-100;
else
pattrn=20*log10(pattrn);
end
table2=[theta,pattrn];
fprintf(hel,'%3.1f
%3.3f
end
fclose(hel);
%
OUTPUT FILE
%*******************************************
if(option_a==2)
diary(filename);
end
%*******************************************
%
FORMAT STATEMENTS
%*******************************************
disp(sprintf('\n\n\n\n\n\n\n\n'));
\n',table2);