34
http://www.youtube.com/watch? feature=player_detailpage&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=AFQ jCNEzww52VCTfP9kXyVcNsP9xKNIIzw&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)

Lab Manual

Embed Size (px)

Citation preview

Page 1: Lab Manual

http://www.youtube.com/watch?feature=player_detailpage&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=AFQjCNEzww52VCTfP9kXyVcNsP9xKNIIzw&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 coordinatestheta=[0:0.12:2*pi];%theta vectorphi=[0:0.12:2*pi];%phi vector l_lamda1=1/100;% length of antenna in terms of wavelengthsI0=1;% max current in antenna structuren=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 scaleU1_1=10*log10(U1); %normalizing in order to make U vector positivemin1=min(U1_1);U=U1_1-min1;

Page 2: Lab Manual

% expanding theta to span entire spaceU(1,1)=0;for n=1:length(phi) theta(n,:)=theta(1,:);end % expanding phi to span entire spacephi=phi';for m=1:length(phi) phi(:,m)=phi(:,1);end % expanding U to span entire spacefor k=1:length(U) U(k,:)=U(1,:);end % converting to spherical coordinates [x,y,z]=sph2cart(phi,theta,U); %plotting routinesurf(x,y,z)colormap(copper)title('Radition Pattern for Dipole Antenna (length=1.5lamda)')xlabel('x-axis--->')ylabel('y-axis--->')zlabel('z-axis--->')

Result:

Page 3: Lab Manual

Ex. No. 2: Experimental study of radiation pattern of an antenna.dipole antenna array normalizes field pattern

N=5;%input ('number of elemants : ') ;F = 900;%input ('operation freq. in (MHZ) : ') ;lamda=300./F;x=0.5;%input ('distance space in lamda : ') ;d=x.*lamda;%input ('distance space in lamda : ') ;b=2.*pi./lamda;% phase constant% Progressive phase on elementspsi=0;%input ('Progressive phase on. in degree: ') ; z=0.5;%input ('Length of dipole in lamda : ') ;L=z.*lamda;c=(b.*L)./2;

Page 4: Lab Manual

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%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)); figurepolar(theta,abs(F),'k')title('radition pattern intensity for single halfwave dipole antenna elemant has F=900,L=0.5')figurepolar(theta,A,'k')title('radiation pattern intensity for antenna array with isotropic elemants has psi=60,F=900,N=16 and d=0.5 ')figurepolar(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')

Page 5: Lab Manual
Page 6: Lab Manual
Page 7: Lab Manual

Ex.No.3:

Program to computes some important parameters of a rectangular microstrip patch antenna.

The inputs to the program are the thickness of the substrate h ,the desired resonant frequency fr ,

the width of the feed microstrip and the dielectric constant of the substrate Er.

clear all; fr1=input('Enter the resonant frequency in GHz : ');Er=input('\n Enter the dielectric constant of the substrate : ');h1=input('\n Enter the thickness of the substrate in mm : ')Zc=input('\n Enter the characterstic impedance needed for the microstrip transmission line: ') fr=fr1*1e9;h=h1*1e-3; % Velocity of light in vacuumc0=299792458; %Wavelength in free space LambdaLambda0=c0/fr; % Free space wave impedance Z0=120*pi; %Determining the width of the microstrip transmission line needed 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-1-log(2*B-1)); if ratio1 <= 2 ratio = ratio1; else ratio = ratio2; end W_tln=h*ratio; % Width of the patchW=(c0/(2*fr))*sqrt(2/(Er+1)); % The effective dielectric constant

Page 8: Lab Manual

Ereff=(Er+1)/2+((Er-1)/2)*(power((1+12*h/W),-0.5)); % Wavelength in effective mediumLambda=Lambda0/sqrt(Ereff); % Speed of light in effective medium c=c0/sqrt(Ereff); %Length of microstrip TLN for a 360 degree phase shiftL_tln=Lambda % The correction of length delL due to the fringingdelL=0.412*h*((Ereff+0.3)*(W/h+0.264))/((Ereff-0.258)*(W/h+0.8)); % Correct length neededL=Lambda/2-2*delL; %The feed inset required % Calculation of the conductance k0=2*pi/Lambda0; X=k0*W; %Calculation of the integral of sin(x)/x syms t; f=sin(t)./t; SiX=quadl(inline('f'),eps,X); I1=-2+cos(X)+sin(X)./X+X*SiX; G1= I1/(120*(pi^2));Rin0=1/(2*G1); % Use cos^4 dependence y0=(L/pi)*acos((power((Zc/Rin0),0.25))); disp('All the values are in microns'); EreffWidth_trans_line=W_tln/1e-6W_Patch=W/1e-6L_Patch=L/1e-6inset=y0/1e-6 Ex.No. 4:

Measurement techniques of radiation characteristics of an antenna.

Page 9: Lab Manual

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)

II. Axial (End-Fire) Mode

a. Pitch angle alpha (in degrees)

b. Input impedance (ohms)

c. Axial ratio (AR)

d. Relative phase velocity ratio p

e. HPBW (in degrees) (both approximate and numerical)

f. FNNW (in degrees) (both approximate and numerical)

g. Directivity (dimensionless and in dB) (both approximate and numerical)

clear all;close all;fprintf('\n *** NOTICE: This program uses "polar_dB.m" to plot the patterns!\n\n'); %---Choice of output---------------------------------------------fprintf('Output device option: \n\tOption (1): Screen\n\tOption (2): File \n');ERR = 1;while(ERR ~= 0) DEVICE = str2num(input('\nOutput device = ','s')); if(DEVICE == 1) ERR = 0; elseif(DEVICE == 2) FILNAM = input('Input the desired output filename: ','s'); ERR = 0; else fprintf('\nOutputting device number should be either 1 or 2\n'); endend %---Choice of radiation mode--------------ERR = 1;while(ERR ~= 0)

Page 10: Lab Manual

fprintf('\nSELECT RADIATION MODE:\n'); fprintf('----------------------\n'); fprintf('(1) NORMAL MODE\n'); fprintf('(2) AXIAL MODE\n\n'); SELECT_mode = str2num(input('SELECT = ','s')); if or((SELECT_mode == 1), (SELECT_mode == 2)) ERR = 0; endend %---Start of main program--- switch SELECT_mode, case 1%---Normal 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 *** ERROR: The number has to be greater than 0!\n\n'); elseif (N > 10) fprintf('\n *** WARNING: Large turn number may cause multi-lobe!\n\n'); ERR = 0; else ERR = 0; end end %---Input circumference of loops-------------------------------------- ERR = 1; while(ERR ~= 0) fprintf('\n *** NOTICE: For Normal mode, C << lambda.'); fprintf('\n It is recommended that C/lambda <= 1/10.\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)

Page 11: Lab Manual

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; endend %---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');

Page 12: Lab Manual

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 *** ERROR: The number has to be greater than 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');

Page 13: Lab Manual

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; %---Choice of End-Fire mode--------------ERR = 1;while(ERR ~= 0) fprintf('\nSELECT END-FIRE MODE:\n'); fprintf('----------------------\n'); fprintf('(1) ORDINARY END-FIRE\n'); fprintf('(2) HANSEN-WOODYARD END-FIRE\n'); fprintf('(3) END-FIRE (p=1)\n\n'); SELECT_end = str2num(input('SELECT = ','s')); if (SELECT_end== 1)|(SELECT_end == 2)|(SELECT_end == 3) ERR = 0; endend %---Pitch Angle-------alpha=atan(S/C)*180/pi; %---Input Impedence---

Page 14: Lab Manual

R=140*C; %---HPBW(Approximate)----HPBW_app=52/(C*sqrt(N*S)); %---FNBW(Approximate)----FNBW_app=115/(C*sqrt(N*S)); %---Directivity(Approximate)---D_app=15*N*C^2*S;D_app_dB=10*log10(D_app); %---Axial Ratio---AR=(2*N+1)/(2*N); %---Pattern-----L0=sqrt(C^2+S^2);if SELECT_end == 1%---Ordinary end-fire---------- p=L0/(S+1);elseif SELECT_end == 2%---Hansen-Woodyard end-fire---- p=L0/(S+(AR));else%---End-fire (p=1)---- p=1;endkesi=2*pi*(S*cos(theta)-L0/p);U=(sin(pi/(2*N))*cos(theta).*sin(N/2*kesi)./sin(kesi/2)).^2;Umax=max(U);U=U/Umax;Umax=1;U_dB=10*log10(U); %---Numerical results from pattern---if (SELECT_end ~= 3)%---HPBW(From pattern)--------imax=1;HP_dB=(1/sqrt(2));for i=1:length(U) if U(i)<HP_dB HPBW=angle(i)+angle(i-1); break; endend%---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; endendelse%---HPBW(From pattern)--------HP_dB=(1/sqrt(2));[temp,imax]=max(U);end

Page 15: Lab Manual

for i=imax:-1:2 if U(i)<HP_dB HPBW=angle(imax-i)+angle(imax-i+1); break; endend%---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; endendintegrand=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 fprintf(fid,'\n HELIX: HANSEN-WOODYARD END-FIRE MODE:\n');else fprintf(fid,'\n HELIX: END-FIRE MODE (p=1):\n');endfprintf(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)); if (SELECT_end == 1)|(SELECT_end == 2)|(imax == 1)fprintf(fid,'\n\nOutput parameters:\n------------------');fprintf(fid,'\nPitch angle alpha (in degrees) = %6.4f',alpha);fprintf(fid,'\nInput impedance R (ohms)) = %6.4f',R);

Page 16: Lab Manual

fprintf(fid,'\nAxial Ratio AR (dimesionless) = %6.4f',AR);fprintf(fid,'\nRelative phase velocity ratio p = %6.4f',p);fprintf(fid,'\n\nHBPW (in degrees):');fprintf(fid,'\n A. Approximate(10-31) = %6.4f',HPBW_app);fprintf(fid,'\n B. Numerical(from pattern) = %6.4f',HPBW);fprintf(fid,'\n\nFNBW(in degrees):');fprintf(fid,'\n A. Approximate(10-32) = %6.4f',FNBW_app);fprintf(fid,'\n B. Numerical(from pattern) = %6.4f',FNBW);fprintf(fid,'\n\nDirectivity:');fprintf(fid,'\n A1. Approximate(10-33) (dimensionless) = %6.4f',D_app);fprintf(fid,'\n A2. Approximate(10-33) (in dB) = %6.4f',D_app_dB);fprintf(fid,'\n B1. Numerical(from pattern) (dimensionless) = %6.4f',D0);fprintf(fid,'\n B2. Numerical(from pattern) (in dB) = %6.4f',D_dB);fprintf(fid,'\n\n');else fprintf(fid,'\n\n----------------------------------------------------------------------------------\n'); fprintf(fid,'BAD DESIGN! MAXIMUM IS NOT AT 0 DEGREES!\n'); fprintf(fid,'PLEASE SEE THE PLOTTED RADIATION PATTERN FOR DETAILS.\n');endif(DEVICE == 2) fclose(fid);endend

Result: Output device option: Option (1): ScreenOption (2): File

Output device = 1

SELECT RADIATION MODE:----------------------(1) NORMAL MODE(2) AXIAL MODE

SELECT = 1

Input:--------Number of turns N = 5

*** NOTICE: For Normal mode, C << lambda. It is recommended that C/lambda <= 1/10.

Circumference of loops C (in lambda) = .1

*** NOTICE: For Normal mode, S << lambda. It is recommended that S/lambda <= 1/20.

Spacing between turns S (in lambda) = .05

HELIX: NORMAL MODE:

Input parameters:-----------------

Page 17: Lab Manual

Number of turns N = 5Circumference of loops C (in lambda) = 0.1000Spacing between turns S (in lambda) = 0.0500Length (one-turn) L0 (in lambda) = 0.1118Length (5-turn) LN (in lambda) = 0.5590

Output parameters:------------------Pitch angle alpha (in degrees) = 26.5651Axial Ratio AR (dimensionless) = 1.0000HPBW (in degrees) = 50.1000Directivity(approximate) (dimensionless) = 1.5Directivity(approximate) (in dB) = 1.7609Directivity(numerical from pattern) (dimensionless) = 1.7488Directivity(numerical from pattern) (in dB) = 2.4273

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) = ');

Page 18: Lab Manual

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);

Page 19: Lab Manual

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;

Page 20: Lab Manual

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

Page 21: Lab Manual

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 pocklington’s integral equation.integral equations to compute the

A. Current distribution

B. Input impedance

C. Normalized amplitude radiation pattern

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

Page 22: Lab Manual

used in both formulations. In addition, magnetic-frill generator is available in the Pocklington's integral equation.

Pocklington's integral equation

**Input parameters:

1. TL = total length of the dipole (in wavelengths)

2. a = radius of the wire (in wavelengths)

3. NM = total number of subsections (must be an odd integer)

4. IEX = option to use either magnetic-frill

generator or delta-gap feed

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) filename=input('INPUT THE DESIRED OUTPUT FILENAME <in single quotes> = ','s'); endend%*********************************************************%*** READING OPTION # : 1 ---> POCKLINGTON'S EQUATIONS %*********************************************************disp('CHOICE OF POCKLINGTON''S OR HALLEN''S EQN.');disp(' OPTION (1):POCKLINGTON''S EQN.');nmax=200;nmt=2*nmax-1;cgaw=zeros(nmax);cga=cgaw(1,1:nmax);zmnw=zeros(nmt);

Page 23: Lab Manual

zmn=zmnw(1,1:nmt);waw=zeros(nmt);wa=waw(1,1:nmt);etm=zeros(361);etmm=etm(1,1:361);pi=3.14159265;rad=pi/180;beta=2.0*pi;eta=120*pi;%******************************************************%*** INPUT DATA%******************************************************nm=input('NUMBER OF SUBDIVISIONS <ODD NUMBER> =');tl=input('TOTAL DIPOLE LENGTH <WAVELENGTHS> =');ra=input('RADIUS OF DIPOLE <WAVELENGTHS> =');%*********************************************************%*** EXITATION OPTION # : 1 ---> MAGNETIC-FRILL% 2 ---> DELTA-GAP%**********************************************************disp('EXCITATION :');disp(' OPTION (1):MAGNETIC-FRILL');disp(' OPTION (2):DELTA-GAP');iex=input('OPTION NUMBER :');hl=tl/2;nmh=0.5*(nm+1);dz=2*hl/nm;zm=hl-0.5*dz;b=0.5*dz;a=-0.5*dz;n=79;hd=(b-a)/(n+1); for I = 1: nm zn=hl-(I-0.5)*dz; za1=zn-zm+a; %****************************************************************** % FAST ALGORITHM FORM OF THE SIMPSON'S INTEGRAL ROUTINE %****************************************************************** recgp=sqrt(ra*ra+za1*za1); cgp1=exp(-j*beta*recgp)*((1.0+j*beta*recgp)*(2.0*recgp*recgp-3.0*ra*ra)+(beta*ra*recgp)^2)/(2.0*beta*recgp^5); zb1=zn-zm+b; roc=sqrt(ra*ra+zb1*zb1); cgp2=exp(-j*beta*roc)*((1.0+j*beta*roc)*(2.0*roc*roc-3.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*r-3.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

Page 24: Lab Manual

end crt=crt*hd*0.33333; zmn(I)=crt; if I~=1 zmn(nm+I-1)=crt; endendrb=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

Page 25: Lab Manual

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 endcga=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%******************************************************

Page 26: Lab Manual

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; endamax=etmm(1);for i=2:181 if etmm(i)>=amax amax=etmm(i); endendfor 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 vs OBSERVATION ANGLE THETA\n');fprintf(pok,'THETA (in degrees) MAGNITUDE(in dB)\n'); 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 Plotetmm1=[etmm(1:181),fliplr(etmm(1:180))];q=polar_dB([0:360],etmm1,-40,0,4,'-');set(q,'linewidth',1.5);

Page 27: Lab Manual

title('RADIATION PATTERN vs OBSERVATION ANGLE')for i=182:361 xi=i-1; table4=[xi,etmm(362-i)]; fprintf(pok,'%3.1f %3.3f \n',table4);end % 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];

Page 28: Lab Manual

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 Plotpattrn=[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 \n',table2);endfclose(hel); % OUTPUT FILE%*******************************************if(option_a==2) diary(filename);end%*******************************************% FORMAT STATEMENTS %******************************************* disp(sprintf('\n\n\n\n\n\n\n\n'));disp(strvcat('WIRE ANTENNA PROBLEM','================'));if (option==1)&(iex==1) disp(sprintf('POCKLINGTON''S EQUATION AND MAGNETIC FRILL MODEL'));elseif (option==1)&(iex==2) disp(sprintf('POCKLINGTON''S EQUATION AND DELTA GAP MODEL'));enddisp(sprintf('\nLENGTH = %4.4f (WLS)',tl));disp(sprintf('RADIUS OF THE WIRE = %4.4f (WLS)',ra));disp(sprintf('NUMBER OF SUBSECTIONS = %2.2f\n',nm));ZR=real(zin);ZI=imag(zin);if ZI>0 output=sprintf('INPUT IMPEDANCE: Z= %5.1f +j %5.1f (OHMS)\n',ZR,ZI);else output=sprintf('INPUT IMPEDANCE: Z= %5.1f -j %5.1f (OHMS)\n',ZR,abs(ZI));enddisp(output);disp(strvcat('*** NOTE:',... ' THE DIPOLE CURRENT DISTRIBUTION IS STORED IN Curr-MoM_m.dat',... ' THE AMPLITUDE RADIATION PATTERN IS STORED IN Patt-MoM_m.dat',...

Page 29: Lab Manual

' ========================================================='));diary off;warning off;