Mathematics of RCWA — Rigorous Coupled Wave Analysis 1.0 documentation

# Mathematics of RCWA

This section is for developers who want to understand the implementation of this package, for example, to implement their own manipulations on top of it or extend functionality. It follows the formulation laid out by Rumpf. This is intended as a reference for developers with a fairly advanced electromagnetics and mathematics background, and assumes a knowledge of electromagnetic modes, vectors, matrices, matrix multiplication, and vectors and matrices composed of other vectors and matrices.

## Definitions and Conventions

> \(N_{x}\): number of harmonics along x-direction
> \(N_y\): number of harmonics along y-direction.
> \(N_{tot} = N_x * N_y\): Total number of harmonics
> \(n_x\): Used to index the x-harmonics. Ranges from negative to positive.
> \(n_y\): Used to index the y-harmonics. Ranges from negative to positive.
> \(E\): Electric Field
> \(H\): Magnetic Field
> \(s\): Electtric field (Fourier) coefficient
> \(u\): Magnetic field (Fourier) coefficient
> \(c\): Mode coefficient
> \(W\): Electric field coefficient mode matrix
> \(V\): Magnetic field coefficient mode matrix

Layer “0” is the incident layer. Layer “1” is the layer closest to the incident region.

## Fields and Field Coefficients

The formulation of rigorous coupled wave analysis involves decomposing the electric and magnetic fields into their plane wave components. Rather than working with the electric field \(E_x\) directly, we work instead with the field coefficients \(s_x\).

\[E_x (x, y, z) = \sum_{n_x = -\infty}^{\infty} \sum_{n_y= -\infty}^{\infty} s_x(n_x, n_y, z) * e^{-j \left(k_x(n_x, n_y)*x + k_y(n_x, n_y)*y \right)}\]

Where

\[\begin{split}k_x(n_x, n_y) = k_{x, incident} - n_x * T_{1, x} - n_y * T_{2, x} \\ k_y(n_x, n_y) = k_{y, incident} - n_x * T_{1, y} - n_y * T_{2, y}\end{split}\]

where \(T_1\) and \(T_2\) are the lattice parameters of the photonic crystal under study. If a 1D grating is used, \(T_2 = 0\). For thin films, \(T_1\) is also zero, and only one harmonic needs to be represented - the incident harmonic.

Note that the field coefficients are, in general, a function of z.

## Field Coefficients

The electric (\(s\)) and magnetic (\(u\)) field coefficients are internally represented by vectors which have both x- and y-components, and these are different for each. Taking just electric field coefficient vector in the i-th layer:

\[\begin{split}s_{i}(z) = \begin{bmatrix} s_{i, x}(z) \\ s_{i, y}(z) \end{bmatrix}\end{split}\]

The length of the \(s_{i,x}\) and \(s_{i,y}\) vectors have length equal to \(N_{tot}\), so the total length of the \(s_{i}\) vector is \(N_{tot}*2\). These vectors are indexed \((n_x, n_y)\). For a \(N_x=3\) and \(N_y=3\) setup, the vector looks like this:

\[\begin{split}s_{i, x} = \begin{bmatrix} s_{i, x}(1, 1) \\ s_{i, x}(1, 2) \\ s_{i, x}(1, 3) \\ s_{i, x}(2, 1) \\ s_{i, x}(2, 2) \\ s_{i, x}(2, 3) \\ s_{i, x}(3, 1) \\ s_{i, x}(3, 2) \\ s_{i, x}(3, 3) \\ \end{bmatrix}\end{split}\]

The x-component of the zero-order harmonic corresponds to the field coefficient \(s_{i,x}(2, 2)\).

These field coefficients are, in general, functions of the z-coordinate. This makes them awkward to work with directly, which is why we typically work with mode coefficients instead.

## Mode Coefficients

Internally, this package typically works with mode coefficients, referred to using the symbol \(c\). Forward-propagating mode coefficients inside the \(i^{th}\) layer are represented with the symbol \(c_{i}^+\) and backward-propagating mode coefficients inside the \(i^{th}\) layer are represented with the symbol \(c_{i}^-\). Each mode has a single value of \(k_z\), the propagation constant in the \(z\)-direction. You could say this is what defines a mode. For planar films, the modes are always plane waves. For 1D- and 2D-photonic crystals, they require several plane waves (harmonics) to represent.

Just as with field coefficients, both the x- and y-components of the mode coefficients must be kept internally. As with the field coefficients, both forward- and backward-propagating mode coefficients are represented with the x-components followed by the y-components.

\[\begin{split}c_{i}^+ = \begin{bmatrix} c_{i, x}^+ \\ c_{i, y}^+ \end{bmatrix}\end{split}\]

\(c_{i,x}^+\) and \(c_{i,y}^+\) are vectors with length equal to the total number of harmonics (i.e. for a 2D photonic crystal if \(N_x = 3\) and \(N_y=3\), then \(N_{tot} = N_x * N_y = 9\), and the length of the total vector \(c_{i}^+\) is 18.

## Scattering Matrices couple Mode Coefficients

The scattering matrix for the \(i^{th}\) layer relates the forward- and backward propagating mode coefficients between the \(i^{th}\) and \(i+1^{th}\) layer in the following way:

\[\begin{split}\begin{bmatrix} c_{i}^- \\ c_{i+1}^+ \end{bmatrix} = \begin{bmatrix} S_{i,11} & S_{i, 12}\\ S_{i, 21} & S_{i, 22} \end{bmatrix} \begin{bmatrix} c_{i}^+ \\ c_{i+1}^- \end{bmatrix}\end{split}\]

This can be rearranged to solve for the \(i+1^{th}\) mode coefficients given the \(i^{th}\) mode coefficients.

### Electric Field Coefficients

The mode coefficients in the \(i^{th}\) layer can be related to directly to the x- and y-components of the electric fields (\(s_x\) and \(s_y\)) using the electric mode matrix, represented with the symbol \(W\). This matrix takes the forward- and backward-traveling mode coefficients and converts them into the electric field coefficients. The values of \(k_z\) for each mode are also needed, which are assembled diagonally along the \(\lambda\) matrix.

\[\begin{split}\begin{bmatrix} s_{i,x} \\ s_{i,y} \end{bmatrix} = W . e^{- \lambda z} . c_{i}^+ + W . e^{- \lambda z} . c_{i}^-\end{split}\]

### Magnetic Field Coefficients

Similarly, the mode coefficients in the \(i^{th}\) layer can be related to the x- and y-components of the magnetic field coefficients \(u_x\) and \(u_y\) using the magnetic mode matrix, represented with the symbol \(V\), along with, as before, the \(\lambda\) matrix.

\[\begin{split}\begin{bmatrix} u_{i,x} \\ u_{i,y} \end{bmatrix} = - V . e^{- \lambda z} . c_{i}^+ + V . e^{- \lambda z} . c_{i}^-\end{split}\]

## Finding Mode coefficients inside an arbitrary layer

Once the scattering matrices for each layer \(S_i\) are known, the incident mode coefficients \(s_0\) are known and the global scattering matrix \(S_{global}\) is known, the mode coefficients in an arbitrary layer can be calculated.

First, the mode coefficients in the incident region must be found. To do this, you can find the m. \(c_0^+\) using the \(W_{incident}\) matrix and \(s_{incident}\) vector (which contains the x- and y-components of the zero-order harmonic), and \(c_0^-\) can be calculated from the global scattering matrix. Note that \(s_{incident}\) is not the same as \(s_0\), which also contains the reflected field coefficients.

\[c_0^+ = W_{incident}^{-1} s_{incident} c_0^- = S_{global, 11} c_0^+\]

Then, by applying the formula below as many times as is required, mode coefficients within the desired layer can be found:

\[\begin{split}c_{i+1}^{-} = S_{i, 12}^{-1} c_i^{-} - S_{i, 12}^{-1} S_{i,11} c_i{+} \\ c_{i+1}^{+} = S_{i, 21} c_{i}^{+1} + S_{i,22} c_{i+1}{-}\end{split}\]

## Find E/H Coefficients inside an arbitrary Layer

Once the mode coefficients have been found, the electric and magnetic field coefficients can be found as described previously. Note that at this point, the field coefficients will still be a function of the z coordinate.

## Finding the electric and magnetic fields inside an arbitrary layer

### Electric Fields

Once the electric field coefficients are known, the electric fields can be calculated using the formula above for a certain value of \(x\) and \(y\), as a function of \(z\).

First, the diagonal k-matrices \(K_x\) and \(K_y\) can be converted into vectors \(k_x\) and \(k_y\). Then, the complex exponential can be evaluated element-wise directly:

\[e_{vec} = e^{-j \left(k_x * x + k_y * y \right) }\]

This is itself a vector with the same length as \(s_x\). The dot product (NOT inner product, there is no complex conjugation) of this vector and the exponential vector \(e_{vec}\) finally yields the x-component of the electric field. This may be repeated for the y-component as well, by dotting with the \(s_y\) vector.

\[\begin{split}E_x(x, y, z) = e_{vec} \cdot s_{x} \\\end{split}\]