% % Tutorials / horn antenna % % Describtion at: % http://openems.de/index.php/Tutorial:_Horn_Antenna % % Tested with % - Matlab 2011a / Octave 3.4.3 % - openEMS v0.0.27 % % (C) 2011,2012 Thorsten Liebig close all clear clc %% setup the simulation physical_constants; unit = 1e-3; % all length in mm % horn width in x-direction horn.width = 20; % horn height in y-direction horn.height = 30; % horn length in z-direction horn.length = 50; horn.feed_length = 50; horn.thickness = 2; % horn opening angle in x, y horn.angle = [20 20]*pi/180; % size of the simulation box SimBox = [200 200 200]; % frequency range of interest f_start = 10e9; f_stop = 20e9; % frequency of interest f0 = 15e9; %waveguide TE-mode definition m = 1; n = 0; %% mode functions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % by David M. Pozar, Microwave Engineering, third edition, page 113 freq = linspace(f_start,f_stop,201); a = horn.width; b = horn.height; k = 2*pi*freq/c0; kc = sqrt((m*pi/a/unit)^2 + (n*pi/b/unit)^2); fc = c0*kc/2/pi; %cut-off frequency beta = sqrt(k.^2 - kc^2); %waveguide phase-constant ZL_a = k * Z0 ./ beta; %analytic waveguide impedance % mode profile E- and H-field x_pos = ['(x-' num2str(a/2) ')']; y_pos = ['(y-' num2str(b/2) ')']; func_Ex = [num2str( n/b/unit) '*cos(' num2str(m*pi/a) '*' x_pos ')*sin(' num2str(n*pi/b) '*' y_pos ')']; func_Ey = [num2str(-m/a/unit) '*sin(' num2str(m*pi/a) '*' x_pos ')*cos(' num2str(n*pi/b) '*' y_pos ')']; func_Hx = [num2str(m/a/unit) '*sin(' num2str(m*pi/a) '*' x_pos ')*cos(' num2str(n*pi/b) '*' y_pos ')']; func_Hy = [num2str(n/b/unit) '*cos(' num2str(m*pi/a) '*' x_pos ')*sin(' num2str(n*pi/b) '*' y_pos ')']; disp([' Cutoff frequencies for this mode and wavguide is: ' num2str(fc/1e9) ' GHz']); if (f_start