Archived seminar material. These saved outputs were produced with Tidy3D 2.9.1
Our robust adjoint design is ready for fabrication, but once real devices come back from the foundry, their spectral responses rarely match the nominal simulation exactly. In this notebook we demonstrate a way to calibrate the simulation model to match measured data using adjoint optimization, recovering the as-built geometry so subsequent optimization or analysis stays grounded in reality.
Just as we used gradient-based optimization with adjoint derivatives to design the device, we can apply the same approach to calibrate fabrication parameters. Instead of optimizing geometric features to achieve a target performance, we now optimize fabrication corners (like width bias, etch depth, or sidewall angle) to match measured spectral data. Because we’re using adjoint sensitivities, this approach scales efficiently to many parameters - real-world calibration often involves multiple fabrication variables simultaneously, and adjoint lets us handle that complexity with the same computational efficiency we saw during design.
import jsonfrom copy import deepcopyfrom pathlib import Pathimport autograd.numpy as npimport matplotlib.pyplot as pltimport numpy as nplimport tidy3d as tdfrom autograd import value_and_gradfrom optim import adam_update, apply_updates, clip_params, init_adamfrom setup import get_mode_monitor_power, make_simulation, widths_gaps_to_centersfrom tidy3d import web
Calibration Workflow Overview
We assume access to three ingredients: 1. The robust nominal design. 2. A measured spectrum from fabricated hardware (here we synthesize one by applying a known bias and measurement noise). 3. A differentiable simulation model we can tune so the simulated spectrum matches the measured data.
The goal is to infer the effective SiN tooth widths that best reproduce the measurement, keeping the digital twin aligned with the hardware. We’ll use gradient-based optimization driven by adjoint sensitivities - the same computational engine that powered our design optimization - to efficiently tune the fabrication parameters.
Generating Reference and Synthetic Measurement Data
The baseline spectrum corresponds to the calibrated simulation before any fabrication shifts. To emulate a measured device we create a second spectrum with a uniform +20 nm SiN width bias and add multiplicative noise, representing typical measurement variability.
We adjust the SiN tooth widths so the simulated spectrum matches the measured one. The loss is the mean-squared error between spectra sampled at the monitor frequencies, optimized with Adam while respecting fabrication bounds.
In this example we optimize a single global width bias, which is a one-dimensional problem that could also be solved with simpler techniques like bisection or line search. However, we’re showcasing adjoint optimization here because real calibration scenarios often involve multiple correlated fabrication parameters (width bias, etch depth, sidewall angle, material index shifts, etc.) and adjoint derivatives make it practical to optimize all of them simultaneously. This demonstration establishes the workflow that scales naturally to those multi-parameter calibration problems.
iter 0: mse=1.168650e-04, bias=0.000000
iter 1: mse=9.655110e-05, bias=0.002000
iter 2: mse=8.147495e-05, bias=0.003991
iter 3: mse=6.712432e-05, bias=0.005965
iter 4: mse=5.820263e-05, bias=0.007910
iter 5: mse=4.864759e-05, bias=0.009820
iter 6: mse=4.191141e-05, bias=0.011675
iter 7: mse=3.766940e-05, bias=0.013464
iter 8: mse=3.487550e-05, bias=0.015177
iter 9: mse=3.235886e-05, bias=0.016812
iter 10: mse=3.058458e-05, bias=0.018360
iter 11: mse=2.997697e-05, bias=0.019815
After optimization, the width deviation matches the “fabricated” one very well. Note that the match is not perfect, although the remaining discrepancy is due to the convergence properties of the optimizer - running more iterations would further reduce the error.
fig, ax = plt.subplots(figsize=(6, 4))ax.plot( wl_base, base_db, label="Before optimization", linewidth=2,)ax.plot( wl_calib, calib_db, label="After optimization", linewidth=2,)ax.plot( wl_meas, meas_db, label="Measured (synthetic)", linewidth=1.5, linestyle="--", alpha=0.7,)ax.set_xlabel("Wavelength (um)")ax.set_ylabel("Transmission (dB)")ax.set_title("Spectrum Before vs After Calibration")ax.grid(True, alpha=0.3)ax.legend()plt.show()
Takeaways
By calibrating the simulation to match measurement we keep the model and fabricated hardware in sync. Combined with robust optimization this closes the loop between design, fabrication, and test, enabling faster debug and higher-yield deployment of inverse-designed photonics.
Key advantages of the gradient-based approach: - Scalability: Adjoint derivatives allow efficient optimization of many fabrication parameters simultaneously (width bias, etch depth, sidewall angle, material variations, etc.) without a combinatorial explosion in computational cost. - Versatility: The same optimization framework used for device design applies seamlessly to calibration, demonstrating the broad applicability of adjoint methods across the photonics workflow. - Precision: Gradient information enables faster convergence to accurate parameter estimates compared to gradient-free methods, especially important when calibration involves expensive simulations.
We use necessary cookies to run this website. With your permission, we
also use analytics cookies to understand site usage and marketing
cookies for advertising, retargeting, and HubSpot tracking.
Learn more about our cookie policy.
Privacy choices
Choose which optional cookies Flexcompute may use. Necessary cookies
are always on because they support core website behavior, security, and
saving your consent record.
Your browser is sending a Global Privacy Control signal, so marketing
cookies are disabled.
Subscribe
Thanks for subscribing
Publish Your Notebook
Thank you for publishingA confirmation email has been sent to your inbox. Your notebook will be available within the next 48 hours.
Community Library
TERMS & CONDITIONS
EFFECTIVE DATE: January 1, 2025
Terms and Conditions for User-Submitted Content
By submitting content to Flexcompute, you agree to the following terms:
1. Ownership and Copyright
All content, including but not limited to text, data, images, and other materials submitted by users,
remains the sole property of the original creator. Flexcompute does not claim ownership of the submitted
content or any intellectual property rights associated with it.
Users affirm that they own the copyright or have obtained all necessary permissions for the submitted
content and are fully responsible for ensuring that their submissions do not infringe on any third-party
rights.
2. Responsibility for Content
Users are solely responsible for the content they submit. Flexcompute does not endorse, guarantee,
or verify the accuracy, legality, or appropriateness of any submitted content. Users are responsible
for ensuring that their content complies with all applicable laws and regulations.
Users declare that they have obtained authorization from all co-authors and collaborators associated
with the submitted content, granting them the right to submit and sign on behalf of all contributors.
Users agree not to submit content that is illegal, defamatory, obscene, or violates the rights
of others, including privacy and intellectual property rights.
3. Modification and Presentation
Flexcompute reserves the right to review, edit, or modify submitted content to improve clarity,
formatting, and presentation while maintaining the original intent and message.
These modifications are made to enhance the overall quality and readability of the published material.
Users acknowledge that Flexcompute may format or present the content in a way
that aligns with our editorial and visual standards.
4. Liability Disclaimer
Flexcompute shall not be held liable for any disputes arising from user-submitted content, including
but not limited to copyright claims, inaccuracies, or damages resulting from the publication of user content.
Users agree to indemnify Flexcompute against any claims or legal actions resulting from their submitted content.
5. Content Use Rights
By submitting content, users grant Flexcompute a non-exclusive, royalty-free, worldwide license to publish, distribute,
and promote the content for the purposes of showcasing user contributions and marketing our services.
This license does not transfer ownership of the content or any copyright to Flexcompute.
Users retain the right to withdraw their submissions at any time.
Upon request, Flexcompute will remove the content from its platform.
6. Privacy and Confidentiality
Users acknowledge that submitted content may be publicly accessible and therefore waive any
rights to confidentiality or privacy regarding the published material.
Flexcompute will not share personal information of users without
their consent, in accordance with our privacy policy.
Community Library
How the process works:
You submit your notebook.
You will get a permanent URL to promote your work.
Cite the URL as a reference for others in your upcoming papers to enhance the impact.
When someone clicks your URL, your notebook will be displayed.
Enter your email address below to receive the presentation slides. In the future, we’ll share you very few emails when we have new tutorial release, development updates, valuable toolkits and technical guidance . You can unsubscribe at any time by clicking the link at the bottom of every email. We’ll never share your information.