TMM-Fast: A Transfer Matrix Computation Package for Multilayer Thin-Film Optimization

Alexander Luce,Ali Mahdavi,Florian Marquardt,Heribert Wankerl
DOI: https://doi.org/10.1364/JOSAA.450928
2021-11-24
Abstract:Achieving the desired optical response from a multilayer thin-film structure over a broad range of wavelengths and angles of incidence can be challenging. An advanced thin-film structure can consist of multiple materials with different thicknesses and numerous layers. Design and optimization of complex thin-film structures with multiple variables is a computationally heavy problem that is still under active research. To enable fast and easy experimentation with new optimization techniques, we propose the Python package TMM-Fast which enables parallelized computation of reflection and transmission of light at different angles of incidence and wavelengths through the multilayer thin-film. By decreasing computational time, generating datasets for machine learning becomes feasible and evolutionary optimization can be used effectively. Additionally, the sub-package TMM-Torch allows to directly compute analytical gradients for local optimization by using PyTorch Autograd functionality. Finally, an OpenAi Gym environment is presented which allows the user to train reinforcement learning agents on the problem of finding multilayer thin-film configurations.
Computational Physics,Machine Learning,Optics
What problem does this paper attempt to address?
This paper aims to solve the problem of optimizing the optical response of multi - layer thin - film structures over a wide wavelength range and at different incident angles. Specifically, the paper focuses on how to design and optimize complex multi - layer thin - film structures, which may contain multiple materials, each with different thicknesses and a large number of layers. Such problems are computationally very complex and time - consuming. Therefore, the paper proposes a Python package named TMM - Fast to accelerate the reflection and transmission calculations of multi - layer thin - film structures, thus supporting the development of faster experiments and optimization techniques. ### Key problems solved in the paper: 1. **Computational efficiency**: Traditional multi - layer thin - film calculation methods take a long time to calculate when dealing with a large number of wavelengths and incident angles. TMM - Fast significantly reduces the calculation time through parallel computing, making it possible to generate large - scale data sets that can be used for training machine - learning models. 2. **Support for optimization algorithms**: TMM - Fast not only improves the calculation speed, but also provides the function of calculating gradients through the TMM - Torch sub - package, which allows for local optimization using PyTorch's automatic differentiation feature. This is especially important for gradient - based optimization algorithms, such as the BFGS algorithm, which can converge to local optimal solutions more quickly. 3. **Construction of a reinforcement - learning environment**: The paper also introduces an environment based on OpenAI Gym. This environment allows researchers to train reinforcement - learning agents to find the best multi - layer thin - film configurations. This environment views the design of multi - layer thin - films as a parameterized Markov decision process, generates multi - layer thin - films through a continuous sequence of actions, and gives rewards based on the degree of matching between the actual optical properties of the thin - film and the target properties. ### Summary: The main contribution of the paper is to provide an efficient and flexible tool, namely TMM - Fast and its related components. These tools not only accelerate the calculation process of multi - layer thin - films, but also support the application of advanced optimization techniques and machine - learning methods, thus promoting the research progress in the field of multi - layer thin - film design and optimization.