Multi-Objective Sorting in Light Source Design Louis Emery and Michael Borland Argonne National Laboratory March 14 th, 2012
Outline Introduction How do we handle multiple design goals? Need to understand landscape of possible results for making decisions Some definitions Grid search ALS linear lattice search ID source optimization 2
Introduction How do we handle multiple objectives? Traditional way is to create a single function with weights and minimize it f x 1, x 2,...=w 1 p x 1, x 2,... p r w 2 q x 1, x 2,... q r r x w 1, x 2,... 3... r r The solution X 1, X 2,... would hold only for the weights that was chosen by the user To get an idea of the trade-offs the minimization would have to be repeated with different weights, i.e. obtaining a set of X 1 = X 1 (w 1,w 2,w 3,...), X 2 = X 2 (w 1,w 2,w 3,...),... One can save computation time if we simply make a database of all objective (p, q, r,...) and variable values and treat them as n- tuple data for plotting, sorting, and making final decisions. 3
Some Definitions Design variables or parameters (Variables), i.e. magnet setting, lattice parameter (i.e. tunes), discrete choices (cell type: FODO or TME) Selected on a grid or randomly Figures of merit (Objectives), i.e. electron beam emittance, photon brightness, injection aperture, cost Calculated from variables. Can be simple formula, or could be results of long simulation Constraints are mathematical requirements for a valid solution Example: Quadrupole settings as variables, emittance and momentum compaction as objectives, stable lattice as constraint Non-dominated sorting: sorting of n-tuple data (of objectives) to rank elements in groups. Best group is called Pareto Optimal. Reference: Kalyanmoy Deb, Multi-Objective Optimization using Evolutionary Algorithms, John Wiley & Sons Ltd, 2001 4
General Optimization Problem Schematic Decision Vectors in Decision Space Objective Vector in Objective Space x 3 x 2 A B z 2 A B Goal is determining this curve/surface x 1 Decision Space z 1 Objective Space 5
Pareto Optimal Front and Ranking of Individuals A population of about 20 individuals No member of the Pareto-optimal set (first rank solutions) is worse than any other solution in all performance measures 6
Grid Search In grid search all values of design variables in fine-enough mesh are considered. All outcomes are calculated and known. After sorting one can choose the performance trade-off, confident in the knowledge that all cases have been reviewed. Feasible method for low-dimension variable systems, i.e. 2 or 3. Practical when objective values are easy to calculate, i.e. simple formula or matrix trace. Higher dimensional search (say, complicated lattices) would require too much memory and computing time for a grid search, thus genetic algorithm (MOGA) is required. 7
Grid Search Examples (no Genetic Algorithms Used) ALS optics search of all stable linear lattices Scan three families of quadrupoles Make database of all properties, i.e. various possible objectives Choose which pair of objectives to examine D. Robin et al. PRST-AB, 11, 024002 (2008) APS optimization of revolver IDs Scan all possible pairs of period values for two undulators of a straight section Sort according to criteria (i.e. brightness in various bands) 8
ALS Stable Linear Optics Billion cases considered, i.e. 1000x1000x1000 Found 13 clusters of stable lattice types Each with machine functions of similar behavior Plot shows emittance values 9
Undulator Spectrum Period length Minimum undulator gap Harmonics Plot shows onaxis brightness vs photon energy as an undulator gap is scanned Gaps in spectrum to be avoided 10
Revolver ID 3D model Magnetic structure of particular period 11
APS Revolver ID Choice Revolver ID has two (or possibly three) magnetic structures that are mechanically selectable Beamline users interested in specific photon energy bands Variables are period length of two magnetic structures Objectives are Minimize the number of gaps in the spectrum within the bands Maximizing the average brightness in the bands Maximizing the minimum brightness in the bands In general, these criteria cannot all be optimized simultaneously Hence, we need to find a Pareto-optimal set This problem is applicable to two inline undulators of different periods 12
ID Optimization Algorithm Generate tuning curves for all combinations of front-end type, ID length, ID period Beamline defines sector configuration plus energy bands and quantity Q of interest Find minimum, average, and # of gaps in Q for each band E.g., canted short straight interested in 40-100 kev with Q=brightness Other criteria are easily added Perform non-dominated sort for all bands at once Avoids need to arbitrarily weight competing needs Select first-rank solutions and present for review 13
Web Applications Available for All Types M. Borland, R. Soliday. 14
Revolver Optimization Example No member of the Paretooptimal set (first rank solutions) is worse than any other solution in all performance measures Example of one of the first-rank solutions compared to single-period optimum and U33 reference 15
Example: 5-30 kev, with 12.5 kev preference 16
Limitation of Grid Search When the number of variable is large, it is too time-consuming to examine all possibilities with a fine enough grid Use a genetic algorithm to search the variable space to hopefully find a population that comprises the Pareto optimal front First application in accelerators was by I. Bazarov PRST-AB 8 034202 (2005) in ERL injector optimization Note that genetic algorithms have been used for years for singlefunction minimization by a diverse scientific community 17
Conclusion Multi-objective sorting of full variable scans has been applied to low-dimensional problems Multi-objective genetic algorithm have been applied to very highdimensional problems resulting in an improved performance Search can even reveal solution types for improving injection that we didn t even realize Method can be applied for any engineering designs in an accelerator 18