DOI: 10.5281/zenodo.8063932
title: Source code and simulation results: Poles and zeros of electromagnetic quantities in photonic systems

description: <strong>Summary</strong> This publication supplements the article "Poles and zeros of electromagnetic quantities in photonic systems" with tabulated data and matlab code that allows to reproduce the results. The article elaborates how evaluating resonances based on contour integrals of scalar electromagnetic quantities extends to computing zeros. Furthermore, direct differentiation of underlying scattering problems is used to compute sensitivities with respect to design parameters. <strong>Structure</strong> The script 'zeros_poles.m' can be used to reproduce the results provided in the paper. In tabulated form the results are contained in the directory <strong>tabulated</strong>. The directories <strong>RPExpand </strong>and <strong>scattering</strong> contain the software RPExpand and input files for JCMsuite. The version of RPExpand provided here is an extended version of the code available on Zenodo. The new features will be included in RPExpand v2 soon. <strong>Compute residues</strong> The modal expansion of the Fourier transform is based on its residues at the dominant resonances. If the poles are simple, which often is the case, the residues can be obtained directly from the eigenvectors of the generalized eigenvalue problem used to obtain the poles or the zeros. Introducing the Vandermonde matrix \(V = \begin{bmatrix} 1 & \dots & 1 \\ w_1 & \dots & w_M \\ \vdots & & \vdots \\ w_1^{M-1} &\dots & w_M^{M-1} \end{bmatrix}\), the Hankel matrix \(H\) can be written as \(H = V A V^T\) with \(A\) being the diagonal matrix \(\mathrm{diag}(a_1,\dots,a_M)\) containing the residues \(a_m \). This decomposition is a consequence of the Cauchy's reisdue theorem if the poles are simple. Furthermore, we now that \(V^{-T}\) solves the generalized eigenproblem \(H^&lt;X = HX\Omega\) (Eq. 2 in the original paper) and hence the eigenvectors we get from Matlabs eig routine are \(X = DV^{-T}\) where \(D\) is some scaling. It follows that we obtain the residues using \(A = X^T H X (X V)^{-2}\) <strong>Derivatives</strong> Similarly, our framework provides a straight forward approach to the derivatives of zeros and poles if they are simple. Using direct differentiation we have access to partial derivatives of the quantity \(q(\omega)\) and hence the derivatives of the moments \(s_k = \frac{1}{2\pi i} \oint_C \omega^k q(\omega) \mathrm{d}\omega\). For the zeros the inverse \(1/q(\omega)\) and the respective derivative are considered. Using Cauchy's residue theorem the derivatives \(\frac{\partial w_m}{\partial p}\)are solutions of the linear system of equations \(\frac{\partial s_k}{\partial p} = \sum_{m = 1}^{M}\left[k\omega_m^{k-1}\frac{\partial w_m}{\partial p} a_m + \omega_m^k\frac{\partial a_m}{\partial p} \right]\). <strong>Higher order singularities</strong> Finding higher order poles and zeros is possible without further adaptation. Computing derivatives and residues requires some special care. The moments are then given by \(s_k = \sum_{m=1}^{M} \sum_{n = 1}^{N_m} a_{m,n} \frac{k! \, \omega^{k-n+1}}{(k-n+1)!(n-1)!}\)with \(a_{m,n}\) being the residue of the pole \(\omega_m\) and \(n \) refers to the order. Accordingly expressions for the derivatives are available. <strong>Error estimates</strong> The estimated errors in Table 1 refer to the number of integration points, i.e. we are interested in the question how close we get with a given number of integration points to the exact solution of the chosen approximate model of the physical system. Due to propagation of the error the convergence of the derivatives is shifted towards a larger number of integration points. <strong>Requirements</strong> JCMsuite (version 5.4.3 or newer) MATLAB (tested with version R2019b) In order to run the scripts you must replace the corresponding place holder in 'zeros_poles.m' by a path to your installation of JCMsuite. Free trial licenses are available, please refer to the homepage of JCMwave. <strong>References</strong> [1] Felix Binkowski, Fridtjof Betz, Rémi Colom, Patrice Genevet, Sven Burger, Poles and zeros of electromagnetic quantities in photonic systems, https://doi.org/10.48550/arXiv.2307.04654 [2] Anthony P. Austin, Peter Kravanja, Lloyd N. Trefethen, Numerical algorithms based on analytic function values at roots of unity, SIAM Journal of Numerical Analysis 52, 1795 (2014), https://doi.org/10.1137/130931035 [3] Felix Binkowski, Fridtjof Betz, Martin Hammerschmidt, Philipp-Immanuel Schneider, Lin Zschiedrich, Sven Burger, Computation of eigenfrequency sensitivities using Riesz projections for efficient optimization of nanophotonic resonators, Communications Physics <strong>5</strong>, 202 (2022), https://doi.org/10.1038/s42005-022-00977-1
description: We acknowledge funding by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) under Germany's Excellence Strategy - The Berlin Mathematics Research Center MATH+ (EXC-2046/1, project ID: 390685689), by the German Federal Ministry of Education and Research (BMBF Forschungscampus MODAL, project 05M20ZBM), and by the European Innovation Council (EIC) project TwistedNano (grant agreement number Pathfinder Open 2021-101046424).