Inverse design for nano-photonics Yablonovitch Group, UC Berkeley June 4th 2013
Seminar outline This morning: Theory This afternoon: General presentation on inverse design Our approach: the adjoint method Step by step example This afternoon: Software presentation Code structure outline Hands on experience
Shape Optimization for photonic devices Problem statement: Given FOM(E,H), find eps(x) such that FOM is maximum and eps(x) respects some constraints. ?
Typical figures of merit and constraints - Transmission - Mode matching - Absorption - Field intensity - Scattering cross section Constraints - Materials available - Minimum dimensions - Radius of curvature - Periodicity
Typical figures of merit Transmission Mode-Match Field intensity Absorption
Typical constraints Radius of curvature Minimum dimension Periodicity Materials Periodicity
Parameterization: describing shapes Index maps Level sets ? Splines Custom parameters
Optimizations: Heuristic methods Genetic algorithms Particle swarm optimization Ant colony Parameter sweeps
Opsis optimization: particle swarm 1500 2D simulations: -0.28 dB insertion loss
The problem: Simulations required: ~C^(variables) !!!
The solution: deterministic optimization Gradient descent
Calculating the gradient With this information we can calculate the gradient for any parameterisation
But how do we calculate the gradient? But how do we calculate that?
Our Approach
Duality in Linear Algebra Problem: Compute gTb such that Ab=c gT B A B c such that = B is unknown must solve for B first
Duality in Linear Algebra Problem: Compute gTb such that Ab=c gT B A B c such that = Substitution of Variables: I could solve this dual problem instead sT c AT s g such that = sTc = sTAB = (ATs)TB = gTB
Iterative Gradient Descent
Iterative Gradient Descent
Adjoint Method for Electromagnetics Goal = Efficiently solve for the gradient of Merit(E,H)
Optimization Problem light input
… Where should I add material? light input light input light input Need to know dF/dx’ for all x’
Perturbation = small sphere of material What happens when I add material? Original Perturbation = small sphere of material Eperturbed E0 ε1 ε1 ε2 P
How can I approximate this perturbation? Eperturbed E0 Escattered ≈ +
Gradient light input
Island Perturbation Approximation
Boundary Perturbation Approximation
Key Trick 1: (approximate every perturbation as a dipole scatterer) … + … +
Reciprocity (Rayleigh-Carson) Drive a dipole at x’ Find E at x0 Drive a dipole at x0 Find E at x’ equivalent
Reciprocity (Lorentz) More generally: equivalent J2 E2 J1 E1 J1 E2 = J2 E1
Reciprocity (Lorentz) Problem: Solve for E1 and E2 Dual Problem: Solve for E3 J1(x’) E1 J3 E3(x’) E3(x’’) equivalent J1 E3 = J3 E1 J2(x’’) E2 J2 E3 = J3 E2
Gradient light input Treat electric field at x0 as a current:
Key Trick 2: (Lorentz reciprocity) … + +
+ What does this achieve? 2 Simulations Gradient of Merit Function with respect to changes in geometry and/or permittivity is calculated everywhere in the simulation volume Did not have to vary any geometric parameters Optimization Process Every iteration = Calculate the gradient and step closer to a local optimum
Step by step example: direct simulation Phase extracted=-137°
Adjoint simulation Phase of dipole:137°
The derivative field! Add some material here! Red = adding material will improve Merit Function
New geometry Inclusion of index=2
Constructive interference! Result Constructive interference! Incident field Scattered field E2 Iteration
Repeat!
Software Implementation
Code Structure Optimizer Maxwell Solver Geometry Merit Function Gradient Lumerical FDTD FreeForm FieldEnergy Supports HPC cluster with MPI LevelSet Transmission ModeMatch
Optimization Region Merit Function = ModeMatch abs(Ez) Geometry (eps = Ta2O5, epsOut = SiO2) (minimum dimension = 300nm) (radius of curvature = 150nm) Source (frequency = 830nm)
How to run an optimization: 1. Create a setup file setup.m %% Lumerical Simulation %% Frequency %% Optimization Region %% Geometry Properties %% Merit Function 2. Create a Lumerical base file baseFile.fsp Source Optimization Region Initial Geometry Field and Index monitors Merit Function monitors 3. Run runOpt in Matlab runOpt.m
FreeForm/LevelSet Geometries Binary 2D Geometry: 1 = eps, 0 = epsOut Constant thickness Materials: eps/epsOut = ‘material name’ or custom permittivity Optional Geometric constraints: minimum dimension, radius of curvature, minimum padding, symmetries Optional Optimization constraints: boundary changes only, allow new shapes to emerge Optional Non-Designable Region: 1 = Designable, 0 = Non-Designable
Merit Functions Transmission through a plane Field Energy in a volume E intensity H intensity absorption Mode Match at a plane E mode H mode ExH Propagating Mode
Complex Merit Function (j,k,l) = user defined (1), frequency (2), monitor (3) f = (transmission, field energy, mode match) Example: Waveguide Spectral Splitter: maximize the minimum transmission through branch 1 at frequency 1, branch 2 at frequency 2, etc. for N branches
Custom Geometry Type
Install the software: 1. Download all Inverse Design files 2. Install Lumerical 3. Edit runOpt_params.m
Example Waveguide Couplers for Silicon Photonics
Level set geometry class Inside phi<0 Outside phi>0
Example
Our implementation First order accurate Can enforce radius of curvature constraints Can anchor points of the initial geometry Works great for Silicon photonics! Does not use the boundary derivative D/E calculation Doesn’t (yet) support new shapes Can be computationally demanding if many mesh points (but is ok for most problems)
Examples: 50%/50% splitter Figure of merit: Mode-matching to the TE mode of two waveguides Optimized using level set geometry representation and an effective index method
Example 1: 50%/50% splitter
Optimization video
Example Optical Antenna for Heat-Assisted Magnetic Recording
Optical Antenna Example 1 TE mode Optimization Region = Planar Gold Film Arm = 650 x 150 nm2 Peg = 50 x 50 nm2 Thickness = 40 nm Media Coupling = Absorption in Storage Layer (FWHM) Power injected into Waveguide Media Stack 10nm thick Storage Layer (FePt)
Media Coupling Efficiency (%) Optical Antenna Example 1 TE mode Antenna Geometry Media Coupling Efficiency (%)
Optical Antenna Example 1 storage layer cross-section 800 nm Media Coupling 2% Wasted Antenna Absorption 26% Media Coupling 7% Wasted Antenna Absorption 27% storage layer cross-section 800 nm
Optical Antenna Example 2 TM mode Optimization Region = Planar Gold Film Arm = 650 x 150 nm2 Peg = 50 x 50 nm2 Thickness = 40 nm Media Coupling = Absorption in Storage Layer (FWHM) Power injected into Waveguide Media Stack 10nm thick Storage Layer (FePt)
Optical Antenna Example 2 TM mode Antenna Geometry
Optical Antenna Example 2 media cross-section 800 nm Media Coupling 4% Wasted Antenna Absorption 31% Media Coupling 10% Wasted Antenna Absorption 32% media cross-section 800 nm
Optical Antenna Example 3 TM mode Merit Function = Absorption in Storage Layer (FWHM) Absorption in Antenna Peg
Example Custom Wrapper for Silicon Photonics
Easy Silicon Photonics Optimization Extremely easy setup of an optimization Only figure of merit possible: Mode-matching Just one Lumerical file to set up and matlab file to modify Covers many Silicon Photonics applications
Easy Silicon Photonics Optimization -Create a simulation file as if you were just going to test your own design -Name your source “Source” -Name your mode matching monitor “merit1” -Add a monitor around the region to optimize named “Velocity” -Use sources to create the mode you would like to couple into and call them mode1, mode2, etc…
Matlab setup file “setup_EZSiPh_params” Then type runOpt in matlab and enjoy!