surrogate optimization of six-凯发k8网页登录
this example shows how to optimize an antenna design using the surrogate optimization solver. the radiation patterns of antennas depend sensitively on the parameters that define the antenna shapes. typically, the features of a radiation pattern have multiple local optima. to calculate a radiation pattern, this example uses antenna toolbox™ functions.
a yagi-uda antenna is a widely used radiating structure for a variety of applications in commercial and military sectors. this antenna can receive tv signals in the vhf-uhf range of frequencies [1]. the yagi-uda is a directional traveling-wave antenna with a single driven element, usually a folded dipole or a standard dipole, which is surrounded by several passive dipoles. the passive elements form the reflector and director. these names identify the positions relative to the driven element. the reflector dipole is behind the driven element, in the direction of the back lobe of the antenna radiation. the director dipole is in front of the driven element, in the direction where a main beam forms.
design parameters
specify the initial design parameters in the center of the vhf band [2].
freq = 165e6;
wirediameter = 19e-3;
c = physconst('lightspeed');
lambda = c/freq;
create yagi-uda antenna
the driven element for the yagi-uda antenna is a folded dipole, a standard exciter for this type of antenna. adjust the length and width parameters of the folded dipole. because cylindrical structures are modeled as equivalent metal strips, calculate the width using the cylinder2strip
utility function available in the antenna toolbox™. the length is at the design frequency.
d = dipolefolded; d.length = lambda/2; d.width = cylinder2strip(wirediameter/2); d.spacing = d.length/60;
create a yagi-uda antenna with the exciter as the folded dipole. set the lengths of the reflector and director elements to be . set the number of directors to four. specify the reflector and director spacing as and , respectively. these settings provide an initial guess and serve as a starting point for the optimization procedure. show the initial design.
numdirs = 4; reflength = 0.5; dirlength = 0.5*ones(1,numdirs); refspacing = 0.3; dirspacing = 0.25*ones(1,numdirs); initialdesign = [reflength dirlength refspacing dirspacing].*lambda; yagidesign = yagiuda; yagidesign.exciter = d; yagidesign.numdirectors = numdirs; yagidesign.reflectorlength = reflength*lambda; yagidesign.directorlength = dirlength.*lambda; yagidesign.reflectorspacing = refspacing*lambda; yagidesign.directorspacing = dirspacing*lambda; show(yagidesign)
plot radiation pattern at design frequency
prior to executing the optimization process, plot the radiation pattern for the initial guess in 3-d.
fig1 = figure; pattern(yagidesign,freq);
this antenna does not have a higher directivity in the preferred direction, at zenith (elevation = 90 deg). this initial yagi-uda antenna design is a poorly designed radiator.
set up optimization
use the following variables as control variables for the optimization:
reflector length (1 variable)
director lengths (4 variables)
reflector spacing (1 variable)
director spacings (4 variables)
in terms of a single vector parameter parasiticvals
, use these settings:
reflector length =
parasiticvals(1)
director lengths =
parasiticvals(2:5)
reflector spacing =
parasiticvals(6)
director spacings =
parasiticvals(7:10)
in terms of parasiticvals
, set an objective function that aims to have a large value in the 90-degree direction, a small value in the 270-degree direction, and a large value of maximum power between the elevation beamwidth angle bounds.
type yagi_objective_function2.m
function objectivevalue = yagi_objective_function2(y,parasiticvals,freq,elang) % yagi_objective_function2 returns the objective for a 6-element yagi % objective_value = yagi_objective_function(y,parasiticvals,freq,elang) % assigns the appropriate parasitic dimensions, parasiticvals, to the yagi % antenna y, and uses the frequency freq and angle pair elang to calculate % the objective function value. % the yagi_objective_function2 function is used for an internal example. % its behavior might change in subsequent releases, so it should not be % relied upon for programming purposes. % 凯发官网入口首页 copyright 2014-2018 the mathworks, inc. bw1 = elang(1); bw2 = elang(2); y.reflectorlength = parasiticvals(1); y.directorlength = parasiticvals(2:y.numdirectors 1); y.reflectorspacing = parasiticvals(y.numdirectors 2); y.directorspacing = parasiticvals(y.numdirectors 3:end); output = calculate_objectives(y,freq,bw1,bw2); output = output.maxdirectivity output.fb; objectivevalue= -output; % to maximize end function output = calculate_objectives(y,freq,bw1,bw2) �lculate_objectives calculate the objective function % output = calculate_objectives(y,freq,bw1,bw2) calculate the directivity % in az = 90 plane that covers the main beam, sidelobe and backlobe. % calculate the maximum directivity, sidelobe level and backlobe and store % in fields of the output variable structure. [es,~,el] = pattern(y,freq,90,0:1:270); el1 = el < bw1; el2 = el > bw2; el3 = el>bw1&el
set bounds on the control variables.
reflengthbounds = [0.4; 0.6]; dirlengthbounds = [0.35 0.35 0.35 0.35; % lower bound on director length 0.495 0.495 0.495 0.495]; % upper bound on director length refspacingbounds = [0.05; % lower bound on reflector spacing 0.30]; % upper bound on reflector spacing dirspacingbounds = [0.05 0.05 0.05 0.05; % lower bound on director spacing 0.23 0.23 0.23 0.23]; % upper bound on director spacing lb = [reflengthbounds(1) dirlengthbounds(1,:) refspacingbounds(1) dirspacingbounds(1,:) ].*lambda; ub = [reflengthbounds(2) dirlengthbounds(2,:) refspacingbounds(2) dirspacingbounds(2,:) ].*lambda;
set the initial point for the optimization, and set the elevation beamwidth angle bounds.
parasitic_values = [ yagidesign.reflectorlength, ... yagidesign.directorlength, ... yagidesign.reflectorspacing ... yagidesign.directorspacing]; elang = [60 120]; % elevation beamwidth angles at az = 90
surrogate optimization
to search for a global optimum of the objective function, use surrogateopt
as the solver. set options to allow 500 function evaluations, include the initial point, use parallel computation, and use the 'surrogateoptplot'
plot function. to understand the 'surrogateoptplot'
plot, see ..
surrogateoptions = optimoptions('surrogateopt','maxfunctionevaluations',500,... 'initialpoints',parasitic_values,'useparallel',true,'plotfcn','surrogateoptplot'); rng(4) % for reproducibility optimdesign = surrogateopt(@(x) yagi_objective_function2(yagidesign,x,freq,elang),... lb,ub,surrogateoptions);
surrogateopt stopped because it exceeded the function evaluation limit set by 'options.maxfunctionevaluations'.
surrogateopt
found a point giving an objective function value of –70. investigate the effect of the optimized parameters on the radiation pattern of the antenna.
plot optimized pattern
plot the optimized antenna pattern at the design frequency.
yagidesign.reflectorlength = optimdesign(1); yagidesign.directorlength = optimdesign(2:5); yagidesign.reflectorspacing = optimdesign(6); yagidesign.directorspacing = optimdesign(7:10); fig2 = figure; pattern(yagidesign,freq)
apparently, the antenna now radiates significantly more power at zenith.
e-plane and h-plane cuts of pattern
to obtain a better insight into the behavior in two orthogonal planes, plot the normalized magnitude of the electric field in the e-plane and h-plane, that is, azimuth = 0 and 90 deg, respectively.
fig3 = figure; pattern(yagidesign,freq,0,0:1:359);
fig4 = figure; pattern(yagidesign,freq,90,0:1:359);
the optimized design shows a significant improvement in the radiation pattern. higher directivity is achieved in the desired direction toward zenith. the back lobe is small, resulting in a good front-to-back ratio for this antenna. calculate the directivity at zenith, front-to-back ratio, and beamwidth in the e-plane and h-plane.
d_max = pattern(yagidesign,freq,0,90)
d_max = 10.2145
d_back = pattern(yagidesign,freq,0,-90)
d_back = -48.1770
f_b_ratio = d_max - d_back
f_b_ratio = 58.3915
eplane_beamwidth = beamwidth(yagidesign,freq,0,1:1:360)
eplane_beamwidth = 54
hplane_beamwidth = beamwidth(yagidesign,freq,90,1:1:360)
hplane_beamwidth = 68
comparison with manufacturer datasheet
the optimized yagi-uda antenna achieves a forward directivity of 10.2 dbi, which translates to 8.1 dbd (relative to a dipole). this result is a bit less than the gain value reported by the datasheet in reference [2] (8.5 dbd). the front-to-back ratio is 60 db; this is part of the quantity that the optimizer maximizes. the optimized yagi-uda antenna has an e-plane beamwidth of 54 deg, whereas the datasheet lists the e-plane beamwidth as 56 deg. the h-plane beamwidth of the optimized yagi-uda antenna is 68 deg, whereas the value on the datasheet is 63 deg. the example does not address impedance matching over the band.
tabulating initial and optimized design
tabulate the initial design guesses and the final optimized design values.
yagiparam= {'reflector length'; 'director length - 1'; 'director length - 2'; 'director length - 3'; 'director length - 4'; 'reflector spacing'; 'director spacing - 1'; 'director spacing - 2';'director spacing - 3'; 'director spacing - 4'}; initialdesign = initialdesign'; optimdesign = optimdesign'; t = table(initialdesign,optimdesign,'rownames',yagiparam)
t=10×2 table
initialdesign optimdesign
_____________ ___________
reflector length 0.90846 0.92703
director length - 1 0.90846 0.71601
director length - 2 0.90846 0.7426
director length - 3 0.90846 0.68847
director length - 4 0.90846 0.75779
reflector spacing 0.54508 0.3117
director spacing - 1 0.45423 0.28684
director spacing - 2 0.45423 0.23237
director spacing - 3 0.45423 0.21154
director spacing - 4 0.45423 0.27903
reference
[1] balanis, c. a. antenna theory: analysis and design. 3rd ed. new york: wiley, 2005, p. 514.
[2] online at: