24
Experience on GA optimization of photoinjector and minimum emittance in rings Chun-xi Wang Advanced Photon Source (APS) Argonne National Laboratory (ANL) [email protected]

Experience on GA optimization of photoinjector and minimum emittance in rings Chun-xi Wang Advanced Photon Source (APS) Argonne National Laboratory (ANL)

Embed Size (px)

Citation preview

Page 1: Experience on GA optimization of photoinjector and minimum emittance in rings Chun-xi Wang Advanced Photon Source (APS) Argonne National Laboratory (ANL)

Experience on GA optimization of photoinjector and minimum emittance in

rings

Chun-xi WangAdvanced Photon Source (APS)

Argonne National Laboratory (ANL)[email protected]

Page 2: Experience on GA optimization of photoinjector and minimum emittance in rings Chun-xi Wang Advanced Photon Source (APS) Argonne National Laboratory (ANL)

2

Outline

Basics of genetic algorithm and multi-objective optimization

Optimization of bending profile for minimum emittance

Optimization of high-brightness photoinjector

Experience on GA optimization of photoinjector and minimum emittance in rings, C.-x. Wang, Mini-workshop at Indiana University, Mar. 14-16, 2012

Page 3: Experience on GA optimization of photoinjector and minimum emittance in rings Chun-xi Wang Advanced Photon Source (APS) Argonne National Laboratory (ANL)

3

Multi-objective optimization

Multiple objectives (conflicting interests) Pareto optimal solutions (Pareto front) Many algorithms for searching Pareto front (e.g. NSGA-II)

Experience on GA optimization of photoinjector and minimum emittance in rings, C.-x. Wang, Mini-workshop at Indiana University, Mar. 14-16, 2012

Page 4: Experience on GA optimization of photoinjector and minimum emittance in rings Chun-xi Wang Advanced Photon Source (APS) Argonne National Laboratory (ANL)

4

Multi-objective optimization

Early usage in accelerator field

Experience on GA optimization of photoinjector and minimum emittance in rings, C.-x. Wang, Mini-workshop at Indiana University, Mar. 14-16, 2012

Page 5: Experience on GA optimization of photoinjector and minimum emittance in rings Chun-xi Wang Advanced Photon Source (APS) Argonne National Laboratory (ANL)

5

Multi-objective optimization

Recent popularity

Availability of computer clusters for parallel computation

Experience on GA optimization of photoinjector and minimum emittance in rings, C.-x. Wang, Mini-workshop at Indiana University, Mar. 14-16, 2012

Page 6: Experience on GA optimization of photoinjector and minimum emittance in rings Chun-xi Wang Advanced Photon Source (APS) Argonne National Laboratory (ANL)

6

Genetic Algorithm

An empirical/heuristic technique for searching a solution Mimic the process of natural evolution for optimization Inheritance (chromosome, crossover), mutation, selection

Basic procedure

Evaluation of fitness functions usually is very time consuming and parallel computation is often necessary

Elitist selection is often important for performance

• Chromosome: a string that encodes a candidate solution• Crossover: genetic operator used to reproduce from parents• Mutation: genetic operator used to maintain genetic diversity• Selection: a fitness-based process to select parents for new generation

• Choose the initial population, i.e., a set of chromosomes• Select the best-fits for reproduction • Breed new chromosomes through crossover/mutation• Evaluate the fitness of new breeds• Select the best-fits as the new generation, and continue evolution

Experience on GA optimization of photoinjector and minimum emittance in rings, C.-x. Wang, Mini-workshop at Indiana University, Mar. 14-16, 2012

Page 7: Experience on GA optimization of photoinjector and minimum emittance in rings Chun-xi Wang Advanced Photon Source (APS) Argonne National Laboratory (ANL)

7

Genetic Algorithm

Chromosome: a string that encodes a candidate solution (binary-coded) {1,0,0,1,1,0,1,0; …; …; total number of parameters}

parameter accuracy

Inheritance: chromosome recombination/crossover at a rate (0.7) 10111100110010010 10111111111110111 (single-point crossover) 01100011111110111 01100000110010010 Mutation: each digit flips at a given rate (0.001) (bitwise mutation) 10111111111110111 11111111111111111 Selection (NSGA-II)

http://www.ai-junkie.com/ga/intro/gat1.htmlExperience on GA optimization of photoinjector and minimum emittance in rings, C.-x. Wang, Mini-workshop at Indiana University, Mar. 14-16, 2012

• Sorting according to fitness: fast non-dominated sort• Elitist: always retain the best individuals in the next new generation• Maintain diversity to cover the whole front: crowding distance• Constraint handling: binary tournament selection

Page 8: Experience on GA optimization of photoinjector and minimum emittance in rings Chun-xi Wang Advanced Photon Source (APS) Argonne National Laboratory (ANL)

Experience on GA optimization of photoinjector and minimum emittance in rings, C.-x. Wang, Mini-workshop at Indiana University, Mar. 14-16, 20128

Mathematica implementation of NSGA-II

• A basic implementation is available from a Mathematica demonstration

• Mathematica is fast enough to handle the optimization

• It is easy to use for managing parallel computation of fitness functions

Options for parallel computation

• GridMathematica: no extra coding, platform independent, limited by license

• Using Mathemtica as a script language to invoke system job managers:

SGE on linux clusters, TORQUE on multicore workstations/laptops

Page 9: Experience on GA optimization of photoinjector and minimum emittance in rings Chun-xi Wang Advanced Photon Source (APS) Argonne National Laboratory (ANL)

Experience on GA optimization of photoinjector and minimum emittance in rings, C.-x. Wang, Mini-workshop at Indiana University, Mar. 14-16, 20129

20 19 18 17 16 15 14 12

10

8

6

4

2

0

2

f1

f 2

Testing of non-constrained NSGA-II

0 1 2 3 40

1

2

3

4

f1

f 2

SCH KUR

Page 10: Experience on GA optimization of photoinjector and minimum emittance in rings Chun-xi Wang Advanced Photon Source (APS) Argonne National Laboratory (ANL)

Experience on GA optimization of photoinjector and minimum emittance in rings, C.-x. Wang, Mini-workshop at Indiana University, Mar. 14-16, 201210

Testing of constrained NSGA-II

0.0 0.2 0.4 0.6 0.8 1.0 1.2 1.40.0

0.2

0.4

0.6

0.8

1.0

1.2

1.4

f1

f 2

0.2 0.4 0.6 0.8 1.00

2

4

6

8

10

f1

f 2

CONSTR TNK

Page 11: Experience on GA optimization of photoinjector and minimum emittance in rings Chun-xi Wang Advanced Photon Source (APS) Argonne National Laboratory (ANL)

Outline

11

Basics of genetic algorithm and multi-objective optimization

Optimization of bending profile for minimum emittance

Optimization of high-brightness photoinjector

Experience on GA optimization of photoinjector and minimum emittance in rings, C.-x. Wang, Mini-workshop at Indiana University, Mar. 14-16, 2012

Page 12: Experience on GA optimization of photoinjector and minimum emittance in rings Chun-xi Wang Advanced Photon Source (APS) Argonne National Laboratory (ANL)

Common storage ring lattice types

“Theoretical minimum emittance in storage rings”, C.-x. Wang, presented at ICFA Beam Dynamics Mini Workshop on Low Emittance Rings, Heraklion, Greece, 3-5 Oct. 2011

12

1. TME --- Theoretical Minimum Emittance lattices

no lattice constraints, figure of merit for damping rings

2. AME --- Achromatic Minimum Emittance lattices

require achromatic arcs for dispersion-free straight section, injection, rf, etc.

3. EME --- Effective Minimum Emittance lattices

no lattice constraints, but minimize the effective emittance for light sources

Page 13: Experience on GA optimization of photoinjector and minimum emittance in rings Chun-xi Wang Advanced Photon Source (APS) Argonne National Laboratory (ANL)

Natural horizontal emittance

“Theoretical minimum emittance in storage rings”, C.-x. Wang, presented at ICFA Beam Dynamics Mini Workshop on Low Emittance Rings, Heraklion, Greece, 3-5 Oct. 2011

13

betatron emittance for uncoupled lattices

Dispersion action

depending on linear lattice design

For isomagnetic rings with conventional dipoles of bending angle q :

a remarkable fact known since 1981

Page 14: Experience on GA optimization of photoinjector and minimum emittance in rings Chun-xi Wang Advanced Photon Source (APS) Argonne National Laboratory (ANL)

Minimum emittance theory (summary)

“Theoretical minimum emittance in storage rings”, C.-x. Wang, presented at ICFA Beam Dynamics Mini Workshop on Low Emittance Rings, Heraklion, Greece, 3-5 Oct. 2011

14

|A|, and c are completely determined by the dipole

For uniform dipoles:

This cubic equation determines the optimal dispersion for EME

Page 15: Experience on GA optimization of photoinjector and minimum emittance in rings Chun-xi Wang Advanced Photon Source (APS) Argonne National Laboratory (ANL)

Experience on GA optimization of photoinjector and minimum emittance in rings, C.-x. Wang, Mini-workshop at Indiana University, Mar. 14-16, 201215

Optimization of bending profile

Page 16: Experience on GA optimization of photoinjector and minimum emittance in rings Chun-xi Wang Advanced Photon Source (APS) Argonne National Laboratory (ANL)

Optimal bending profile

“Theoretical minimum emittance in storage rings”, C.-x. Wang, presented at ICFA Beam Dynamics Mini Workshop on Low Emittance Rings, Heraklion, Greece, 3-5 Oct. 2011

16

TMEAME

TME

EME AME

bending curvature (B field) bending radius profile

slice number

dipole of a given length and bending angle is sliced into many slices

each slice has arbitrary strength (up to a maximum, no polarity change)

two different optimizers are used to optimize the emittance, etc.

optimization was done for 3 different peak field (2, 4, and 6 times stronger)

TME

slice number

TMEAME EME

Page 17: Experience on GA optimization of photoinjector and minimum emittance in rings Chun-xi Wang Advanced Photon Source (APS) Argonne National Laboratory (ANL)

Linearly-ramped bending profile

“Theoretical minimum emittance in storage rings”, C.-x. Wang, presented at ICFA Beam Dynamics Mini Workshop on Low Emittance Rings, Heraklion, Greece, 3-5 Oct. 2011

17

A model sufficiently close to the optimal, yet can be solved analytically

TME AME/EME

is chosen as a given parameter

S = 0 S = 0(r 0, L0)

(r max , L)

Page 18: Experience on GA optimization of photoinjector and minimum emittance in rings Chun-xi Wang Advanced Photon Source (APS) Argonne National Laboratory (ANL)

Theoretical minimum emittance (TME)

“Theoretical minimum emittance in storage rings”, C.-x. Wang, presented at ICFA Beam Dynamics Mini Workshop on Low Emittance Rings, Heraklion, Greece, 3-5 Oct. 2011

18

F is normalized by the value of reference uniform dipole, i.e.,

f1 and f2 are functions of (g,r)

k

k

improvement in TME emittance

r

Page 19: Experience on GA optimization of photoinjector and minimum emittance in rings Chun-xi Wang Advanced Photon Source (APS) Argonne National Laboratory (ANL)

Outline

19

Basics of genetic algorithm and multi-objective optimization

Optimization of bending profile for minimum emittance

Optimization of high-brightness photoinjector

Experience on GA optimization of photoinjector and minimum emittance in rings, C.-x. Wang, Mini-workshop at Indiana University, Mar. 14-16, 2012

• Design study of a high-brightness cw injector for ERL

• Optimization of APS injector & linac

Page 20: Experience on GA optimization of photoinjector and minimum emittance in rings Chun-xi Wang Advanced Photon Source (APS) Argonne National Laboratory (ANL)

C.-x. Wang: Scheme for ERL-based x-ray light sources (ERL09) 20

Low-frequency normal-conducting rf gun cavity

Design for a CW, VHF Photogun

Vacuum pumps in plenum

Cathode

Beam exit aperture

Vacuum pumping slots

Cathode insertion & withdrawal channel (mechanism not shown)

HIGH BUNCH RATE, ACCOMODATES VARIED CATHODE MATERIALS

Fernando SannibaleJohn StaplesRuss Wells

LBNL VHF photogun cavity (Corlett talk, Oct. 2008)

Used a 350MHz cavity

from J. Staple for simulation

187 MHz, 20 MW/m at cathode, 10^-11 Torr

Page 21: Experience on GA optimization of photoinjector and minimum emittance in rings Chun-xi Wang Advanced Photon Source (APS) Argonne National Laboratory (ANL)

C.-x. Wang: Scheme for ERL-based x-ray light sources (ERL09) 21

Basic layout of a normal-conducting rf photoinjector

Adopted from dc injector as an example, major difference is the cathode field

gun cavity @ 325MHz

solenoid

rf buncher two-cell cavities @ 650MHz

25 MV/m

Page 22: Experience on GA optimization of photoinjector and minimum emittance in rings Chun-xi Wang Advanced Photon Source (APS) Argonne National Laboratory (ANL)

C.-x. Wang: Scheme for ERL-based x-ray light sources (ERL09) 22

Preliminary result of a potential nc rf photoinjector (1)

Optimized using ASTRA and the genetic optimizer in SDDS-toolkit (using non-dominated sorting, similar to NSGA-II)

Only beer-can laser pulse is used, assuming thermal emittance from GaAs

Needs to push through mergers

meet requirements, can be better

4 x bunch charge

high coh. high flux

Page 23: Experience on GA optimization of photoinjector and minimum emittance in rings Chun-xi Wang Advanced Photon Source (APS) Argonne National Laboratory (ANL)

C.-x. Wang: Scheme for ERL-based x-ray light sources (ERL09) 23

Preliminary result of a potential nc rf photoinjector (2)

ASTRA output of bunch information

0.3nc 0.77pc

Page 24: Experience on GA optimization of photoinjector and minimum emittance in rings Chun-xi Wang Advanced Photon Source (APS) Argonne National Laboratory (ANL)

Experience on GA optimization of photoinjector and minimum emittance in rings, C.-x. Wang, Mini-workshop at Indiana University, Mar. 14-16, 201224

APS injector optimization study

X XX

X

X

Y Y

Y

Y

Y

0.0 0.1 0.2 0.3 0.4 0.5 0.60

5

10

15

20

25

30

35

Q nC

emittance

m

XX

X

X

Y

Y

Y

Y

0.0 0.1 0.2 0.3 0.40.0

0.5

1.0

1.5

2.0

2.5

Q nC emittance

m