# Inverse Design
Tidy3D Inverse Design enables you to easily configure an optimization problem to automatically adjust the device model to meet pre-defined metrics. The Tidy3D Inverse Design framework uses the "adjoint method" to compute gradients of an objective function with respect to design parameters. The advantage of the adjoint method is that the gradients can be computed using only two FDTD simulations, the forward and the adjoint one, independent of the number of parameters. This makes it possible to do gradient-based optimization of devices with enormous numbers of parameters with minimal computational overhead.
The inverse design problem is defined in a few steps:
- Create an FDTD Base Simulation including static structures, sources, and monitors.
- Set the Design Region to define which region of the device geometry you want to modify.
- Specify the
Metricsto describe the expected device response. - Define the
Optimizerhyper-parameters.
# Design Region
The Design Region component in the Inverse Design plugin lets you specify the part of the device model you want to change in order to achieve a specific response. This component also manages how the design region is converted into a tidy3d.Structure based on the optimization design parameters.
Note: Currently, the Design Region only supports
Topology Optimization, but support forShapeandLevel Setoptimizations will be available soon.
# Metrics
Metrics represent a pre-defined device response used to drive the optimization, for instance, the modal power.
To set the device metrics (also known as figure-of-merit), click Add/Edit Metrics, select monitor datasets under Dataset Selection, and then create an equation that represents the desired device response. For example, by minimizing the expression (0.5 - m1)**2 + (0.5 - m2)**2 you can equally maximize the modal power at the two outputs of a y-branch. Here, m1 and m2 are the mode intensities obtained from ModeMonitors positioned at the output waveguides.
Notes: 1) Only
ModeMonitorsare allowed to define metrics in the GUI Inverse Design for now. Support for other monitor types will be available soon; 2) Optimizations support only a single frequency for now.
# Optimizer
Gradient-based optimizer.