global optimization techniques in computational electromagnetics zbyněk raida dept. of radio...
TRANSCRIPT
Global Optimization Techniquesin Computational Electromagnetics
Zbyněk Raida
Dept. of Radio ElectronicsBrno University of TechnologyBrno, Czechia
Outline
• What does the optimization mean
• Classification of optimization tasks- single-objective versus multi-objective- local versus global
• Genetic optimization vs. particle swarm one
• Local tuning of global solutions
• An example
Global optimization techniques …ITSS 2007, Pforzheim
Optimizationdefinition
• Searching for such values of state variables to meet desired parameters as close as possible
ITSS 2007, Pforzheim
32.3
45.026.0
21.1
38.3 16.9
22.3
24.8
Global optimization techniques …
Optimizationobjective function (1)
• Deviation of the actual parameters of the system from the desired ones
4
111 ,
nnfsF xx
ITSS 2007, Pforzheim Global optimization techniques …
Optimizationobjective function (2)
0.5 1.0 1.5 2.0 2.5 3.0f [GHz]
computedmeasured
S11[dB]
-10
-15
-20
-25
-30
ITSS 2007, Pforzheim Global optimization techniques …
More objectivespolarization purity (1)
ČÁP, A., RAIDA, Z., HERAS PALMERO, E., LAMADRID RUIZ, R. Multi-band planar antennas: a comparative study. Radioengineering, 2005, vol. 14, no. 4, p. 11–20.
ITSS 2007, Pforzheim Global optimization techniques …
More objectivespolarization purity (2)
RAIDA, Z., HERAS PALMERO, E., LAMADRID RUIZ, R. Four-band patch antenna with U-shaped notches. In Proc. of the16th international Conference on Microwaves, Radar and Wireless Communications MIKON 2006. Krakow (Poland), 2006, pp. 111–114.
ITSS 2007, Pforzheim
a) b) c)
d)
Global optimization techniques …
More objectivesdirectivity patterns (1)
ITSS 2007, Pforzheim Global optimization techniques …
More objectivesdirectivity patterns (2)
More objectivesmulti-objective formulation
4
1
0,,n
nhormaxD fEEF xx
4
111 ,
nnS fsF xx
4
1
90
90
,,n m
mnvertP fEF xx
ITSS 2007, Pforzheim
F
F
2
F
13
S
P
D
Global optimization techniques …
Multi-objective optimizationtwo approaches min F ( x)S
min F ( x)D
min F ( x)P
multi-objectiveoptimizer
trade-offsolutions
higher-levelinformation
choose onesolution
min F ( x)S
min F ( x)D
min F ( x)P
single-object.optimizer
higher-levelinformation
one optimumsolution
estim. relative
S
importance
D
vector
P[w , w , w ]
single-object.optimization
F = w F + w F + w F
S
D P
S
D P
ITSS 2007, Pforzheim Global optimization techniques …
Searching for a minimumglobal versus local methods
ITSS 2007, Pforzheim
f(x)
x
startingpoint
global local
Global optimization techniques …
Global methodsgenetic algorithms (1)
mm00.9mm,00.1Amm050.0mm,001.0B
2.2,0.2,6.1,0.1r mm5.1mm,0.1h
GHz30f
ITSS 2007, Pforzheim Global optimization techniques …
Global methodsgenetic algorithms (2)
initial populationquality evaluation
selection
ITSS 2007, Pforzheim
Global methodsgenetic algorithms (3)
crossover
mutation
ITSS 2007, Pforzheim Global optimization techniques …
function x = main( G, I, pc, pm)
% x(1)= A, x(2)= B, x(3)= h, x(4)= eps
load dip_616; % loading neural model
Rd = 200.0; % desired input resistanceXd = 0.0; % desired input reactancebit = [ 8 8 1 2]; % bits per A, B, h, epsgeb = norm( bit, 1) + 1; % bits in chromosome
gen = round( rand( I, geb-1)); % 1st generationfor g=1:G X = decode( I, bit, gen); % chromosome to A,B,h,eps Z = Tmax * sim( net, X'); % analysis gen(:,geb) = ((Rd-Z(1,:)).^2 + (Xd-Z(2,:)).^2; e(g) = min( gen( :,geb)); % minimum error [val,ind] = min( gen( :,geb)); x = X( ind, :); % best parameters gen = decim( gen, pc, pm, I, geb);end
plot( e);
Global methodsgenetic algorithms (5)
0 5 10 15 20 25 30 35 40 iter.0
500
1000
1500
2000
2500
cost[ ]2
Global methodsgenetic algorithms (6)
cost [2]
A [mm]
B [mm]
h [mm]
eps [ – ]
Rin []
Xin []
19 836 7.469 0.008 1.0 2.2 61.0 22.7
20 650 3.875 0.035 1.5 2.0 67.2 –54.9
402 5.156 0.026 1.5 1.0 183.3 –11.1
99 5.188 0.032 1.0 1.0 190.8 3.8
50 generations, 20 individuals, 90 % crossover, 10 % mutation, population decimation
ITSS 2007, Pforzheim Global optimization techniques …
Global methodsparticle swarm optimization (1)
ROBINSON, J., RAHMAT-SAMII, Y. Particle swarm optimization in electromagnetics. IEEE Transactions on Antennas and Propagation. 2004, vol. 52, no. 2, p. 397–407.
ITSS 2007, Pforzheim Global optimization techniques …
Global methodsPSO (2)
Tnnnnn hBA x
nnnnnn rcrcw xgxpvv 2211
nnn t vxx x
x
1
2
p2
g2
2
1
p11
ITSS 2007, Pforzheim
Global methodsparticle swarm optimization (3)
absorbing reflecting invisible
ITSS 2007, Pforzheim
x
x
2
1
x
x
2
1
x
x
2
1
Global optimization techniques …
function out = main( G, I)
% x(1)= A, x(2)= B, x(3)= h, x(4)= eps
load dip_616; % loading antenna model
Rd = 200; % required input resistanceXd = 0; % required input reactance
dt = 0.1; % time stepc1 = 1.49; % personal scaling factorc2 = 1.49; % global scaling factor
x = zeros( I, 5); % agents’ positionp = zeros( I, 5); % personal best
for n=1:I x(n,1) = 1.000 + 8.000*rand(); p(n,1) = x(n,1); x(n,2) = 0.001 + 0.049*rand(); p(n,2) = x(n,2); x(n,3) = 1.0 + 0.5 * rand(); p(n,3) = x(n,3); x(n,4) = 1.0 + 1.2 * rand(); p(n,4) = x(n,4); p(n,5) = 1e+6;end
v = rand( I, 4); % agent velocityg = zeros( 1, 4); % global beste = zeros( G+1, 1); e(1) = 1e+6;
for m=1:G % +++ MAIN ITERATION LOOP +++
w = 0.5*(G-m)/G + 0.4; % inertial weight Z = Tmax * sim( net, x(:,1:4)'); % impedance of agents x(:,5) = ((Rd-Z(1,:)).^2 + (Xd-Z(2,:)).^2 [e(m+1),ind] = min( x( :,5)); % the lowest error
if e(m+1)<e(m) g = x( ind, 1:4); % the global best end
for n=1:I if x(n,5)<p(n,5) % the personal best p(n,:) = x(n,:); end v(n,:) = w*v(n,:) + c1*rand()*( p(n,1:4)-x(n,1:4)); v(n,:) = v(n,:) + c2*rand()*( g(1,1:4)-x(n,1:4)); x(n,1:4) = x(n,1:4) + dt*v(n,:); if x(n,1) > 9.00, x(n,1)=9.00; end % absorbing walls if x(n,2) > 0.05, x(n,2)=0.05; end if x(n,3) > 1.5, x(n,3)=1.5; end if x(n,4) > 2.2, x(n,4)=2.2; end end
end
Global methodsparticle swarm optimization (5)
iter.
cost
0 10 20 30 400
1
2
3
4
5
6
7
[ 10 ]25
Global methodsPSO (6)
cost [2]
A [mm]
B [mm]
h [mm]
eps [ – ]
Rin []
Xin []
534 5.481 0.050 1.46 1.57 176.9 -0.1
2 288 5.794 0.050 1.46 1.69 152.2 1.7
154 5.333 0.050 1.44 1.50 187.6 -0.5
21 5.406 0.050 1.48 1.54 196.7 3.2
50 iterations, 20 agents, c1 = c2 = 1.49, w = 0.9 -> 0.4, absorbing walls
ITSS 2007, Pforzheim Global optimization techniques …
Searching for a minimumglobal first, local later
ITSS 2007, Pforzheim
f(x)
x
startingpoint
global local
Global optimization techniques …
Searching for a minimumglobal first, local later
ITSS 2007, Pforzheim
f(x)
x
startingpoint
globallocal methodmethod
Global optimization techniques …
Local minimizationgeneral algorithm (1)
1. Testing convergence. If the actual estimate of the optimum xk is accurate enough, then the algorithm is terminated. Otherwise, go to 2.
2. Computing search direction. Estimate the best direction pk moving the actual estimate of the optimum xk towards the optimum.
ITSS 2007, Pforzheim Global optimization techniques …
Local minimizationgeneral algorithm (2)
3. Computing step length. Estimate scalar k ensuring the significant decrease of the value of the objective function: F(xk + kpk) < F(xk)
4. Updating the estimate of the minimum. Setxk+1 xk + k pk, k k + 1. Go back to 1.
ITSS 2007, Pforzheim Global optimization techniques …
Testing algorithmsRosenbrock function
21
221221 1100, xxxxxF
function F = rosenbrock( x)
F = 100*( x(2,1) - x(1,1)^2)^2 +... ( 1 - x(1,1))^2;
ITSS 2007, Pforzheim Global optimization techniques …
Steepest descentanalytical approach
kk gp kkkk gxx 1
function sda( alpha)
M = 10000;x = [ -1; +1];
for m=1:M g(1,1) = -400*x(1,1)*( x(2,1)-x(1,1)^2)-2*(1-x(1,1)); g(2,1) = 200*( x(2,1) - x(1,1)^2); x = x - alpha*g; out(m,:) = x';end
1k
ITSS 2007, Pforzheim Global optimization techniques …
Steepest descentnumerical approach
function sdn( h)
M = 10000; alpha = 1e-3;x = [ -1; +1];
for m=1:M X1(1,1) = rosenbrock( [x(1,1) + h/2; x(2,1)]); X1(2,1) = rosenbrock( [x(1,1) - h/2; x(2,1)]); X2(1,1) = rosenbrock( [x(1,1); x(2,1) + h/2]); X2(2,1) = rosenbrock( [x(1,1); x(2,1) - h/2]); g(1,1) = (X1(1,1) - X1(2,1)) / h; g(2,1) = (X2(1,1) - X2(2,1)) / h; x = x - alpha*g; out(m,:) = x';end
ITSS 2007, Pforzheim Global optimization techniques …
Newton methoddirection, step
pGppgpx kkkk FF T21T
kkk gGp 1
kkkk gGxx
11
x
y
x x x012
ITSS 2007, Pforzheim Global optimization techniques …
Newton methodcode
function newton( x1, x2)
M = 10;x = [ x1; x2];
for m=1:M g(1,1) = -400*x(1,1)*(x(2,1)-x(1,1)^2)-2*(1-x(1,1)); g(2,1) = 200*( x(2,1) - x(1,1)^2); H(1,1) = 1200*x(1,1)^2 - 400*x(2,1) + 2; H(1,2) = -400*x(1,1); H(2,1) = -400*x(1,1); H(2,2) = 200; x = x - inv( H)*g; out(m,:) = x'end
ITSS 2007, Pforzheim Global optimization techniques …
Steepest descent vs. Newtoncomparison
Steepest descent Newton method
• Properly chosen step length k
• Step length k = 1 all the time
• Convergence for Rosenbrock: 7000 steps
• Convergence for Rosenbrock: 3 steps
ITSS 2007, Pforzheim Global optimization techniques …
ExampleGPS wire antenna
• Operation in frequency bands:– L1: central frequency fL1 = 1 575.4 MHz
– L2: central frequency fL2 = 1 227.6 MHz
• Omni-directional constant gain for the elevation from 5° to 90°
• Right-hand circular polarization
ITSS 2007, Pforzheim Global optimization techniques …
GPS wire antennaGA v. PSO (1)
a)
iterations
F
b)
iterations
F
LUKEŠ, Z., RAIDA, Z. Multi-objective optimiza-tion of wire antennas: genetic algorithms versus particle swarm optimization. Radioengineering, 2005, vol. 14, no. 4, p. 91–97.
ITSS 2007, Pforzheim Global optimization techniques …
a)
GPS wire antennaGA v. PSO (2) b)
LUKEŠ, Z., RAIDA, Z. Multi-objective optimiza-tion of wire antennas: genetic algorithms versus particle swarm optimization. Radioengineering, 2005, vol. 14, no. 4, p. 91–97.
ITSS 2007, Pforzheim Global optimization techniques …
a)
GPS wire antennaGA v. PSO (3)
LUKEŠ, Z., RAIDA, Z. Multi-objective optimiza-tion of wire antennas: genetic algorithms versus particle swarm optimization. Radioengineering, 2005, vol. 14, no. 4, p. 91–97.
b)
ITSS 2007, Pforzheim Global optimization techniques …
Z
a)
f[MHz]
GPS wire antennaGA v. PSO (4)
LUKEŠ, Z., RAIDA, Z. Multi-objective optimiza-tion of wire antennas: genetic algorithms versus particle swarm optimization. Radioengineering, 2005, vol. 14, no. 4, p. 91–97.
f[MHz]
Z
b)
ITSS 2007, Pforzheim Global optimization techniques …
GPS wire antennaGA v. PSO (5)
a)
b)
a)
b)
Conclusions
• Multi-objective optimization:a complex view on the structure
• Global optimization:perspective designs of a structure
• Local optimization:tuning of a relatively good design
ITSS 2007, Pforzheim Global optimization techniques …