1 Introduction

Passive optical networks for indoor applications typically rely on multi-mode optical fibers to facilitate high-bandwidth communication over distances up to several hundred meters (IEEE 2010). For flexibility in connectivity, the link should be able to support multiple connections, without sacrificing the power budget or transmission distance. The relatively long fiber length is a strong motivation to make an expansion of the physical field (due to an excitation) in terms of the set of guided modes, i.e., the set of source-free solutions to Maxwell’s equations that may propagate unattenuated along the fiber. Although the set of guided modes are generally convenient vector fields to work with, for instance to analyze propagation effects such as constructive- and destructive interference patterns (Tsekrekos et al. 2007), or differential mode delay (Smink 2009), they are inherently specific to the waveguide under consideration and the wavelength of choice. In larger electromagnetic problems, for instance reflection-transmission problems at an interface that consists of two dissimilar waveguides at various offsets, it becomes impractical to work with two different bases on either side of the interface. The use of a single universal spatially localized basis would be more convenient, particularly if translations entail sparse operations.

The concept of combining global and local formulations are not unusual. For instance, in the eigencurrent approach to the linear embedding via Greens operators (LEGO) technique (Lancellotti et al. 2009) the computational domain is subdivided into smaller domains call bricks. Each brick encloses a complex structure with equivalent sources expanded in local Rao–Wilton–Glisson (RWG) functions on its boundary. To reduce the number of unknowns of the overall system, the set of eigenfunctions for each brick are spanned by RWG functions. Many of the equivalent-source eigenfunctions do not radiate, resulting in a quite sparse overall linear system of equation containing the interaction of the bricks.

On our agenda are large vectorial full-wave optical problems that consist of dissimilar optical fiber connectors with finite alignment precision and possibily separated by a slab of homogeneous material. For flexibility, a framework employing global-local basis functions may be more suitable to cope with connections of highly dissimilar waveguiding structures, for example consisting of optical fibers and integrated photonic circuits. The ability to tailor the basis functions to the physical size of the optical wavefields and match to the spatial frequencies allows for a high degree of flexibility.

Another example of combining global and local formulations is a beam-based phase-space source representation (Arnold 2002). It offers the localized behavior and flexibility of geometrical optics in the spatial domain, without sacrificing the uniform properties of spectral techniques in the spectral domain. A popular approach to discretize phase-space is the use of Gabor frames, named after Gabor for his idea in 1946 to describe one-dimensional audio signals in terms of two-dimensional elementary functions that contain both the local time and frequency information (Gabor 1946). The expansion functions are obtained by translations and modulations of a generating window function g, which essentially represent a discretization of the windowed spatial Fourier transform, mathematically formulated as

$$\begin{aligned} g_{qr}(x) = e^{j2 \pi \alpha qx} g(x - \beta r), \quad q,r\in {\mathbb {Z}}, \quad \alpha ,\beta ,x \in {\mathbb {R}}. \end{aligned}$$
(1)

Throughout this paper, we denote the unit imaginary number by \(j\). The window g, also called Gabor atom, can be moved in phase-space to an arbitrary coordinate on a grid spanned by \((\alpha q, \beta r)\) (Daubechies et al. 1991).

In order to expand an arbitrary function \(f(x) \in L^2\left( {\mathbb {R}}\right)\) through coefficients\(c_{qr}\) by

$$\begin{aligned} f(x) = \sum \limits _{q,r} c_{qr} g_{qr}(x), \end{aligned}$$
(2)

requires that the collection of functions \(g_{qr}\) in Eq. (1) span \(L^2({\mathbb {R}})\). To describe f with a minimum number of coefficients, Gabor proposed efficient sampling by selecting the product \(\alpha \beta =1\), and proposed a Gaussian window function g proportional to \(\exp \left( -\pi x^2\right)\) because it achieves good localization in both the spatial and spectral domain (Casazza 2001). Unfortunately, that Gabor scheme is numerically unstable (Daubechies et al. 1991). Actually, the Balian–Low theorem, developed much later, states that it is impossible to achieve good localization in both the spatial and spectral domain simultaneously for these choices (Benedetto et al. 1994). In particular, the Balian–Low theorem states that the function g(x) in Eq. (1) or its Fourier transform \({\hat{g}} (\xi )\) have an infinitely long tail, i.e., either \(\int x^2 | g(x) |^2 \,{\mathrm {d}}x = \infty\) or \(\int \xi ^2 | {\hat{g}}(\xi ) |^2 \,{\mathrm {d}}\xi = \infty\).

The expansion in Eq. (2) is possible if one chooses \(\alpha \beta < 1\), by using frames that were defined first by Duffin and Schaeffer (1952) in a paper on a deep mathematical problem involving nonharmonic Fourier series (Christensen 2014). By their definition, a set of functions \(g_{qr}\) are a frame if there are nonvanishing finite frame bounds A and B, that satisfy

$$\begin{aligned} A \Vert f\Vert ^{2} \le \sum \limits _{q,r} \left| \langle g_{qr},f \rangle \right| ^2 \le B \Vert f\Vert ^2 \end{aligned}$$
(3)

for all functions \(f \in L^2({\mathbb {R}})\). The inner products in Eq. (3) are denoted by \(\langle .,.\rangle\), and are linear in the second argument. It was due to fundamental mathematical research by Daubechies et al. (1986) and Janssen (1981) as well as others in the eighties that the connection was made between frames, wavelets and Gabor systems (Christensen 2014). In abstract frame theory studies, Gabor frames are often called Weyl–Heisenberg frames (Casazza 2001).

The choice \(\alpha \beta < 1\) leads to an oversampling of phase-space, rendering the frame, that is the collection of functions in Eq. (1), linearly dependent (Christensen 2002). In case \(\alpha \beta \le 1\), the associated frames are called tight when the frame bounds satisfy \(A=B\) (Daubechies et al. 1991). A tight Gabor frame may be redundant, but does not contain redundant functions when \(\alpha \beta = 1\). For \({\alpha}{\beta}=1\), the Balian–Low theorem prevents that the resulting basis has good phase-space localization, apart from the reported numerical instabilities (Daubechies et al. 1991). For a Gabor frame, the expansion in Eq. (2) is not unique (Jing 1999), however an expansion may still be obtained in a practical way with the construction of a canonical dual Gabor frame (Christensen 2014).

Although the redundancy may seem undesirable, Christensen (2014) has argued that the less restrictive frame condition make frames more flexible than orthonormal bases. Frames are not only appealing for theoretical studies, but have also been employed in many applications, including electromagnetics (Dilz and van Beurden 2017).

Fortunately, for large-scale problems where redundancy is undesirable, it turns out to be possible to construct an orthonormal basis that achieves good localization in both the spatial and spectral domain. In the work of Wilson (1987), the construction of bases with strong localization in phase-space entails basis functions with two peaks in the spectral domain. He called these functions generalized Wannier functions. Because of the two peaks, the spectral localization becomes duo-localization, to which the Balian–Low theorem does not apply. Daubechies et al. (1991) were inspired by this idea, and were able to construct an orthonormal basis starting from the same analytical constituents as Gabor frames. This leads to a Wilson basis with trigonometric bases constituents.

There are quite a number of research activities that involve Wilson bases, but these are predominantly of mathematical nature. For instance, studies that focus on its connection with Gabor frames (Bownik et al. 2017; Kaushik and Panwar 2013), construction of Wilson bases with arbitrary shapes (Bittner 1999; Chui and Shi 2000), or studies of discretized Wilson bases (Bolcskei et al. 1996; Kutyniok and Strohmer 2005). So far, the use of Wilson bases in electromagnetics has only been advocated by Arnold (2002).

In this paper we want to promote and demonstrate electromagnetic field expansions in a Wilson basis. The strong localization in phase-space with constituents that have a strong resemblence to wavefields allows for efficient field representations in this basis (Floris and de Hon 2012). Because of the orthonormality, the expansion may be obtained by straightforward projection integrals. In Sect. 3, we show that spatial field translations may be achieved directly in the Wilson basis with a sparse, diagonally dominant operator. This is an appealing feature, and useful for the evaluation of electromagnetically large reflection-transmission problems consisting of optical fibers with different but finite lateral alignment configurations. It means that computational effort to compute the field expansion is needed only once, and reflection-transmission problems may be generalized in terms of Wilson basis functions and coefficients. Due to that separation in two stages, we will dedicate this paper to Wilson basis expansion of electromagnetic waves. In a companion paper (Floris and de Hon 2018), we address reflection-transmssion problems in a Wilson basis. In that paper, the convergence of spectal convolution integrals of dyadic Green’s functions for electromagnetic field evaluation due to Wilson-basis discretized source distributions benefit from the spectral localization of the Wilson basis. This allows to extend to interfaces consisting of homogeneous half-spaces or homogeneous slabs. The effective localization in the spectral domain greatly improves the efficiency of the scheme.

In Sect. 2, we shall first give a brief summary of two ways to construct a Wilson basis given by Daubechies et al. (1991), where this subject is treated in great mathematical detail with abundant proofs. We show the construction through evaluation of an inverse Zak transform, as well as through Daubechies’ algorithm derived using the connection of Wilson bases and tight frames. Then, in Sect. 4, we construct Cartesian two-dimensional Wilson basis functions, and describe two methods to expand electromagnetic fields on planes in these 2D Wilson basis functions. First, we discuss a method that was proposed by Sullivan et al. (1989), that makes use of a Taylor-series expansion of the function to be expanded around the spatial coordinate where the basis function is also conveniently localized. It turns out that the resulting integrals are readily evaluated in the spectral domain. Although the method is particularly convenient for generalized Wannier functions, we show that the same approach is still valid for Wilson bases as proposed by Daubechies et al. (1991). For practical reasons, we also review the construction of numerical cubatures to evaluate inner products of two-dimensional Cartesian Wilson basis functions and fields that are represented in cylindrical polar coordinates.

In Sect. 5, we briefly summarize the construction of complex-source beam (CSB) wavefields, which are electromagnetic fields that satisfies Maxwell’s equations everywhere (except at a branch cut disc) and is constructed by inserting a complex source coordinate in the dyadic counterpart of the scalar Green’s function. A CSB is easily evaluated, convenient to test interface problems consisting of homogeneous media, and is a Maxwell-compliant model of a laser illuminating an optical fiber in the companion paper (Floris and de Hon 2018).

In Sects. 6 and 7, we give examples of complex-source beams and modal electromagnetic fields in the Wilson basis. First, we consider three CSBs illuminating a cross-sectional plane at three launch angles \(\theta _z \in (0{^\circ},40{^\circ},60{^\circ})\) at a distance equal to the radius of the source disc, so that the CSBs are diverging. The examples demonstrate that the high-frequency oscillations due to large angles of incidence are still well represented using a limited number of higher-order Wilson-basis functions.

The Wilson-basis expansion of modal electromagnetic fields involve multiple cubature rings to account for the discontinuities in the refractive index profile. By means of an example, we demonstrate the power distribution of an arbirary guided modal field in Wilson-basis coefficient space. It shows that including only a few levels of higher-order basis functions are already sufficient to accurately represent modal electromagnetic fields in the Wilson basis.

2 Wilson basis construction

In order to efficiently approach large scale problems, Sullivan et al. (1989) argue that calculations should involve orthogonal, complete, generic, local bases with useful analytic properties. The locality should apply to both position and spatial frequency (momentum in their case), to minimize the basis set size. The generalized Wannier functions introduced by Wilson (1987) satisfy these requirements. These basis functions are of the form

$$\begin{aligned} \psi _{qr}(x)=f_q(x-r),\quad q\in {\mathbb {Z}}_{>0}, \quad r\in {\mathbb {Z}}. \end{aligned}$$
(4)

We regard x as a spatial variable. The associated spectral functions \({\hat{f}}_q(\xi )\) are described by

$$\begin{aligned} {\hat{f}}_q(\xi )={\hat{\phi }}_q^+\left( \xi -\frac{q}{2}\right) + {\hat{\phi }}_q^-\left( \xi +\frac{q}{2}\right) , \end{aligned}$$
(5)

and have two peaks along the spectral coordinate \(\xi\), located at the spatial frequencies \(-q/2\) and \(q/2\), with \({\hat{\phi }}_q^+\) and \({\hat{\phi }}_q^-\) centered around zero. This amounts to an effective duo-localization, to which the Balian-Low theorem does not apply, because that is tied to the specific structure of \(g_{qr}\) in Eq. (1).

The formulation of Wilson bases by Daubechies et al. (1991) is of a similar form as Eq. (4), however is more elegant in the sense that it entails the construction of only one single symmetric, real-valued function \(\theta\), rather than many different functions \(f_q\) for every \(q\in {\mathbb {N}}\). Together with translations and modulations by means of trigonometric functions, the Wilson basis functions read

$$\begin{aligned}w_{\ell n}(x) = \left\{ \begin{array}{ll} \theta (x-n/2), & \ell =0, n\;\text { even},\\ 0, & \ell =0, n\;\text { odd},\\ \sqrt{2} \theta (x-n/2)\cos (2 \pi \ell x), & \ell>0, \ell +\,n\;\text {even}, \\ \sqrt{2} \theta (x-n/2)\sin (2 \pi \ell x), & \ell >0, \ell +\,n\;\text {odd}. \\ \end{array} \right. \end{aligned}$$
(6)

In the original formulation in Daubechies et al. (1991), the \(\ell =0\) case was defined by \(\theta (x-n)\) for all n. However, to achieve consistent displacement of the function \(\theta\) due to the parameter n for all values of \(\ell\), we have decided to change the indexing accordingly. The Wilson basis is orthonormal because the inner product of two basis functions satisfies

$$\begin{aligned} \int \limits _{x \in {\mathbb {R}}} w_{\ell n}^{\ast }(x)w_{\ell 'n'}(x) \,{\mathrm {d}}x = \delta _{\ell \ell '}\delta _{nn'}, \end{aligned}$$
(7)

where \(\ast\) denotes complex conjugation. With the aid of the (forward) Fourier transformation defined by

$$\begin{aligned} {\hat{w}}_{\ell n}\left( \xi \right) = \int \limits _{x \in {\mathbb {R}}} w_{\ell n}(x) e^{j2 \pi \xi x} \,{\mathrm {d}}x, \end{aligned}$$
(8)

we obtain the representation of the spectral counterpart of the Wilson basis functions in Eq. (6), which features the spectral duo-localization by

$$\begin{aligned} {\hat{w}}_{\ell n}(\xi ) = \left\{ \begin{array}{l l} e^{j\pi \xi n}\hat{\theta }(\xi ), &{} \ell =0, n\;\text { even},\\ 0, &{} \ell =0, n\;\text { odd},\\ \frac{1}{\sqrt{2}} e^{j\pi \xi n} \left[ \hat{\theta }\left( \xi + \ell \right) e^{j\pi \ell n} + \hat{\theta }\left( \xi - \ell \right) e^{-j\pi \ell n}\right] , &{} \ell>0, \ell +n\;\text { even}, \\ \frac{1}{j\sqrt{2}} e^{j\pi \xi n} \left[ \hat{\theta }\left( \xi + \ell \right) e^{j\pi \ell n} - \hat{\theta }\left( \xi - \ell \right) e^{-j\pi \ell n}\right] , &{} \ell >0, \ell +n\;\text { odd}. \end{array} \right. \end{aligned}$$
(9)

Now we only need to numerically construct the function \(\theta\), and its Fourier transform counterpart \(\hat{\theta }\). To achieve that, we adopted the procedure from the paper by Daubechies et al. (1991), and give a short summary here. In that paper, it is first shown, in great detail, that there is an equivalence between demanding orthonormality for all generalized Wannier functions \(\psi _{qr}\) in Eq. (4), and the frame condition in Eq. (3). More specifically, to achieve orthonormality among all functions \(\psi _{qr}\) with \(q\in {\mathbb {Z}}_{>0}, r\in {\mathbb {Z}}\) leads to infinitely many requirements on the shape of the single function \(\hat{\theta }\). These conveniently reduce to only one condition when transformed to the Zak domain. That unitary transformation to the Zak domain is achieved by the Zak transform \(U_Z\), which is defined in Daubechies et al. (1991) as

$$\begin{aligned} (U_Z{\hat{g}})(t,s) = \sqrt{2} \sum \limits _{l \in {\mathbb {Z}}} e^{2 \pi jt l} {\hat{g}}\left( 2(s-l)\right) , \end{aligned}$$
(10)

where in our case \({\hat{G}}(t,s) = (U_Z{\hat{g}})\) is the Zak-transform of a Gaussian window function. In particular, we define a Gaussian window function \({\hat{g}}_{\nu }(\xi )\) in the spectral domain that may be scaled along the spectral coordinate by a parameter \(\nu \in {\mathbb {R}}\) as

$$\begin{aligned} {\hat{g}}_{\nu }(\xi ) = (2\nu )^{1/4}e^{-\nu \pi \xi ^2}. \end{aligned}$$
(11)

The peculiar amplitude \((2\nu )^{1/4}\) ensures that the inverse Fourier transform \(g_{\nu }(x)\) is conveniently related to \({\hat{g}}_{\nu }(\xi )\) through \(g_{\nu }(x) = {\hat{g}}_{\frac{1}{\nu }}(x)\). The function \(\hat{\theta }\) in Eq. (9) may be obtained through the inverse Zak transformation of a function \({\hat{\varTheta }}\), defined by Daubechies et al. (1991)

$$\begin{aligned} {{\hat{\theta}}}(\xi ) = \frac{1}{\sqrt{2}} \int \limits _{0}^{1} {{\hat{\varTheta }}}\left( t,\frac{\xi }{2}\right) \,{\mathrm {d}}t, \quad \text {with}\; {\hat{\varTheta }}\left( {t,s}\right) = \frac{ \sqrt{2} {{\hat{G}}}\left( {t,s}\right) }{ \sqrt{ \left| {{\hat{G}}}\left( {t,s}\right) \right| ^2 + \left| {\hat{G}}\left( {t,s}+\frac{1}{2}\right) \right| ^2 } }. \end{aligned}$$
(12)

The specific fraction in the definition of \({\hat{\varTheta }}(t,s)\) ensures that the Zak-equivalent condition \(|{\hat{\varTheta }}(t,s)|^2 + |{\hat{\varTheta }}(t,s+\frac{1}{2})|^2=2\) associated with the orthonormality requirement (Daubechies et al. 1991), is satisfied. Indeed, this is easily verified through direct substitution of \({\hat{\varTheta }}(t,s)\) from Eq. (12) into this condition, and the use of Eq. (10) to rewrite \({\hat{G}}(t,s+1)=e^{j2\pi t}{\hat{G}}(t,s)\) by letting \(l \rightarrow l-1\).

For a window function \(g_{\nu }(\xi )\) with \(\nu =1/\sqrt{2}\), we evaluated \(\hat{\theta }(\xi )\) numerically using an N-point trapezoidal rule, and tested the accuracy using an adaptive Gauss–Krondrod rule to construct a reference function \(\hat{\theta }_{\mathrm {ref}}(\xi )\) for 1001 coordinates in \(\xi \in \left[ 0,8\right]\). We configured the Gauss–Kronrod quadrature to achieve accuracy down to the order \(10^{-14}\). The shape of \({\hat{\theta }}(\xi )\) is shown in the lower two graphs of Fig. 1. The absolute difference between the two integration methods are shown in both graphs of Fig. 2.

Fig. 1
figure 1

The spatial Wilson basis functions of Eq. (6) depend on translations and modulations of the function \(\theta (x)\), that is shown in the top two graphs. Its spectral counterpart \(\hat{\theta }(\xi )\) is shown in the bottom two graphs. The graphs on the right show that these functions have exponential decay in both the spatial and spectral domain

Fig. 2
figure 2

For a Gaussian windows \({\hat{g}}_{\nu }(\xi )\) with \(\nu =1/\sqrt{2}\), both graphs show the absolute difference between the numerical evaluation of \(\hat{\theta }(\xi )\) in Eq. (12) with a N-point trapezoidal rule compared to a reference function \(\hat{\theta }_{\mathrm {ref}}(\xi )\). The graph on the right shows that it suffices to limit \(l_{\mathrm {max}}\) to two to achieve machine precision for \(\xi \in \left[ -8,8\right]\). The left graph shows rapid decay of the absolute difference for increasing N

The graphs on the right show that it suffices to limit the sum over l in the Zak-transform in Eq. (10) to \(\lfloor s \rceil -l \in \left[ -l_{\mathrm {max}},l_{\mathrm {max}}\right]\) with \(l_{\mathrm {max}}=2\) to achieve machine precision for \(\xi \in \left[ -8,8\right]\). Here, \(\lfloor s \rceil\) denotes the integer nearest to s. The graph on the left shows that the absolute difference reduces two orders of magnitude each time the trapezoidal scheme employs two additional samples.

This example for the construction of \(\hat{\theta }(\xi )\) demonstrates fast convergence for a short and simple numerical code. Efficient evaluation of spectral Wilson basis functions is highly valuable, for instance to achieve fast convergence of convolution integrals of spectral dyadic Green’s functions for the evaluation of electromagnetic fields due to source distributions conveniently discretized in localized Wilson basis functions, especially when short distances are concerned. We do however also require that the inverse Fourier transformed counterpart \(\theta (x)\) is available to expand electromagnetic fields in the spatial domain.

Although the inverse Fourier transform \(\theta (x)\) may also be computed in a similar fashion as Eq. (12), it requires more work in the sense that it comprises the evaluation of four inverse Zak-transforms of scaled and modulated versions of the function \({\hat{\varTheta }}\) (Daubechies et al. 1991).

To avoid that, we continue with an alternative construction of the functions \(\theta (x)\) and \(\hat{\theta }(\xi )\), using the algorithm developed by Daubechies et al. (1991). They observed that the specific construction of a Wilson basis is linked to tight frames (\(A=B\) in Eq. 3), in the sense that skillfully choosing specific linear combinations of frame functions removes the redundancy entirely. To paraphrase Daubechies et al. (1991): “it is a small miracle that the result is an orthonormal basis!”. Although it is claimed that the algorithm is short and straightforwardly programmed (Daubechies et al. 1991), we dedicate the appendix to give a short and streamlined summary of the derivation of the algorithm. The appeal of using their algorithm is that the evaluation of the functions \(\theta (x)\) and \(\hat{\theta }(\xi )\) at their respective arguments entail the evaluation of a weighted sum of frame functions with coefficients \(a_{qr}\) that have Gaussian decay. The function \({\hat{\theta}}(\xi )\) is constructed through

$$\begin{aligned} {{\hat{\theta}}}(\xi )\!=\!\frac{2}{\sqrt{A+B}}\sum \limits _{q,r} a_{qr} {{\hat{g}}}_{qr}(\xi ), \,\,\,\text {with}\;{{\hat{g}}}_{qr}(\xi )\!=\!e^{j\pi q\xi }{{\hat{g}}}_{\nu }(\xi -r),\,\,\,\, {a_{qr}}\!=\!{\sum _k} {f_k}{b_{qr}^k}, \end{aligned}$$
(13)

and the inverse Fourier transformed function \(\theta (x)\) has a similar construction, i.e.,

$$\begin{aligned} \theta (x)\!=\!\frac{2}{\sqrt{A+B}}\sum \limits _{qr}a_{qr} {g_{qr}}(x), \,\,\,\text {with}\;{g_{qr}}(x)\!=\!(-1)^{qr}{{e}^{-j2 \pi rx}} {{\hat{g}}}_{\frac{1}{\nu }}(x - q/2). \end{aligned}$$
(14)

The coefficients \(a_{qr}\) are obtained with the aid of recurrence relations for \(f_k\) and \(b_{qr}^k\) that are respectively given in Eqs. (40) and (42) in the appendix. The coefficients \(a_{qr}\) need to be determined only once. Due to the similarity of construction, the evaluation of spatial and spectral basis functions require approximately an equal number of numerical operations to achieve an equal level of accuracy. Moreover, due to the closed form representation, certain mathematical operations such as inner products between displaced Wilson basis functions may be evaluated analytically, as we will show in Sect. 3.

Now we are left to determine the coefficients A and B, which depend on the choice of the parameter \(\nu\) in the Gaussian function. With the aid of the Zak transform in Eq. (10), the frame bounds A and B are then found by calculating

$$\begin{aligned} \begin{aligned} A&= \inf \limits _{s,t \in [0,1]} \left[ | (U_Z {\hat{g}}_{\nu })(t,s) |^2 + |(U_Z {\hat{g}}_{\nu })(t,s+1/2)|^2\right] , \\ B&= \sup \limits _{s,t \in [0,1]} \left[ | (U_Z {\hat{g}}_{\nu })(t,s) |^2 + |(U_Z {\hat{g}}_{\nu })(t,s+1/2)|^2\right] . \end{aligned} \end{aligned}$$
(15)

In view of the Gaussian decay of the window \({\hat{g}}_{\nu }\), and the small domain of s and t, the infinite sum in Eq. (10) can be reduced to incorporate only a few terms around \(l=0\).

We have selected \(\nu =1/\sqrt{2}\) for the Gaussian window, and obtained the bounds \(A=1.529887182\) and \(B=2.491627873\). In Fig. 1, the function \(\theta (x)\) (top) as well as its Fourier transform \(\hat{\theta }(\xi )\) (bottom) are shown, both on a linear and logarithmic scale. The figures on the right clearly visualize the exponential decay in both domains.

We have truncated the sum over \(q\) and \(r\) to \(\pm 31\) in Eq. (45), which is justified by the Gaussian decrease in \(q\) and \(r\) as seen in Eq. (44) in the appendix. To visualize the decay of the coefficients \(a_{qr}\) along the \(q\) and \(r\) index, we have plotted \(|a_{qr}|\) as function of \(q\) for increasing indices \(r\) in Fig. 3.

Fig. 3
figure 3

The absolute value of the coefficients \(|a_{qr}|\) demonstrating exponential decay in \(q\). The value for \(r\) associated with each line is given in the legend. The coefficients \(a_{qr}\) are defined in Eq. (45) and are used to construct \(\theta\) and \(\hat{\theta }\) in Fig. 1

The evaluation of the coefficients \(a_{qr}\) depend on the sum over k in Eq. (13) for \(a_{qr}\). The maximum absolute error of the functions \(\theta\) and \(\hat{\theta }\) due to the truncation in parameter k decays as \(\exp (-1.6k)\), so that summation up to \(k=16\) achieves an accuracy of the order \(10^{-12}\). We have subsequently truncated the set \(a_{qr}\) and only take the 120 dominant coefficients into account for the construction of \(\theta\) and \(\hat{\theta }\).

These graphs for \(\theta (x)\) and \(\hat{\theta }(\xi )\) for \(\nu =1/\sqrt{2}\) in Fig. 1 are different from those presented by Daubechies et al. (1991), although the algorithm and the coefficients for A and B are the same. We have strong reasons to suspect that the graphs presented in the otherwise excellent paper by Daubechies et al. (1991) are wrong (Arnold 2011).

In view of reflection-transmission problems, we want to expand electromagnetic fields in terms of Wilson basis functions at two-dimensional interface planes that are oriented perpendicular to the z-axis.

3 Field displacement in a Wilson basis

To address electromagnetic reflection-transmission problems for an interface that consist of two spatially displaced waveguides in a universal Wilson basis, we want to be able to displace electromagnetic fields in a Wilson basis as well. To achieve that, we need a translation operator, that maps all Wilson basis function to the set of displaced Wilson basis functions.

For example, it may readily be recognized from Eq. (6) that the operation \(n \rightarrow n-2\) for all basis functions essentially leads to \(w_{\ell n}(x) \rightarrow w_{\ell n}(x+1)\) which facilitates a displacement of the expanded field to \(x \rightarrow x-1\) along the spatial coordinate. So by shifting Wilson basis coefficients in coefficient space already achieves integer spatial displacements.

To achieve an arbitrary displacements so that \(x\rightarrow x-x_D\), we perform an expansion of displaced Wilson basis function in terms of non-displaced Wilson basis functions. Fortunately, because of the localization of the basis functions, these operations are sparse, in the sense that only a few inner products need to be evaluated. It is convenient to compute these inner products in the spectral domain,

$$\begin{aligned} \langle w_{\ell n}(x-x_d), w_{\ell 'n'}(x)\rangle = \int \limits _{\xi \in {\mathbb {R}}} {\hat{w}}_{\ell n}^{\ast}(\xi ){\hat{w}}_{\ell 'n'}(\xi ) e^{-j2\pi \xi x_d}\,{\mathrm {d}}\xi . \end{aligned}$$
(16)

Depending on the parity of \(\ell +n\) and \(\ell '+n'\) associated the Wilson basis functions \(\tilde{w}_{\ell n}(\xi )\) and \(\tilde{w}_{\ell 'n'}(\xi )\) defined in Eq. (9), the integral in Eq. (16) is equal to the weighted sum of one, two or four integrals of the form

$$\begin{aligned} I_{\begin{array}{c} \ell ,n\\ \ell '\!,n'\! \end{array}} = \int \limits _{\xi \in {\mathbb {R}}} \left[ {\hat{\theta}}(\xi +\ell ) e^{j\pi (\xi +\ell )n}\right] ^{\ast} \left[ {\hat{\theta}}(\xi +\ell ')e^{j\pi (\xi +\ell ')n'}\right] e^{-j2\pi \xi x_d} \,{\mathrm {d}}\xi . \end{aligned}$$
(17)

For instance, with \(\ell +n\) even and \(\ell '+n'\) odd, Eq. (16) equals

$$\begin{aligned} \left. \langle w_{\ell ,n}(x-x_d), w_{\ell 'n'}(x)\rangle \right| _{ \begin{array}{c} \ell +n\;\text { even} \\ \ell '+n'\text { odd} \end{array}} = \frac{1}{2j}\left( I_{\begin{array}{c} \ell ,n \\ \ell '\!,n'\! \end{array}} - I_{\begin{array}{c} \ell ,n\\ -\ell'\!,n'\! \end{array}} + I_{\begin{array}{c} -\ell ,n\\ \ell '\!,n'\! \end{array}} - I_{\begin{array}{c} -\ell ,n\\ -\ell'\!,n'\! \end{array}}\right) . \end{aligned}$$
(18)

Upon replacing \({\hat{\theta}}(\xi +\ell )\) and its complex conjugate by the expressions in Eq. (13) and rearranging terms, we infer that the integral I may be written as

$$\begin{aligned} I_{\begin{array}{c} \ell ,n\\ \ell '\!,n'\! \end{array}}\!=\! \frac{4e^{j\pi (\ell '\!n'\!-\ell n)}}{A+B} \sum _{q,r}\sum _{q'\!,r'\!} a^{\ast}_{qr} a_{q'\!r'\!} e^{j\pi (\ell '\!q'\! -\ell q)} \langle {\hat{g}}_{q+n,r-\ell },{\hat{g}}_{q'\!+n'\!-2x_d,r'\!-\ell '\!}\rangle , \end{aligned}$$
(19)

where the inner products of shifted and modulated frame functions \({\hat{g}}\) are readily evaluated in Eq. (44).

We have evaluated the integrals in Eq. (16), and visualize the power density distributions due to the projections of displaced Wilson basis functions \(w_{\ell ,n}(x-x_d)\) onto the non-displaced counterparts \(w_{\ell ',n'}(x)\) in Figs. 4 and 5. From left to right, the subfigures consider the expansion of \(w_{\ell ,n}(x-x_d)\) for increasing levels of \(\ell\) from zero to two, and displacements \(x_d \in (0,1)\). For convenience, we display the expansions of basis functions with \(n=0\), however these results generalize all cases of n even, although then \(n' \rightarrow n'+n\). In Fig. 4, the power density is grouped by \(\ell '\), and each of the six levels for \(\ell '\) is labeled and highlighted by a different color.

Fig. 4
figure 4

From left to right, the Wilson basis functions \(w_{\ell 0}(x-x_d)\) for \(\ell =0,1,2\) are displaced by \(x_d\) and projected onto the non-displaced counterparts \(w_{\ell ',n'}(x)\). Grouped by \(\ell '\), the strongest coupling occurs among basis functions that satisfy \(\ell '=\ell\), and have lower coupling when the mismatch in \(|\ell '-\ell |\) becomes larger. (Color figure online)

By orthonormality, at \(x_d=0\), the basis functions couple only to the same non-displaced counterparts. For displacements \(0\,<\,x_d\,<\,1\), the coupling is strongest among basis functions with a level \(\ell '\) equal to \(\ell\). The power coupling rapidly decreases as the difference \(|\ell - \ell '|\) becomes larger. For instance, in the middle and rightmost subfigures, the coupling is dominant among functions with \(\ell '=\ell\), followed by basis functions of the two neighboring levels \(\ell '=\ell -1\) and \(\ell '=\ell +1\). As \(x_d \rightarrow 1\), the power coupling occurs only to basis functions with \(\ell '=\ell\).

In Fig. 5, we visualize the same information, but now grouped by \(n'\) in each subfigure. Again, by orthonormality, at \(x_d=0\), the basis functions couple only to the same non-displaced counterparts as highlighted through the (overall descending) red curve. For \(0\,<\,x_d\,<\,1\), the coupling is dominant to only a few neighboring functions, and are weaker to basis functions that are spatially farther away. Particularly, we highlight the direct spatial neighbor \(n'=1\) through the (symmetric) black curve. In the left case, for \(\ell =0\), the contributions to the \(n'=1\) functions are those that satisfy \(\ell '>0\), because there are no basis functions tied to the \(\ell '=0\) and \(n'\) odd case. As a result, the contributions to the \(n'=1\) functions is more dominant in \(x_d\) in the subsequent graphs with \(\ell >0\). As expected, for \(x_d=1\), the basis function \(w_{\ell n}(x-1)\) couples entirely to \(w_{\ell ,n+2}(x)\) as highlighted through the (overall ascending) green curves.

Fig. 5
figure 5

From left to right, the Wilson basis functions \(w_{\ell 0}(x-x_d)\) for \(\ell =0,1,2\) are displaced by \(x_d\) and projected onto the non-displaced counterparts \(w_{\ell ',n'}(x)\). Grouped by \(n'\), the strongest coupling occurs among basis functions that are spatially nearby, and becomes weaker for basis functions that are spatially farther away. (Color figure online)

This demonstrates that an arbitrary spatial displacement of an electromagnetic field in a Wilson basis may be achieved through an operator that is sparse and dominant along the diagonal.

The numerical accuracy of the evaluation of inner products among Wilson basis functions depends on the number of coefficients \(a_{q,r}\) and \(a_{q',r'}\) included in Eq. (19). To supplement the absolute accuracy of the construction of Wilon basis functions (cf. Fig. 3), the truncation effect on the inner products of basis function \(w_{\ell n}\) and \(w_{\ell 'n'}\) in Eq. (16) for \(x_d=0\) are shown in Fig. 6.

Fig. 6
figure 6

The accuracy of the inner products \(<\!\!w_{0,n},w_{0,n+2p}\!\!>\) evaluated in the spectral domain for \(p \in {\mathbb {N}}\) unequal to zero are plotted in grey as function of the number of coefficients \(a_{qr}\) included in Eq. (19). The solid green curve represents \(|1-\!<\!\!w_{0,n},w_{0,n}\!\!>\!|\), and the orange dashed curve for \(<\!\!w_{0,0},w_{0,2}\!\!>\) has similar decay, whereas \(<\!\!w_{0,0},w_{0,12}\!\!>\), highlighted by the black dashed curve is lower but has a longer tail. The envelope is highlighted in red. For inner products evaluated numerically in the spatial domain with finite integration bounds \(x_{\mathrm {max}}=4\), shown with black crosses, the accuracy is bound to \(10^{-4}\), whereas for \(x_{\mathrm {max}}=8\), marked by blue plusses, \(10^{-8}\) may be achieved. (Color figure online)

The solid green (most rapidly descending) line visualizes the rapid decay of \(|1-\langle w_{0n}(x),w_{0n}(x)\rangle |\) upon including an increasing number of coefficients \(a_{qr}\) and \(a_{q'r'}\). It reaches \(10^{-12}\) upon incorporating at least 60 coefficients in both sums in Eq. (19). The dashed orange line represents the inner product of two neighboring basis functions \(\langle w_{0n}(x),w_{0,n+2}(x)\rangle\) and experiences a similar decay. The (thin) grey curves show the decay of all inner products \(\langle w_{0n}(x),w_{0,n+2p}(x)\rangle\) with \(p\in {\mathbb {Z}\setminus{\{0\}}}\). The larger the value of p, the slower the decay in the number of coefficients, although its maximum decreases rapidly as well. As an example, highlighted through the black dashed line, the inner product \(\langle w_{0n}(x),w_{0,12}(x)\rangle\) always keeps below \(10^{-6}\), but has a long tail that slowly decays. The envelope of all the curves is highlighted through the solid red line, and essentially quantifies the number of coefficients that should be included in the construction of the Wilson basis to achieve a desired level of accuracy in the inner products. Inner products of combinations of Wilson basis functions with \(\ell >0\) and \(\ell '>0\) do not change the envelope, and for that reason we did not include them in the figure.

Numerical evaluation of integrals with Wilson basis functions are relevant for the electromagnetic field expansions that we discuss in the next section, and demands finite integration bounds. To assess the impact of finite integration bounds on the accuracy of Wilson basis inner products \(\langle w_{\ell n}(x),w_{\ell ' n'}(x)\rangle\), we have employed an adaptive numerical integration scheme with an absolute tolerances set to \(10^{-10}\). Furthermore, we chose \(x\in [-x_{\mathrm {max}},x_{\mathrm {max}}]\).

The graph with black cross marks (\(\times\)) shows that the accuracy of Wilson basis inner products is bound to \(10^{-4}\) because of the finite integration bound set to \(x_{\mathrm {max}}=4\). The graph consists of four overlapping lines, and each line represents the worst offending deviation from orthonormality for basis functions with \(\ell =0\), and \(\ell ' \in (0,3)\). Before the lines saturate when more than 40 coefficients are included in the construction of the Wilson basis functions, the decay nicely follows the red envelope curve. Upon extending the integration bounds to \(x_{\mathrm {max}}=8\), denoted through the lines with blue plus marks (\(+\)), the accuracy of \(10^{-8}\) is achieved upon including upward of a 100 coefficients.

4 Field expansion in a Wilson basis

In this section, we show two possible ways to expand a function in a Wilson basis. Because we work with basis functions that are orthonormal with respect to the norm in Eq. (7), the coefficients \(c_{\ell n}\) that describe a function \(h(x) = \sum _{\ell ,n} c_{\ell n}w_{\ell n}(x)\) follow from

$$\begin{aligned} c_{\ell n} = \int \limits _{x \in {\mathbb {R}}} h(x) w_{\ell n}(x) \,{\mathrm {d}}x. \end{aligned}$$
(20)

In fiber optics, we are primarily interested in fields on 2-dimensional cross-sectional planes in cylindrical polar coordinates. Before we construct a numerical integration procedure to evaluate the integrals for these problems, we first review the approach as proposed by Sullivan et al. (1989) for a similar expansion as Eq. (20) but in terms of generalized Wannier functions. They recognized that integrals of the product of monomials and basis functions are readily evaluated in terms of derivatives of the spectral basis function at the zero coordinate (Sullivan et al. 1989). A Taylor-series expansion of the function h in Eq. (20) about the coordinate where the basis function peaks, leads to a sum of integrals of this form. Particularly for generalized Wannier basis function, many of these integrals subsequently vanish because of symmetry arguments as well as due to the localization property of the basis functions (Sullivan et al. 1989).

To assess whether the approach in Sullivan et al. (1989) is useful in for our case, we follow a very similar procedure as outlined in the appendix of Sullivan et al. (1989) but now for Wilson basis functions. The Wilson basis functions in Eq. (6) have a shape that depends on the parity of the sum \(\ell +n\), whereas the generalized Wannier functions satisfy \(\psi _{mn}(x) = \psi _{m0}(x-n)\) consisting of a set of (infinitely many) functions \(f_m\) as shown in Eq. (4). Hence, the equations are different, but the approach is the same.

First, we replace the function h in Eq. (20) by its Taylor-series expansion about the spatial coordinate \(x=n/2\) (where the Wilson basis functions \(w_{\ell n}\) are also localized), and obtain

$$\begin{aligned} c_{\ell n} = \sum \limits _{k=0}^{\infty } \frac{h^{(k)}(n/2)}{k!} \int \limits _{-\infty }^{\infty } \left( x-\frac{n}{2}\right) ^k w_{\ell n}(x) \,{\mathrm {d}}x. \end{aligned}$$
(21)

The integral over a polynomial times a Wilson basis function is readily evaluated in terms of derivatives of the spectral basis functions at the origin. Specifically, consider the \(k^{\mathrm {th}}\)-derivative of an \(\exp (-j\pi \xi n)\) phase-shifted spectral Wilson basis function in terms of the Fourier integral of Eq. (8). We obtain

$$\begin{aligned} \left. \frac{{\mathrm {d}}^k}{{\mathrm {d}}\xi ^k} e^{-j\pi \xi n} {\hat{w}}_{\ell n}(\xi ) \right| _{\xi =0}&= \left. (j2\pi )^{k} \int \limits _{x \in {\mathbb {R}}} \left( x-\frac{n}{2}\right) ^k w_{\ell n}(x) e^{j2\pi \xi \left( x-\frac{n}{2}\right) } \,{\mathrm {d}}x \right| _{\xi =0} \end{aligned}$$
(22)

which on the right-hand side includes the integral we wanted to evaluate in Eq. (21). The phase-term \(\exp (-j\pi \xi n)\) on the left-hand side conveniently cancels the phase-term that is present in \({\hat{w}}_{\ell n}\) in Eq. (9). Combining Eqs. (21) and (22), we infer that the coefficients \(c_{\ell n}\) are readily evaluated in the spectral domain by

$$\begin{aligned}&c_{\ell n} = \sum \limits _{k=0}^{\infty } \frac{h^{(k)}(\frac{n}{2})}{k!} (j2\pi )^{-k} \left. \frac{{\mathrm {d}}^k}{{\mathrm {d}}\xi ^k} e^{-j\pi \xi n} {\hat{w}}_{\ell n}(\xi ) \right| _{\xi =0} \nonumber \\&\quad = \sum \limits _{k=0}^{\infty } \frac{h^{(k)}(\frac{n}{2})}{k!(j2\pi )^{k}} \frac{{\mathrm {d}}^k}{{\mathrm {d}}\xi ^k}\left\{ \begin{array}{ll} \left. {\hat{\theta}}(\xi )\right| _{\xi =0}, &{} \ell =0, n\;\;\text {even} \\ 0 &{} \ell =0, n\;\;\text {odd}\\ \frac{1}{\sqrt{2}} \left[ {\hat{\theta}}\left( \xi \!+\!\ell \right) \!e^{j\pi \ell n} + {\hat{\theta}}\left( \xi \!-\!\ell \right) \!e^{-j\pi \ell n}\right] _{\xi =0}, &{} \ell>0,\ell +n\;\;\text {even}, \\ \frac{-j}{\sqrt{2}} \left[ {\hat{\theta}}\left( \xi \!+\!\ell \right) \!e^{j\pi \ell n} - \hat{\theta }\left( \xi \!-\!\ell \right) \!e^{-j\pi \ell n}\right] _{\xi =0}, &{} \ell >0,\ell +n\;\;\text {odd}. \end{array} \right. \end{aligned}$$
(23)

In this form, only the function \(\hat{\theta }\) depends on \(\xi\). The derivatives of this function may subsequently be evaluated by the sum in Eq. (45) albeit upon replacing \(g_{qr}\) by its \(k^{\mathrm {th}}\) derivative with respect to the argument. In contrast to the case of generalized Wannier functions in Sullivan et al. (1989), we can not identify terms that conveniently vanish for most k in Eq. (23). Moreover, this method demands that the \(k^{\mathrm {th}}\) derivative of the function h with respect to its argument can be determined accurately, and preferably efficiently.

With the numerical scheme for the Wilson basis available, and given that electromagnetic fields are generally obtained numerically as well, we resort to numerical integration to determine the Wilson basis coefficients. We proceed by constructing a numerical counterpart for the evaluation of Eq. (20) using numerical quadratures but for two-dimensional functions. In view of interfaces that consist of two dissimilar waveguides at each side of an interface, displacements with respect to the center of the interface are conveniently specificied in Cartesian coordinates. In a fashion similar to Eq. (20), we expand a two-dimensional function h(xy) in two-dimensional basis functions that are simply the product of two basis functions associated with the x- and y-coordinates. As a result, each two-dimensional basis function has four indices, which we abbreviate for convenience in terms of the multi-index \({\mathbf {i}}=(\ell_x,n_x,\ell_y,n_y)\), so that \(w_{\mathbf {i}}(x,y) = w_{\ell_x n_x}(x) w_{\ell_y n_y}(y)\). The coefficients due to the expansion of h(xy) are obtained by the integral

$$\begin{aligned} c_{\mathbf {i}}= \int \limits _{{\mathbf {r}}_T\in {\mathbb {R}}^2} h({\mathbf {r}}_T) w_{{\mathbf {i}}}({\mathbf {r}}_T) \,{\mathrm {d}}{\mathbf {r}}_T, \end{aligned}$$
(24)

where \({\mathbf {r}}_T= x {\mathbf {u}}_x+ y {\mathbf {u}}_y\) and \(\mathrm{d}\mathbf{r}_T\) is short for \(\mathrm{d}x\mathrm{d}y\). In order to match the width of the basis functions more appropriately to the electromagnetic fields, we introduce a scaling parameter d. To preserve the orthonormality property, the scaling also modifies the amplitude of the basis functions, i.e.,

$$\begin{aligned} w_{\ell n}(x) \rightarrow d^{-1/2}w_{\ell n}(x/d). \end{aligned}$$
(25)

There are a large number of guided modal electromagnetic fields associated with circularly symmetric optical fibers that we want to expand in the Wilson basis. For example, a standard multi-mode fiber at a wavelength of 850 nm supports about 180 guided modal fields (Floris et al. 2014). The computation of the modal fields in cylindrical coordinates comprises the numerical computation of fields along the radial coordinate, and the evaluation of an analytical Fourier expansion along the angular coordinate (Smink 2009). Depending on the shape of the refractive index profile of the fibers, electromagnetic field components (or their derivatives) may be discontinuous, for instance at the core-cladding interface. Therefore, we require that the numerical integration along the radial coordinate can be subdivided into appropriate subintervals.

To expand electromagnetic fields that are conveniently described in cylindrical polar coordinates in terms of Cartesian Wilson basis functions, one can of course always employ two nested adaptive quadratures, and make use of substitutions. However, in view of the large number of Wilson basis coefficients we wish to evaluate, that would become very time consuming.

We use cubatures, i.e., quadratures for more than one dimension, that are specifically constructed to numerically integrate over an annular region using a fixed cylindrical grid of abscissae of the form

$$\begin{aligned} \int \limits _{\rho _0}^{\rho _1} \int \limits _{0}^{2\pi } {\mathbf {h}}\left( \rho ,\varphi \right) \rho \,{\mathrm {d}}\rho \,{\mathrm {d}}\varphi \approx \sum \limits _{u=1}^{N_1} \sum \limits _{v=1}^{N_2} D_{uv} {\mathbf {h}}(\rho _u,\varphi _v). \end{aligned}$$
(26)

Here, the vector \({\mathbf {h}}(\rho ,\varphi ) = {\mathbf {f}}(\rho ,\varphi ) w_{\mathbf {i}}(\rho \cos \varphi ,\rho \sin \varphi )\) contains the electromagnetic field vector \({\mathbf {f}}\), and the Wilson basis function \(w_{\mathbf {i}}\). The weights \(D_{uv}\) and abscissae \(\rho _u\) and \(\varphi _v\) are known in literature, or can be constructed in such a way that Eq. (26) is solved exactly for functions \({\mathbf {h}}\) that are polynomial in x and y, with \(x=\rho \cos \varphi\) and \(y=\rho \sin \varphi\), up to a desired total degree (Peirce 1957). With those substitutions, the integration of polynomials in x and y over an annular region may be separated into two quadratures. Along the angular coordinate, a quadrature with equidistant abscissae with constant weights (achieved through a Chebyshev-Gauss quadrature, or a trapezoidal rule) suffices. Along the radial coordinate, a quadrature that accounts for the Jacobian \(\rho\) and integration bounds \(\rho _0\) and \(\rho _1\) may be constructed using, for example, a Golub-Welsch algorithm (Gil et al. 2007). An overview of known cubatures over a unit disc (i.e., for \(\rho _0=0\) and \(\rho _1=1\)) with weights and abscissae to achieve any set degree of polynomials with as few coefficients as possible are listed in Cools and Kim (2000).

For our purpose, it suffices to employ a Gauss-Legendre quadrature along the radial coordinate, and incorporate the Jacobian \(\rho\) directly. Neither electromagnetic fields nor the Wilson basis functions are polynomials, hence we need to ensure we take sufficient coefficients in both quadratures.

5 Complex source beam

In this section, we briefly describe the construction of electromagnetic complex source beam wavefields in homogeneous space. These fields may be mathematically generated by inserting a complex-valued spatial source coordinate in the dyadic counterpart of the scalar Green’s function (Heyman and Felsen 1986, 1989). The method was first introduced in the scalar case by Deschamps (1971) in the context of complex rays, by the realization that ray formulations with complex amplitude- and phase functions still satisfy the eikonal equation. The physical interpretation of these complex rays correspond to Gaussian beams (Deschamps 1972).

The electromagnetic fields due to source distributions may be formalized in terms of a volume integral over a dyadic Green’s function operating on a source vector distribution. In case of a combination of electric and magnetic dipole sources, the volume integral reduces to

$$\begin{aligned} \left[ \begin{array}{l} {\mathbf {E}}\\ {\mathbf {H}}\end{array} \right] = \left[ \begin{array}{ll} {\mathsf {G}}_{\mathrm {ee}}&{} {\mathsf {G}}_{\mathrm {em}}\\ {\mathsf {G}}_{\mathrm {me}}&{} {\mathsf {G}}_{\mathrm {mm}}\end{array} \right] \left[ \begin{array}{l} J_d{\mathbf {J}}^u\\ K_d{\mathbf {K}}^u\end{array} \right] , \end{aligned}$$
(27)

The vectors \(\mathbf {J}^u\) and \(\mathbf {K}^u\) denote the electric and magnetic dipole unit vectors respectively, and \(J_d\) and \(K_d\) the respective amplitudes. \(\mathsf {G}\) denotes the dyadic Green’s function comprising the electromagnetic field response (e and m subscripts) due to electric and magnetic dipoles (e and m subscripts).

We assume an \(\exp \left( j\omega t\right)\) dependence on time t, where \(\omega\) denotes the angular frequency. For a homogeneous medium with permittivity \(\varepsilon\) and permeability \(\mu\) equal to the free-space permeability \(\mu _0\), the refractive index n satisfies \(n^2 =\varepsilon /\varepsilon _0\), with \(\varepsilon _0\) the free-space permittivity. For such media, the four dyads in Eq. (27) may be derived from Maxwell’s equations (e.g., see Felsen and Marcuvitz 1994). To briefly show that, consider the inhomogeneous dyadic wave equation,

$$\begin{aligned} \left( \nabla \times \nabla \times - k^2\right) {\mathsf {G}}_{\mathrm {ee}}= -j\omega \mu {\mathsf {I}}\delta ({\mathbf {r}}- {\mathbf {r}}'), \end{aligned}$$
(28)

where the wavenumber \(k=k_0 n^2\) contains the free-space wavenumber \(k_0 = 2\pi /\lambda\) related to the free-space wavelength \(\lambda\). \(\mathsf {I}\) is the identity dyad, and \(\mathbf {r}\) and \(\mathbf {r}'\) are the observation and source coordinates. Eq. (28) may be rewritten to the dyadic equivalent of Helmholtz equation, with the aid of the dyadic identity \(\nabla \times \nabla \times {\mathsf {G}}_{\mathrm {ee}}= \nabla \nabla \cdot {\mathsf {G}}_{\mathrm {ee}}- \nabla ^2 {\mathsf {G}}_{\mathrm {ee}}\). Hence the term \({\nabla\nabla\cdot\mathsf {G}}_{\mathrm {ee}}\) may be obtained from the dyadic counterpart of the Maxwell–Ampère equation, and satisfies \(\nabla \nabla \cdot {\mathsf {G}}_{\mathrm {ee}}= -\left( j\omega \varepsilon \right) ^{-1} \nabla \nabla \cdot {\mathsf {I}}\delta ({\mathbf {r}}- {\mathbf {r}}')\). Combining these last two equations allows to rewrite Eq. (28) as,

$$\begin{aligned} \left( \nabla ^2 + k^2\right) {\mathsf {G}}_{\mathrm {ee}}= j\omega \mu \left( {\mathsf {I}}+ k^{-2}\nabla \nabla \right) \delta ({\mathbf {r}}- {\mathbf {r}}'). \end{aligned}$$
(29)

Using the identity \(-\delta ({\mathbf {r}}-{\mathbf {r}}')=\left( \nabla ^2+k^2\right) G({\mathbf {r}},{\mathbf {r}}')\), with \(G({\mathbf {r}},{\mathbf {r}}')\) representing the scalar Green’s function

$$\begin{aligned} G= (4\pi |{\mathbf {r}}-{\mathbf {r}}'|)^{-1}\exp (-jk|{\mathbf {r}}-{\mathbf {r}}'|), \end{aligned}$$
(30)

it is easily seen that the dyadic Green’s function, generated by electric dipoles of arbitrary orientation, is related to \(G\) by

$$\begin{aligned} {\mathsf {G}}_{\mathrm {ee}}= -j\omega \mu \left( {\mathsf {I}}+ k^{-2} \nabla \nabla \right) G. \end{aligned}$$
(31)

The dyadic representation of the associated magnetic field is obtained through the Maxwell–Faraday equation and reads

$$\begin{aligned} {\mathsf {G}}_{\mathrm {me}}= \nabla G\times {\mathsf {I}}. \end{aligned}$$
(32)

Similarly, a magnetic dipole source leads to \({\mathsf {G}}_{\mathrm {mm}}= -j\omega \varepsilon \left( {\mathsf {I}}+ k^{-2} \nabla \nabla \right) G\) and \({\mathsf {G}}_{\mathrm {em}}= -\nabla G\times {\mathsf {I}}\).

Insertion of a complex source coordinate \({\mathbf {r}}'= j{\mathbf {b}}\) in the argument of the Green’s function, with \({\mathbf {b}} = b{\mathbf {u}}_b, b \in {\mathbf {R}}\), leads to a complex source beam (CSB) in the beam direction \({\mathbf {u}}_b\). Care must be taken in the evaluation of the associated electromagnetic fields, because of the branch cut associated with \(\left| {\mathbf {r}}-{\mathbf {r}}'\right|\) in Eq. (30). We keep to the so-called source region for all the observation coordinates \(\mathbf {r}\) by ensuring that \({\text {Re}}\left\{ {\mathbf {r}}-{\mathbf {r}}'\right\} >0\) (Heyman and Felsen 1989). We are free to choose the electromagnetic dipole amplitude and orientations. We follow Cullen and Yu (1979), and let the electric and magnetic dipole vectors be oriented perpendicular with respect to each other, and with respect to the beam direction \({\mathbf {u}}_b\). Furthermore, we choose the amplitude of the electric and magnetic source amplitude vectors in such a way that \(J_d = - Z_0 K_d\), where \(Z_0=\sqrt{\mu _0/\varepsilon _0}\) denotes the free-space impedance. This achieves almost equal on-axis contribution from the \(J\) and \(K\) dipole sources. The beam has a Gaussian-like shape. We now proceed with the expansion of this field in a Wilson basis.

6 Expansion of a complex-source beam in a Wilson basis

We want to expand complex-source beams (CSB) in a Wilson basis for several reasons. The Gaussian beam-shaped electromagnetic field is a very convenient representation for an optical light source, that may be used to illuminate an optical fiber. This reflection-transmission problem can be solved upon constructing scattered electromagnetic fields that have equivalent electromagnetic source distributions located at the interface, in such a way that the sum of the incident and scattered electromagnetic fields match the transmitted field in the fiber at the interface. CSBs are particularly useful to test our implementation for the electromagnetic field evaluation at an interface \(z=z_1\) due to equivalent sources at another interface \(z=z_0\). The reason is that CSBs are easily evaluated at any interface including \(z=z_1\), as long as we keep away from the branch cut. We demonstrate the approach for solving electromagnetic reflection-transmission problems in a Wilson basis in a companion paper (Floris and de Hon 2018).

We have expanded three complex source beams in a Wilson basis with the aid of numerical cubatures of Eq. (26). We constructed one complex source beam with a beam vector \({\mathbf {b}} = b_z {\mathbf {u}}_z\) using \(b_z=70\) µm at a wavelength of \(\lambda =1.55\) µm in free-space, and subsequented tilted about the x-axis in the positive y-direction by \(\theta _z = 0{^\circ}\), \(\theta _z=40{^\circ}\) and \(\theta _z=60{^\circ}\).

Fig. 7
figure 7

For three complex-source beams incident on a cross-sectional plane with an angle \(\theta _z\), the accumulation of the total power is shown as function of the number of Wilson-basis expansion coefficients. The larger the angle of incidence, the more coefficients are necessary to accurately describe the electromagnetic field. The black-dashed line denotes the power density for a \({\mathrm {LP}}_{3,1}\) modal electromagnetic field

For the expansion in the plane \(z=70\) µm, we used a cubature disc with bounds \(\rho _0=0\) and \(\rho _1=100\) µm, using 400 samples along the radial coordinate and 1600 samples along the angular coordinate \(\varphi \in \left[ 0,2\pi \right]\). At this distance, the electromagnetic field is diverging, yet not very much in that the total power of the electromagnetic field captured within the cubature disc is equal up to at least 6 digits, for all three tilted beams. We did however displace the cubature in the y-direction to the coordinate \(y_0 = 70 \tan (\theta _y)\) µm, to account for the beam displacement. We have expanded the field in basis functions with \(l_x, l_y \in (0,6)\) and \(n_x,n_y \in (-40,40)\). This leads to a grand total of 321489 Wilson basis coefficients. We are only interested in the coefficients that significantly contribute to the expansion. By orthonormality of the Wilson basis, the power through the cross-sectional plane evaluated by the integral over the z-directed Poyning vector may be determined directly in the Wilson basis. Fortunately, we only need to consider a small subset of coefficients as shown in Fig. 7. For the three tilded CSBs, the deviation from the total power of the CSB that is incident on the cubature disc is shown as function of increasing number of expansion coefficients.

Fig. 8
figure 8

In blue, in the top graph, the highly oscillatory electric field for a beam tilted by \(\theta _z=60{^\circ}\) is plotted along the line \(x=0\), \(z=70\) µm. In red, along the line \(x=0\), \(z=5\) µm, the field is highly collimated, however is suddenly cut-off because the observation plane crosses the tilted source disc. In the lower graph, we give examples of Wilson basis functions scaled to commensurate with the size of the CSB. (Color figure online)

For normal incidence, a power accuracy of \(10^{-5}\) is achieved through less than 500 coefficients. The larger the angle of incidence, the more coefficients are necessary because those CSBs are more spread out and contain higher spatial frequencies.

For instance, in blue, at the top of Fig. 8, we have plotted the real part of the highly oscillatory x-component of the electric field of a CSB that is tilted along the y-axis with \(\theta _z=60{^\circ}\), along the line \(x=0\), \(z=70\) µm. It shows that the beam field is asymmetric and diverging, whereas in red, for an observation at a cross-sectional plane at \(z=5\) µm, the beam is highly collimated. However, at this distance, the tilted source disc crosses the observation plane, causing a sudden cut-off of the electromagnetic fields. This is to demonstrate that one must remember to account for the source disc of a CSB. At the bottom in Fig. 8, we have visualized the size and shape of the pertaining Wilson basis functions that are scaled to be commensurate with the size of the CSB through Eq. (25) with \(d=5.47\) µm.

Judging from the frequency of the oscillations, it may be noticed that it suffices to include basis functions up to the level \(\ell =3\). As evidence for that, we have plotted the power distribution for the entire CSB in the Wilson basis for different combinations of \(\ell_x\) and \(\ell_y\) in Fig. 9. Without paying attention to the specific lines in each of the four figures yet, it may already be noticed that the electromagnetic fields do not heavily oscillate along the x-coordinate, because the power levels are the highest in the leftmost figure for \(\ell_x=0\) and decrease consistenly for increasing levels of \(\ell_x\). Actually, in case \(\theta _z=0\), denoted by the blue line, the decay of the power distribution is the same for \(\ell_x\) as it is for \(\ell_y\), due to the comparable oscillations of the electromagnetic field along the x- and y coordinates. As the angle \(\theta _z\) is increased to 40° and 60°, the power distribution changes to higher levels in \(\ell_y\).

Fig. 9
figure 9

Grouped by \(\ell_x\) the power distribution of three entire complex-source beams are plotted as function of \(\ell_y\). For normal incidence (\(\theta _z=0\)), the power distribution in \(\ell_x\) and \(\ell_y\) are similar, whereas for larger angles of incidence, the power distributions of the y-directed electromagnetic fields change to higher levels in \(\ell_y\) to represent the higher spatial frequencies observed at the cross-sectional plane

We have demonstrated the expansion of complex source beams in a Wilson basis. In view of reflection-transmission problems for interfaces involving optical fibers, we proceed with an example of the Wilson basis expansion of guided modal electromagnetic fields.

7 Expansion of modal electromagnetic fields in a Wilson basis

We mentioned before that circularly symmetric optical fibers may have discontinuities in the refractive index profile along the radial coordinate. For instance, step-index optical fibers, or trench-assisted multi-mode optical fibers have discontinuities, or a step in the derivative, for instance at the core-cladding interface. To cope with those, we employ multiple cubatures that integrate over annular regions.

As an example, we show an electric field component of a linearly polarized \({\mathrm {LP}}_{3,1}\) mode in Fig. 10 that is associated with a trench-assisted space-division multiplexing (SDM) fiber with a profile that is shown in Sillard et al. (2014). In this example, we have employed a scalar approximation for the electromagnetic fields, which is common in the field of space-division multiplexing, and facilitates a labeling of mode groups. Each mode group consists of a finite number of guided modes that have similar optical properties, such as phase velocities. The number of mode groups are a measure for the number of independent transmission channels that may be formed in the SDM fiber.

In Fig. 10, we have plotted the real part of the x-component of the electric field of a relatively high-frequency \({\mathrm {LP}}_{3,1}\) modal electromagnetic field, that is associated with the fourth mode group.

Fig. 10
figure 10

The power density in the Wilson-basis coefficients is visualized through the power accumulation for each \(n_x\)-coordinate for integer levels of \(\ell_x+\ell_y\) (shown right) that is associated with the Re\(\left\{E_x(x,y)\right\}\) field of the \(\mathrm{LP}_{3,1}\) mode (shown left)

On the right, we have plotted the power distribution in Wilson-basis coefficient space. We limit the expansions of the modal electromagnetic fields to \(\ell_{x},\ell_{y} \in (0,3)\). By grouping the power distribution to integer levels of \(\ell _x+\ell _y\), we observe that low-order Wilson basis functions dominantly contribute to the field expansion, especially for \(n_x\) small. At each coordinate \(n_x\), the sum of the power over all \(n_y\) is included. As the level \(\ell _x + \ell _y\) increases, the density of accumulated power decreases. The combinations for \(\ell _x + \ell _y>3\) stay below \(10^{-6}\) and are not added to the graph. As shown in Fig. 7, upon incorporating about 600 dominant coefficients, unit power is achieved to an accuracy of \(10^{-5}\).

8 Discussion

We have demonstrated Wilson-basis expansions of electromagnetic fields, in preparation to solving electromagnetically large reflection-transmission problems in a more general setting in a companion paper (Floris and de Hon 2018). The characterization of electromagnetic fields through coefficients in a Wilson basis, which in turn optimally samples phase-space with constituents that share similarity to Gaussian wavefields (Arnold 2002), effectively detaches the electromagnetic scattering problem from the specific optical structures or devices present at the interface. The global-local Wilson basis functions thus allow for efficient expansions of high-frequency electromagnetic fields (cf. Fig. 7), with coefficients that are obtained through straightforward projection integrals. Furthermore, a spatial translation of an electromagnetic field in the Wilson basis, for instance due to a reconfiguration of an interface problem, comprises a sparse, diagonally dominant translation operator (cf. Figs. 4 and 5). Although the expansion needs to be computed first to a desired degree of accuracy, the flexibility to reconfigure an interface by reusing computational effort, and the generalization of scattering problems in the Wilson basis that come in return are rewarding.

The construction of the Wilson basis in the paper by Daubechies et al. (1991) has received much attention, but primarily in a mathematical context. Following their approach, we have demonstrated that Wilson basis functions may indeed be constructed via an inverse Zak transformation, or via Daubechies’ algorithm that was derived through the connection to theory of frames. Although both approaches have their appealing aspects, our prime objective is to promote and demonstrate the use of the basis functions for electromagnetic field problems.

We have demonstrated the expansion of complex-source beam (CSB) wavefields in a Wilson basis. CSBs are Maxwell-compliant wavefields that may be used as sources to illuminate an optical interface. We have demonstrated the illumination of an interface by a divergent CSB for three angles of incidence between 0° and 60°, and visualized the power distribution in coefficient space of the Wilson basis (cf. Fig. 9). In a similar fashion, we have expanded modal electromagnetic fields in a Wilson basis. In a companion paper (Floris and de Hon 2018), we consider interface problems consisting of optical fibers and homogeneous media, to which modal fields and CSBs in a Wilson basis are key ingredients. Moreover, the strong localization of Wilson basis functions in both the spatial and the spectral domain aid in the convergence of Green’s function integrals in Floris and de Hon (2018).