# Transmission-line matrix method

The transmission-line matrix (TLM) method is a space and time discretising method for computation of electromagnetic fields. It is based on the analogy between the electromagnetic field and a mesh of transmission lines. The TLM method allows the computation of complex three-dimensional electromagnetic structures and has proven to be one of the most powerful time-domain methods along with the finite difference time domain (FDTD) method. The TLM was first explored by British electrical engineer Raymond Beurle while working at English Electric Valve Company in Chelmsford. After he had been appointed professor of electrical engineering at the University of Nottingham in 1963 he jointly authored an article, "Numerical solution of 2-dimensional scattering problems using a transmission-line matrix", with Peter B. Johns in 1971.

## Basic principle

The TLM method is based on Huygens' model of wave propagation and scattering and the analogy between field propagation and transmission lines. Therefore, it considers the computational domain as a mesh of transmission lines, interconnected at nodes. In the figure on the right is considered a simple example of a 2D TLM mesh with a voltage pulse of amplitude 1 V incident on the central node. This pulse will be partially reflected and transmitted according to the transmission-line theory. If we assume that each line has a characteristic impedance $Z$, then the incident pulse sees effectively three transmission lines in parallel with a total impedance of $Z/3$. The reflection coefficient and the transmission coefficient are given by
    $R={\frac {Z/3-Z}{Z/3+Z}}=-0.5$
    $T={\frac {2(Z/3)}{Z/3+Z}}=0.5$
The energy injected into the node by the incident pulse and the total energy of the scattered pulses are correspondingly
    $E_{I}=vi\,\Delta t=1\left(1/Z\right)\Delta t=\Delta t/Z$
    $E_{S}=\left[0.5^{2}+0.5^{2}+0.5^{2}+(-0.5)^{2}\right](\Delta t/Z)=\Delta t/Z$
Therefore, the energy conservation law is fulfilled by the model.
The next scattering event excites the neighbouring nodes according to the principle described above. It can be seen that every node turns into a secondary source of spherical wave. These waves combine to form the overall waveform. This is in accordance with Huygens principle of light propagation.
In order to show the TLM schema we will use time and space discretisation. The time-step will be denoted with $\Delta t$ and the space discretisation intervals with $\Delta x$, $\Delta y$ and $\Delta z$. The absolute time and space will therefore be $t=k\,\Delta t$, $x=l\,\Delta x$, $y=m\,\Delta y$, $z=n\,\Delta z$, where $k=0,1,2,\ldots$ is the time instant and $m,n,l$ are the cell coordinates. In case $\Delta x=\Delta y=\Delta z$ the value $\Delta l$ will be used, which is the lattice constant. In this case the following holds:
    $\Delta t={\frac {\Delta l}{c_{0}}},$
where $c_{0}$ is the free space speed of light.

## The 2D TLM node
### The scattering matrix of an 2D TLM node

If we consider an electromagnetic field distribution in which the only non-zero components are $E_{x}$, $E_{y}$ and $H_{z}$ (i.e. a TE-mode distribution), then Maxwell's equations in Cartesian coordinates reduce to
    ${\frac {\partial {H_{z}}}{\partial {y}}}=\varepsilon {\frac {\partial {E_{x}}}{\partial {t}}}$
    $-{\frac {\partial {H_{z}}}{\partial {x}}}=\varepsilon {\frac {\partial {E_{y}}}{\partial {t}}}$
    ${\frac {\partial {E_{y}}}{\partial {x}}}-{\frac {\partial {E_{x}}}{\partial {y}}}=-\mu {\frac {\partial {H_{z}}}{\partial {t}}}$
We can combine these equations to obtain
    ${\frac {\partial ^{2}H_{z}}{\partial {x}^{2}}}+{\frac {\partial ^{2}{H_{z}}}{\partial {y}^{2}}}=\mu \varepsilon {\frac {\partial ^{2}{H_{z}}}{\partial {t}^{2}}}$
The figure on the right presents a structure referred to as a series node. It describes a block of space dimensions $\Delta x$, $\Delta y$ and $\Delta z$ that consists of four ports. $L'$ and $C'$ are the distributed inductance and capacitance of the transmission lines. It is possible to show that a series node is equivalent to a TE-wave, more precisely the mesh current I, the x-direction voltages (ports 1 and 3) and the y-direction voltages (ports 2 and 4) may be related to the field components $H_{z}$, $E_{x}$ and $E_{y}$. If the voltages on the ports are considered, $L_{x}=L_{y}$, and the polarity from the above figure holds, then the following is valid
    $-V_{1}+V_{2}+V_{3}-V_{4}=2L'\,\Delta l{\frac {\partial {I}}{\partial {t}}}$
where $\Delta x=\Delta y=\Delta l$.
    $\left(V_{3}-V_{1}\right)-\left(V_{4}-V_{2}\right)=2L'\,\Delta l{\frac {\partial I}{\partial t}}$
    $\left[E_{x}(y+\Delta y)-E_{x}(y)\right]\,\Delta x-[E_{y}(x+\Delta x)-E_{y}(x)]\Delta y=2L'\,\Delta l{\frac {\partial {I}}{\partial {t}}}$
and dividing both sides by $\Delta x\Delta y$
    ${\frac {E_{x}(y+\Delta y)-E_{x}(y)}{\Delta y}}-{\frac {E_{y}(x+\Delta x)-E_{y}(x)}{\Delta x}}=2L'\,\Delta l{\frac {\partial {I}}{\partial {t}}}{\frac {1}{\Delta x\,\Delta y}}$
Since $\Delta x=\Delta y=\Delta z=\Delta l$ and substituting $I=H_{z}\,\Delta z$ gives
    ${\frac {\Delta E_{x}}{\Delta y}}-{\frac {\Delta E_{y}}{\Delta x}}=2L'{\frac {\partial H_{z}}{\partial t}}$
This reduces to Maxwell's equations when $\Delta l\rightarrow 0$.
Similarly, using the conditions across the capacitors on ports 1 and 4, it can be shown that the corresponding two other Maxwell equations are the following:
    ${\frac {\partial {H_{z}}}{\partial {y}}}=C'{\frac {\partial {E_{x}}}{\partial {t}}}$
    $-{\frac {\partial {H_{z}}}{\partial {x}}}=C'{\frac {\partial {E_{y}}}{\partial {t}}}$
Having these results, it is possible to compute the scattering matrix of a shunt node. The incident voltage pulse on port 1 at time-step k is denoted as $_{k}V_{1}^{i}$. Replacing the four line segments from the above figure with their Thevenin equivalent it is possible to show that the following equation for the reflected voltage pulse holds:
    $_{k}V_{1}^{r}=0.5\left(_{k}V_{1}^{i}+_{k}V_{2}^{i}+_{k}V_{3}^{i}-_{k}V_{4}^{i}\right)$
If all incident waves as well as all reflected waves are collected in one vector, then this equation may be written down for all ports in matrix form:
    $_{k}\mathbf {V} ^{r}=\mathbf {S} _{k}\mathbf {V} ^{i}$
where $_{k}\mathbf {V} ^{i}$ and $_{k}\mathbf {V} ^{r}$ are the incident and the reflected pulse amplitude vectors.
For a series node the scattering matrix S has the following form
    $\mathbf {S} ={\frac {1}{2}}\left[{\begin{array}{cccc}1&1&1&-1\\1&1&-1&1\\1&-1&1&1\\-1&1&1&1\end{array}}\right]$

### Connection between TLM nodes

In order to describe the connection between adjacent nodes by a mesh of series nodes, look at the figure on the right. As the incident pulse in timestep k+1 on a node is the scattered pulse from an adjacent node in timestep k, the following connection equations are derived:
    $_{k+1}V_{1}^{i}(x,y)=_{k+1}V_{3}^{r}(x,y-1)$
    $_{k+1}V_{2}^{i}(x,y)=_{k+1}V_{4}^{r}(x-1,y)$
    $_{k+1}V_{3}^{i}(x,y)=_{k+1}V_{1}^{r}(x,y+1)$
    $_{k+1}V_{4}^{i}(x,y)=_{k+1}V_{2}^{r}(x+1,y)$
By modifying the scattering matrix ${\textbf {S}}$ inhomogeneous and lossy materials can be modelled. By adjusting the connection equations it is possible to simulate different boundaries.

### The shunt TLM node

Apart from the series node, described above there is also the shunt TLM node, which represents a TM-mode field distribution. The only non-zero components of such wave are $H_{x}$, $H_{y}$, and $E_{z}$. With similar considerations as for the series node the scattering matrix of the shunt node can be derived.

## 3D TLM models

Most problems in electromagnetics require a three-dimensional grid. As we now have structures that describe TE and TM-field distributions, intuitively it seems possible to define a combination of shunt and series nodes providing a full description of the electromagnetic field. Such attempts have been made, but because of the complexity of the resulting structures they proved to be not very useful. Using the analogy that was presented above leads to calculation of the different field components at physically separated points. This causes difficulties in providing simple and efficient boundary definitions. A solution to these problems was provided by Johns in 1987, when he proposed the structure known as the symmetrical condensed node (SCN), presented in the figure on the right. It consists of 12 ports because two field polarisations are to be assigned to each of the 6 sides of a mesh cell.
The topology of the SCN cannot be analysed using Thevenin equivalent circuits. More general energy and charge conservation principles are to be used.
The electric and the magnetic fields on the sides of the SCN node number (l,m,n) at time instant k may be summarised in 12-dimensional vectors
    $_{k}\mathbf {E} _{l,m,n}=_{k}\left[E_{1},E_{2},\ldots ,E_{11},E_{12}\right]_{l,m,n}^{T}$
    $_{k}\mathbf {H} _{l,m,n}=_{k}\left[H_{1},H_{2},\ldots ,H_{11},H_{12}\right]_{l,m,n}^{T}$
They can be linked with the incident and scattered amplitude vectors via
    $_{k}\mathbf {a} _{l,m,n}={\frac {1}{2{\sqrt {Z_{F}}}}}{_{k}\mathbf {E} }_{l,m,n}+{\frac {\sqrt {Z_{F}}}{2}}{_{k}\mathbf {H} }_{l,m,n}$
    $_{k}\mathbf {b} _{l,m,n}={\frac {1}{2{\sqrt {Z_{F}}}}}{_{k}\mathbf {E} }_{l,m,n}-{\frac {\sqrt {Z_{F}}}{2}}{_{k}\mathbf {H} }_{l,m,n}$
where $Z_{F}={\sqrt {\frac {\mu }{\varepsilon }}}$ is the field impedance, $_{k}\mathbf {a} _{l,m,n}$ is the vector of the amplitudes of the incident waves to the node, and $_{k}\mathbf {b} _{l,m,n}$ is the vector of the scattered amplitudes. The relation between the incident and scattered waves is given by the matrix equation
    $_{k}\mathbf {b} _{l,m,n}=\mathbf {S} _{k}\mathbf {a} _{l,m,n}$
The scattering matrix S can be calculated. For the symmetrical condensed node with ports defined as in the figure the following result is obtained
    $\mathbf {S} =\left[{\begin{array}{ccc}0&\mathbf {S} _{0}&\mathbf {S} _{0}^{T}\\\mathbf {S} _{0}^{T}&0&\mathbf {S} _{0}\\\mathbf {S} _{0}&\mathbf {S} _{0}^{T}&0\end{array}}\right]$
where the following matrix was used
    $\mathbf {S} _{0}={\frac {1}{2}}\left[{\begin{array}{cccc}0&0&1&-1\\0&0&-1&1\\1&1&0&0\\1&1&0&0\end{array}}\right]$
The connection between different SCNs is done in the same manner as for the 2D nodes.

## Open-sourced code implementation of 3D-TLM

The George Green Institute for Electromagnetics Research (GGIEMR) has open-sourced an efficient implementation of 3D-TLM, capable of parallel computation by means of MPI named GGITLM and available online.