More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation...
Transcript of More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation...
![Page 1: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/1.jpg)
Lecture Set 1B
More Basic ToolsMore Basic Tools
S.D. Sudhoff
Spring 2010
1
![Page 2: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/2.jpg)
Outline
• Time Domain Simulation (ECE546, MA514)• Basic Methods for Time Domain Simulation• MATLAB• ACSL
• Single and Multi-Objective Optimization (ECE580) (ECE580) • GOSET (ECE 695; Electromechanical and
Electromechanical Component Design)
2
![Page 3: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/3.jpg)
Manual Design Approach
Analysis
Design -0.02
0
0.02
0.04
0.06
0.08
Flux Density B/m2
y,m
Design Equations
NumericalAnalysis
DesignRevisions
FinalDesign
-0.1 -0.05 0 0.05 0.1
-0.08
-0.06
-0.04
x,m
3
![Page 4: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/4.jpg)
Evolutionary Design Approach
Evolutionary Environment
Fitness Function
DetailedAnalysis
4
![Page 5: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/5.jpg)
Optimization Based Design
• Pose Design Problem As An Optimization Problem• Can be single or multi-objective
• Systematically encode design constraints and objectives into fitness functions
• Reality Check: Problem Properties Not Always Friendly• Reality Check: Problem Properties Not Always Friendly• Not differentiable
• Not convex
• Many local extrema
• No unique global optimum
5
![Page 6: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/6.jpg)
Optimization Methods
• Classic Methods• Newton’s Method• Gradient Methods • Conjugate Direction Methods• Quasi-Newton Methods• Nedler-Mead Simplex Method
• Populations Based Methods• Populations Based Methods• Monte-Carlo• Population Based Classical Methods • Genetic Algorithms• Swarm Algorithms
6
![Page 7: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/7.jpg)
Newton’s Method (1/4)
7
![Page 8: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/8.jpg)
Newton’s Method (2/4)
8
![Page 9: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/9.jpg)
Newton’s Method (3/4)
9
![Page 10: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/10.jpg)
Newton’s Method (4/4)
10
![Page 11: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/11.jpg)
What Are Genetic Algorithms?
• Genetic algorithms are optimization algorithm inspired from natural selection and genetics
• A candidate solution is referred to as an individual• Process
• Parent individuals generate offspring individuals• Parent individuals generate offspring individuals• The resultant offspring are evaluated for their
fitness• The fittest offspring individuals survive and
become parents • The process is repeated
11
![Page 12: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/12.jpg)
Comparing GAs and Traditional Methods
12
![Page 13: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/13.jpg)
Canonical GA
• The canonical genetic algorithm refers to the GA proposed by John Holland in 1965
START
Initialization
END
STOP?
Fitness evaluation
Selection
Crossover
Mutation
13
![Page 14: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/14.jpg)
Introduction to GOSET
• GOSET stands for Genetic Optimization System Engineering Tool
• GOSET is a MATLAB based genetic • GOSET is a MATLAB based genetic algorithm toolbox for solving optimization problems
• Available at: https://engineering.purdue.edu/ECE/Research/Areas/PEDS 14
![Page 15: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/15.jpg)
Algorithm Execution
START
Initialization
Diversity control SelectionScaling
END
STOP?
Fitness evaluation
Mating & Crossover
&Death
Mutation
Report PlotRandom searchElitism
Migration
15
![Page 16: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/16.jpg)
Data Structures
To conveniently process the information used in GOSET, the following data structures are employed
Data structure
ContentsNo. of fieldsstructure
Contentsfields
P Population 15
GAP GA Parameters 86
GAS GA Statistics 6
16
![Page 17: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/17.jpg)
Population Data Structure (P)
P.blckeval Block evaluation flag
P.fithandle Handle to the fitness function
P.size The number of individuals in the populationpopulation
P.nobj Number of objectives
P.mfit Fitness function values (# obj. by pop. size)
P.fit Aggregated fitness function values (1 by pop. size)
P.eval Fitness evaluation flag
P.age Age of individuals 17
![Page 18: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/18.jpg)
Population Data Structure (P)
P.ngenes Number of genes in an individual
P.min Minimum value of genes (# genes by 1)
P.max Maximum value of genes (# genes by 1)
P.type Types of genes
P.chrom_id Chromosome ID of genes (for multiple P.chrom_id Chromosome ID of genes (for multiple chromosome)
P.normgene Normalized gene values (# genes by pop. size)
P.gene Gene values (# genes by pop. size)
18
![Page 19: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/19.jpg)
Population Data Structure (P)
P.region Geographic region of individuals
P.pen Fitness weight values for penalizing in the diversity control
19
![Page 20: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/20.jpg)
• P.type (# genes by 1)• Determine the mapping method of the
normalized gene value to its actual value
• There are three different types of mapping
Encoding
Integer
0
1
min
max
Logarithmic
0
1
min
max
Real
min
max
0
1
20
![Page 21: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/21.jpg)
Chromosome ID
a b c d e f gGiven the genes of an individual
P.chrom_id = [ 1 1 1 1 1 1 1 ]T
Chromosome structureP.chrom_id Chromosome structureP.chrom_id
11P.chrom_id = [ 1 1 1 1 1 1 1 ]T
P.chrom_id = [ 1 1 1 2 2 3 3 ]T
P.chrom_id = [ 1 2 3 2 2 3 1 ]T
d e
2f g
3a b c
1
a g
1b d e
2c f
3
a b c d e f g
1a b c d e f g
1
21
![Page 22: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/22.jpg)
Genetic Algorithm Parameters (GAP)
Category Field names
Fundamental parameters GAP.fp_ngen GAP.fp_ipop GAP.fp_npop GAP.fp_nobj GAP.fp_obj
Diversity control parameters GAP.dc_act GAP.dc_alg GAP.dc_spc GAP.dc_mnt GAP.dc_mxt GAP.dc_ntr GAP.dc_mnb GAP.dc_mxb GAP.dc_dc GAP.dc_nt
Selection algorithm parameters GAP.sl_alg GAP.sl_nts GAP.sl_cah
Death algorithm parameters GAP.dt_alg GAP.dt_nts GAP.dt_cah
Mating and crossover parameters GAP.mc_pp GAP.mc_fc GAP.mc_alg GAP.mc_gac GAP.mc_ec
Mutation parameters GAP.mt_ptgm0 GAP.mt_prgm0 GAP.mt_srgm0 GAP.mt_pagm0 GAP.mt_sagm0 GAP.mt_prvm0 GAP.mt_srvm0 GAP.mt_pavm0 GAP.mt_savm0 GAP.mt_pigm0
GAP.mt_ptgmf GAP.mt_prgmf GAP.mt_srgmf GAP.mt_pagmf GAP.mt_sagmf GAP.mt_prvmf GAP.mt_srvmfGAP.mt_pavmfGAP.mt_savmfGAP.mt_pigmf
22
GAP.mt_pavmfGAP.mt_savmfGAP.mt_pigmf
Migration parameters GAP.mg_nreg GAP.mg_tmig GAP.mg_pmig
Evaluation Parameters GAP.ev_bev GAP.ev_are GAP.ev_ssd
Scaling parameters GAP.sc_alg GAP.sc_kln GAP.sc_cst GAP.sc_kmxq GAP.sc_kmnq
Gene repair GAP.gr_alg
Elitism parameters GAP.el_act GAP.el_fgs GAP.el_fpe
Random search parameters GAP.rs_fgs GAP.rs_fps GAP.rs_srp GAP.rs_sap GAP.rs_frp GAP.rs_fea
Reporting parameters GAP.rp_lvl GAP.rp_gbr GAP.rp_crh
Objective plot parameters GAP.op_list GAP.op_style GAP.op_sign
Pareto plot parameters GAP.pp_list GAP.pp_xl GAP.pp_yl GAP.pp_title GAP.pp_style GAP.pp_sign GAP.pp_axis
Distribution plot parameters GAP.dp_type GAP.dp_np GAP.dp_res
Trim parameters GAP.trimga
Gene data parameters GAP.gd_min GAP.gd_max GAP.gd_type GAP.gd_cid
![Page 23: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/23.jpg)
Genetic Algorithm Parameters (GAP)
• GAP.fp_ngen
• GAP.fp_ipop
• GAP.fp_npop• GAP.fp_npop
• GAP.fp_nobj
• GAP.fp_obj
23
![Page 24: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/24.jpg)
GAS.[Field name] Description
GAS.cg Current generation number
GAS.medianfit The median fitness values of each objective
( No. of objectives × No. of generations )
Genetic Algorithm Statistics (GAS)
24
( No. of objectives × No. of generations )
GAS.meanfit The average fitness values of each objective
( No. of objectives × No. of generations )
GAS.bestfit The best fitness values of each objective
( No. of objectives × No. of generations )
GAS.bestgenesThe best gene values for each objective over the generations
(No. of genes × No. of generations × No. of objectives )
GAS.ne The number of the total objective function evaluations
![Page 25: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/25.jpg)
GOSET Genetic Operators
• Diversity control• Scaling• Selection• Death• Mating & crossover• Mating & crossover• Mutation• Gene Repair• Migration• Elitism• Random search• Deterministic Trim
25
![Page 26: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/26.jpg)
• Minimization of Rosenbrock’s function
21
21221 )1()(100),(min xxxxxf −+−=
Example: Minimize the Banana
26
• Also called as banana function due to the shape of the level sets
• The global minimizer is located at (1,1)
![Page 27: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/27.jpg)
Banana Function
27
![Page 28: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/28.jpg)
Banana Function Level Sets
28
![Page 29: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/29.jpg)
Fitness Function
• Rosenbrock’s function is non-negative• The inverse of the Rosenbrock’s function is
used as the fitness function
1),(
2221 +−+−=xxf
001.0)1()(100),(
21
212
21 +−+−=
xxxxxf
29
![Page 30: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/30.jpg)
banana.m
% Optimization of Rosenbrock's Problem
% Initialize the parameters
GAP=gapdefault; % load the default values f or GAP
% Define gene parameters
% x1 x2 % x1 x2
% gene 1 2
GAP.gd_min = [ -2 -1 ];
GAP.gd_max = [ 2 3 ];
GAP.gd_type = [ 2 2 ];
GAP.gd_cid = [ 1 1 ];
% Execute GOSET
[P,GAS,best_parameters] = gaoptimize(@banana_fitnes s,GAP);
30
![Page 31: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/31.jpg)
banana_fitness.m
% banana_fitness.m
%
% Banana Function
function f = banana_fitness(x)
f1 = 100*(x(2) - x(1)^2)^2 + (1 - x(1))^2; % Banana functionf1 = 100*(x(2) - x(1)^2)^2 + (1 - x(1))^2; % Banana function
f = 1/(0.001 + f1); % Fitness function
31
![Page 32: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/32.jpg)
Results
best_parameters =1.00001.00001.0000
32
![Page 33: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/33.jpg)
Alternate Call (banana2.m)
% Optimization of Rosenbrock's problem
% Initialize the parameters
GAP=gapdefault;
% Define gene parameters
% min max type chorm
GAP.gd = [ -2 2 2 1; % gene 1
- 1 3 2 1]; % gene 2- 1 3 2 1]; % gene 2
% Execute GOSET
[P,GAS,best_parameters] = gaoptimize(@banana_fitnes s,GAP);
33
![Page 34: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/34.jpg)
Example 2: Curve Fitting Losses
• Characterize the i-v curve of the IGBT in a FUJI 6MBI30L-060 IGBT module (gate voltage = 15 V)
+(GU) (GV) (GW)
V WU
_
EU
BU
EX
BX
EV
BV
EYBY
EU
BU
EZ
BZ
EW
BW
34
![Page 35: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/35.jpg)
Measured Data
2.5
3
3.5
4Static IGBT Characteristics at 25 C
0 5 10 15 20 25 300.5
1
1.5
2
2.5
Current, A
Vol
tage
, V
35
![Page 36: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/36.jpg)
Step 1: Decide on Representation
• Assumed that the voltage (v) can be expressed as the function of current (i) as
cbiaiv )(+=
• Termsa, b, and c are constants to be identified using GOSET
36
![Page 37: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/37.jpg)
Fitness Function
• Take set of K measurements• vk voltage of k’th measurement
• ik current at k’th measurement
• Fitness function
3
110
)(1
1
1),,(
−
=++−
=
∑K
k k
ckk
v
biai
K
cbaf
37
![Page 38: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/38.jpg)
igbt_fit.m
% this rountine returns the fitness of the IGBT cond uction% loss parameters based on the mean percentage erro r
function fitness = igbt_fit(parameters,data,fignum)
% assign genes to parametersa=parameters(1);b=parameters(2);c=parameters(3);c=parameters(3);
vpred=a*data.i+(b*data.i).^c;error=abs(1-vpred./data.v);fitness=1.0/(1.0e-6+mean(error));
38
![Page 39: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/39.jpg)
if nargin>2
figure(fignum);Npoints=200;ip=linspace(0,max(data.i),Npoints);vp=a*ip+(b*ip).^c;plot(data.i,data.v,'bx',ip,vp,'r')title('Voltage Versus Currrent');xlabel('Current, A');ylabel ('Voltage, V');
igbt_fit.m (continued)
ylabel ('Voltage, V');legend({'Measured','Fit'});
figure(fignum+1);Npoints=200;plot(data.i,data.v.*data.i,'bx',ip,vp.*ip,'r')title('Power Versus Currrent');xlabel('Current, A');ylabel('Power, V');legend({'Measured','Fit'});
end
39
![Page 40: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/40.jpg)
igbt.m
% load experimental dataload igbt_data.mat
% plot the raw datafigure(1);plot(igbt_data.i,igbt_data.v,'x');xlabel('Current, A');ylabel ('Voltage, V');ylabel ('Voltage, V');title('Static IGBT Characteristics at 25 C');
% gafitGAP=gapdefault;
% set up regionsGAP.mg_nreg=4; GAP.mg_tmig=20; GAP.mg_pmig=0.05;GAP.mc_alg=10;
40
![Page 41: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/41.jpg)
% set up genes% min max type chromGAP.gd = [1e-8 1e+2 3 1; % a
1e-6 1e+3 3 1; % b1e-3 1e+0 3 1]; % c
% do the optimization[fP,GAS,bestparameters]= gaoptimize(@igbt_fit,GAP,i gbt_data);
% plot the best fit
igbt.m
% plot the best fitigbt_fit(bestparameters,igbt_data,4);
41
![Page 42: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/42.jpg)
Evolution
42
![Page 43: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/43.jpg)
Result
• After 100 generations, the best individual has the following parameter values.
a =0, b = 4.6415, c = 0.2574
43
![Page 44: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/44.jpg)
• Involve more than one objective function that are to be minimized or maximized
• Answer is set of solutions that define the best tradeoff between competing objectives
Multi-Objective Optimization (MOO)
MOO
Suggested reading: K. Deb, Multi-Objective Optimization using Evolutionary Algorithms, John Wiley & Sons, Inc., 2001 44
![Page 45: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/45.jpg)
General Form of MOOP
• Mathematically
Mmfm ,,2 ,1 ),( min/max ⋯=x
nixxx
Kkh
Jjg
Uii
Li
k
j
,,2 ,1 ,
,,2 ,1 ,0)(
,,2 ,1 ,0)( subject to
)()(⋯
⋯
⋯
=≤≤
==
=≥
x
x
lowerbound
upperbound
45
![Page 46: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/46.jpg)
• In the single-objective optimization problem:
Dominance
• In multi-objective optimization problem:
46
![Page 47: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/47.jpg)
Definition of Dominance
• x1 dominates x2, if
47
![Page 48: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/48.jpg)
Example Dominance Test
f2(minimize)
1
2
3
4
5
• 1 Vs 2:
• 1 Vs 5:
• 1 Vs 4:
f1 (maximize)
3
48
![Page 49: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/49.jpg)
• Non-dominated solution set• Given a set of solutions, the non-dominated
solution set is a set of all the solutions that are not dominated by any member of the solution set
• The non-dominated set of the entire feasible decision
Pareto Optimal Solution
• The non-dominated set of the entire feasible decision space is called the Pareto-optimal set
• The boundary defined by the set of all point mapped from the Pareto optimal set is called thePareto-optimal front
49
![Page 50: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/50.jpg)
Pareto Optimal Solution
feasible
objective
space
f2(x)
(minimize)x2
feasible
A
feasible
objective
space
feasible
objective
space
f2(x)
(minimize)x2
feasible
x2
feasible
AA
f1(x)
(minimize)
x1
feasible
decision
spacePareto-optimal front
B
C
Pareto-optimal solutions f1(x)
(minimize)
x1
feasible
decision
space
x1
feasible
decision
spacePareto-optimal frontPareto-optimal front
BBB
CCC
Pareto-optimal solutionsPareto-optimal solutions
50
![Page 51: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/51.jpg)
Goals in MOO
• Find set of solutions as close as possible to Pareto-optimal front
• To find a set of solutions as diverse as possible
feasible
f (x) 1feasible
objective
space
f1(x)
f2(x)
Pareto-optimal front
1
2
51
![Page 52: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/52.jpg)
Multi-Objective GAs
� Our desired answer: a set of solutions
� Traditional optimization methods operate on acandidate solution
� Genetic algorithms fundamentally operate on a set of candidate solutions
52
![Page 53: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/53.jpg)
Multi-Objective MOEAs
Non-Elitist MOEAs
• Vector evaluated GA• Vector optimized ES• Weight based GA
Elitist MOEAs
• Elitist Non-dominated Sorting GA
• Distance-based Pareto • Weight based GA• Random weighted GA• Multiple-objective GA• Non-dominated Sorting
GA• Niched Pareto GA
• Distance-based Pareto GA
• Strength Pareto GA• Pareto-archived ES
53
![Page 54: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/54.jpg)
Multi-Objective Optimization in GOSET
• GOSET employ an elitist GA for the multi-objective optimization problem
• Diversity control algorithms are also employed to prevent over-crowding of the individuals in a specific prevent over-crowding of the individuals in a specific region of the solution space
• The non-dominated solutions are identified using the recursive algorithm proposed by Kung et al.
54
![Page 55: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/55.jpg)
Example: Schaffer’s Problem
21min ( )f x x=
� Schaffer’s problem is a single variable problem with two objectives to be minimized
feasible
decision
space1
22
min ( )
min ( ) ( 2)
10 10
f x x
f x x
x
=
= −− < <
� The Schaffer’s problem has Pareto optimal solutionsx∈[0, 2]
space
55
![Page 56: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/56.jpg)
• Two objectives have positive values and they are to be minimized
• The fitness function values are defined to be the negative of the objective function values
Fitness Function
56
![Page 57: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/57.jpg)
schaffer_fit.m
% Schaffer's problem
function [f] = schaffer_fit(x)
f(1)= -x(1)^2;
f(2)= -(x(1)-2)^2;
57
![Page 58: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/58.jpg)
schaffer.m
% Optimization of Schaffer's Problem
% Initialize the parametersGAP = gapdefault(2,0,100,20);
% Plot settingsGAP.op_list = []; % No objective plotGAP.pp_list = [1 2]; % Objectives for paere to plotGAP.pp_style =[1 1]; % Plot style (linear)GAP.pp_style =[1 1]; % Plot style (linear)GAP.pp_sign = [-1 -1]; % Plot sign GAP.pp_axis = [-2 25 -2 25]; % Plot axis ranges
% x1 % gene 1GAP.gd_min = [ -10 ];GAP.gd_max = [ 10 ];GAP.gd_type = [ 2 ];GAP.gd_cid = [ 1 ];
[P,GAS,best_solutions]=gaoptimize(@schaffer_fit,GAP );
58
![Page 59: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/59.jpg)
Pareto Plot (20 Generations)
59
![Page 60: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/60.jpg)
Example: Tanaka Problem
1 1 2 1min ( , )f x x x=
� Tanaka problem is a constrained optimization problem with two objectives to be minimized
( )1
2
2 1 2 2
2 21 1 2 1 2
2 22 1 2 1 2
min ( , )
subject to ( , ) 1 0.1cos 16arctan 0,
( , ) ( 0.5) ( 0.5) 0.5,
xx
f x x x
C x x x x
C x x x x
=
= + − − ≥
= − + − ≤1
2
0 ,
0 .
x
x
ππ
≤ ≤≤ ≤
� Note the variable space is also the objective space
60
![Page 61: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/61.jpg)
Tanaka Problem
0.8
1
1.2
610 0.2 0.4 0.6 0.8 1 1.2
0
0.2
0.4
0.6
Pareto-optimal fronts
x1 , f
1
x 2 , f 2
![Page 62: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/62.jpg)
• Two objectives have positive values and they are to be minimized
• The fitness function values are defined to be the negative of the objective function values
Fitness Function
negative of the objective function values
• Infeasible solutions are assigned with -10 to reduce the chance of surviving
62
![Page 63: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/63.jpg)
tanaka.m% This is a multi-objective test function, with unc onstrained domain;% proposed by Poloni (MOP3, p.110 [1])%% Reference:% [1] C. A. Coello Coello, D. A. Van Veldhuizen, and G. B. Lamont,% "Evolutionary Algorithms for Solving Multi-Ob jective Problems"% Kluwer Academic Publishers, 2002%% date: 12.5.2003
% Initialize the parametersGAP=gapdefault(2,0,200,200);
% Use a pareto plotGAP.op_list = []; % objectives list fo r objective plotsGAP.pp_list = [ 1, 2]; % gene list for Pareto plotGAP.pp_list = [ 1, 2]; % gene list for Pareto plotGAP.pp_sign = [-1,-1]; % sign of fitness fo r each objective
% (1=positive,-1=negative)GAP.pp_axis = [0 1.25 0 1.25]; % axis limits for Pa reto plot
% x1 x2 % gene 1 2 GAP.gd_min = [ 0 0 ];GAP.gd_max = [ pi pi ];GAP.gd_type = [ 2 2 ];GAP.gd_cid = [ 1 1 ];
[P,GAS,best]= gaoptimize(@tanaka_fit,GAP);
% Plot final solutionsfigure(2)plot(best(1,:),best(2,:),'x');axis([0 1.25 0 1.25]);xlabel('f_1');ylabel('f_2');axis square;title('Pareto Front') 63
![Page 64: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/64.jpg)
tanaka_fitness.m
% This is a multi-objective test function, with unc onstrained domain;% proposed by Poloni (MOP3, p.110 [1])%% Reference:% [1] C. A. Coello Coello, D. A. Van Veldhuizen, an d G. B. Lamont,% "Evolutionary Algorithms for Solving Multi-Ob jective Problems"% Kluwer Academic Publishers, 2002%% date: 12.5.2003
function [f] = tanaka(x)function [f] = tanaka(x)
C1 = x(1)^2+x(2)^2-1-0.1*cos(16*atan(x(1)/x(2))) >= 0;C2 = (x(1)-0.5)^2+(x(2)-0.5)^2 <= 0.5;
if C1 & C2 f(1) = -x(1);f(2) = -x(2);
elsef(1) = -10;f(2) = -10;
end
64
![Page 65: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/65.jpg)
Pareto Plot
65
![Page 66: More Basic Tools - Purdue Universitysudhoff/ece695 power...Outline • Time Domain Simulation (ECE546, MA514) • Basic Methods for Time Domain Simulation • MATLAB • ACSL • Single](https://reader033.fdocuments.net/reader033/viewer/2022050600/5fa8023fdd88f133261314ab/html5/thumbnails/66.jpg)
Non Dominated Solutions
66