# Understanding the mode overlap calculation

This section provides some further information about the overlap calculation of MODE. The overlap function is typically used to measure the field overlap and power coupling between an input mode from one waveguide and all of the modes of a second waveguide.

The arbitrary input fields, labeled \(\overrightarrow{E_{in}}\) and \(\overrightarrow{H_{in}}\) are incident upon a surface and give rise to the output fields \(\overrightarrow{E_{out}}\) and \(\overrightarrow{H_{out}}\). The input power is given by \(P_{in} = \frac{1}{2} Re[\int d\overrightarrow{S}\cdot\overrightarrow{E_{in}}\times\overrightarrow{H_{in}^{*}}]\) while the output power is given by \(P_{out} = \frac{1}{2} Re[\int d\overrightarrow{S}\cdot\overrightarrow{E_{out}}\times\overrightarrow{H_{out}^{*}}]\). Any fields can be decomposed into a basis of orthogonal modes (see Marcuse or Snyder and Love Waveguide book)

$$\overrightarrow{E} = \sum_i a_{i} \overrightarrow {e_{i}}$$

$$\overrightarrow{H} = \sum_i b_{i} \overrightarrow {h_{i}}$$

The basis modes are orthogonal in the sense

$$ \delta_{ij} = \frac{\int \overrightarrow{e_{i}}\times\overrightarrow{h_{j}^{*}}\cdot d\overrightarrow{S}}{\int \overrightarrow{e_{i}}\times\overrightarrow{h_{i}^{*}}\cdot d\overrightarrow{S}} $$

and, for propagating modes, \(\int d\overrightarrow{S}\cdot\overrightarrow{e_{i}}\times\overrightarrow{h_{i}^{*}}\) is real.

At the interface, the tangential components of the electric and magnetic fields are continuous:

$$\overrightarrow{E_{in}^{\perp}}+\overrightarrow{E_{refl}^{\perp}} =\overrightarrow{E_{out}^{\perp}}$$

$$\overrightarrow{H_{in}^{\perp}}+\overrightarrow{H_{refl}^{\perp}}=\overrightarrow{H_{out}^{\perp}}$$

If we assume that the reflected field is small, we can simply decompose the input (or output) field onto the basis state of the output waveguide:

$$\overrightarrow{E_{in}} = \overrightarrow{E_{out}} =\sum_i a_{i} \overrightarrow {e_{i}}$$

$$\overrightarrow{H_{in}} = \overrightarrow{H_{out}} = \sum_i b_{i} \overrightarrow {h_{i}}$$

where the ai and bi coefficients can be calculated from

$$ a_{i} = \frac{\int \overrightarrow{E_{in}}\times\overrightarrow{h_{i}^{*}}\cdot d\overrightarrow{S}}{\int \overrightarrow{e_{i}}\times\overrightarrow{h_{i}^{*}}\cdot d\overrightarrow{S}} $$

$$ b_{i}^{*} = \frac{\int \overrightarrow{e_{i}}\times\overrightarrow{H_{in}^{*}}\cdot d\overrightarrow{S}}{\int \overrightarrow{e_{i}}\times\overrightarrow{h_{i}^{*}}\cdot d\overrightarrow{S}} $$

The total power propagating in the output fields is

$$P_{out} = 0.5\cdot Re\left\{\int \overrightarrow{E_{out}}\times\overrightarrow{H_{out}^{*}}\cdot d\overrightarrow{S}\right\}$$

$$= 0.5\cdot Re\left\{\int (\sum_ia_{i}\overrightarrow{e_{i}})\times(\sum_jb_{j}\overrightarrow{h_{j}})\cdot d\overrightarrow{S}\right\}$$

$$= 0.5\cdot \sum_i Re\left\{a_{i}b_{i}^{*}\int \overrightarrow{e_{i}}\times\overrightarrow{h_{i}^{*}}\cdot d\overrightarrow{S}\right\}$$

and therefore, the power coupling coefficient propagating in the the ith mode over the total input power is

$$\frac{P_{i}}{P_{in}} = \frac{Re\left\{a_{i}b_{i}^{*}\int \overrightarrow{e_{i}}\times\overrightarrow{h_{i}^{*}}\cdot d\overrightarrow{S}\right\}}{Re\left\{\int \overrightarrow{E_{in}}\times\overrightarrow{H_{in}^{*}}\cdot d\overrightarrow{S}\right\}}$$

$$\frac{P_{i}}{P_{in}} = Re\left\{ \frac{(\int \overrightarrow{e_{i}}\times\overrightarrow{H_{in}^{*}}\cdot d\overrightarrow{S})(\int \overrightarrow{E_{in}}\times\overrightarrow{h_{1}^{*}}\cdot d\overrightarrow{S})}{\int \overrightarrow{e_{i}}\times\overrightarrow{h_{i}^{*}}\cdot d\overrightarrow{S}}\right\} \frac{1}{Re(\int \overrightarrow{E_{in}}\times\overrightarrow{H_{in}^{*}}\cdot d\overrightarrow{S})}$$

This result tells us how much power can propagate in the ith mode from a given input field. However, the above calculation assumed that the reflected fields were negligible. In reality there is some reflected field and this leads to different ai and bi coefficients. Indeed, when the ai and bi coefficients are different, it means that some of the field must be reflected because the relative amplitudes of E and H cannot be decomposed into forward propagating modes only. A better result can be found by assuming that the reflected field has the same profile as the incoming field, and this is what is done by MODE to calculate the power coupling. The simplest case to be considered is a plane wave incident on a dielectric interface (air to an index of n). There is obviously a perfect "overlap" between plane waves on both sides of the interface. However, if the ai coefficient for the decomposition of Ein is 1, then the bi coefficient will be n. (For plane waves H = n*sqrt(eps0/mu0)). For the plane wave this leads to the well known results that r=(n-1)/(n+1)), making it possible to calculate the power coupling between an incident field into the forward propagating ith mode. For an exact result, it is necessary to know the complete set of waveguide modes on both the input and output sides.

Note: The overlap calculation that is described here may not be accurate for waveguides or fibers with loss.