You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1D Photonic Crystal Bandgap & Distributed Bragg Reflector (DBR) Simulation via Transfer Matrix Method (TMM)
A complete computational electromagnetics framework for modeling 1D Photonic Crystals, optical dispersion relations ($\omega$ vs. $K$), Photonic Bandgaps (PBG), and multi-layer Distributed Bragg Reflectors (DBR) using the Transfer Matrix Method (TMM) and Bloch-Floquet periodic theory.
This repository contains clean, modular implementations in both MATLAB and Python (NumPy / Matplotlib).
1. Theoretical Background
1.1 The Transfer Matrix Method (TMM)
Consider a plane electromagnetic wave propagating at normal incidence through a 1D stratified medium consisting of alternating homogeneous dielectric layers of refractive indices $n_1, n_2$ and thicknesses $a, b$, with period $\Lambda = a + b$.
Within any individual layer $j$ with thickness $d_j$ and characteristic optical impedance $Z_j = Z_0 / n_j$ (where $Z_0 \approx 377,\Omega$), the tangential electric and magnetic fields at boundary $z$ and $z + d_j$ are coupled by the $2 \times 2$ unimodular characteristic matrix $M_j$:
$$M_j = \begin{bmatrix} \cos(k_j d_j) & i Z_j \sin(k_j d_j) \ \frac{i}{Z_j} \sin(k_j d_j) & \cos(k_j d_j) \end{bmatrix}, \quad k_j = \frac{\omega}{c} n_j = k_0 n_j$$
Because the determinant $\det(M_j) = \cos^2(k_j d_j) + \sin^2(k_j d_j) = 1$, the matrix is strictly unimodular (energy-conserving in lossless media).
For a single unit cell comprising two layers ($A$ and $B$):
$$M_{unit} = M_1 \cdot M_2 = \begin{bmatrix} m_{11} & m_{12} \ m_{21} & m_{22} \end{bmatrix}$$
1.2 Bloch-Floquet Theory & Dispersion Relation
According to the Bloch-Floquet theorem, the electromagnetic fields in a strictly periodic structure satisfy:
$$E(z + \Lambda) = E(z) e^{-i K \Lambda}$$
Where $K$ is the Bloch wavevector. The eigenvalues $\lambda$ of the single-period transfer matrix $M_{unit}$ must satisfy:
$$\det(M_{unit} - \lambda I) = \lambda^2 - \text{Tr}(M_{unit})\lambda + 1 = 0$$
Since the eigenvalues represent the phase advance across one lattice period ($\lambda_{1,2} = e^{\mp i K \Lambda}$), we obtain the fundamental dispersion relation:
$$\cos(K \Lambda) = \frac{1}{2}\text{Tr}(M_{unit}) = \cos(k_1 a)\cos(k_2 b) - \frac{1}{2}\left(\frac{n_2}{n_1} + \frac{n_1}{n_2}\right)\sin(k_1 a)\sin(k_2 b)$$
The Photonic Bandgap (PBG) Condition:
Propagating Modes: If $|\frac{1}{2}\text{Tr}(M_{unit})| \le 1$, $K$ is purely real. Light propagates through the crystal without attenuation.
Forbidden Bandgap (Evanescent Decay): If $|\frac{1}{2}\text{Tr}(M_{unit})| > 1$, $K$ possesses an imaginary component:
$$K = \frac{m\pi}{\Lambda} \pm i K''$$
The field decays exponentially with depth: $E(z) \propto e^{-K'' z}$. Incident light within this frequency regime is completely reflected, creating a Photonic Bandgap.
For a finite structure of $N$ periods, the total system transfer matrix is given by matrix exponentiation:
$$M_{tot} = (M_{unit})^N$$
Using the Chebyshev identity for powers of unimodular $2 \times 2$ matrices:
$$M^N = M \cdot U_{N-1}(X) - I \cdot U_{N-2}(X), \quad X = \frac{1}{2}\text{Tr}(M) = \cos(K\Lambda)$$
Where $U_m(X) = \frac{\sin[(m+1)K\Lambda]}{\sin(K\Lambda)}$ are the Chebyshev polynomials of the second kind.
The power transmittance $T$ and reflectance $R$ for an ambient medium of index $n_0$ are:
$$T = \left| \frac{2 Z_0}{(m_{11} Z_0 + m_{12}) + Z_0 (m_{21} Z_0 + m_{22})} \right|^2, \quad R = 1 - T$$
2. Simulation Results & Discussion
2.1 Bandgap Identification via Half-Trace Criterion
The parameter $\frac{1}{2}\text{Tr}(M)$ is plotted against normalized frequency $\omega/c$. Shaded red intervals denote regions where $|\frac{1}{2}\text{Tr}(M)| > 1$, establishing forbidden photonic bandgaps.
2.2 Photonic Crystal Dispersion Relation ($\omega$ vs. $K$)
The dispersion diagram mapped across the first Brillouin Zone ($-\pi/\Lambda \le K \le \pi/\Lambda$) reveals distinct energy bands separated by wide stopbands where no propagating modes exist.