Skip to content

About

Computational photonics framework in Python & MATLAB modeling 1D Photonic Crystals, Photonic Bandgaps (PBG), and DBRs using Transfer Matrix Method (TMM) & Bloch theory.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

1D Photonic Crystal Bandgap & Distributed Bragg Reflector (DBR) Simulation via Transfer Matrix Method (TMM)

MATLAB Python Optics & Photonics University Author LinkedIn

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.

1.3 Distributed Bragg Reflector (DBR) Transmission Spectrum

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.

Bandgap Trace Criterion


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.

Dispersion Relation


2.3 Distributed Bragg Reflector (DBR) Spectral Transmittance

Spectral transmission curves for increasing period counts ($N = 3, 5, 8, 12$) show how reflection deepens and steepens inside the stopband. For $N \ge 8$, transmittance inside the stopband drops below $-30,\text{dB}$ ($T < 0.001$), achieving near-ideal optical mirror reflection.

DBR Transmission Spectrum


3. Repository Structure

Photonic-Bandgap-TMM-Simulation/
├── README.md
├── .gitignore
├── assets/
│   ├── bandgap_trace_criterion.png
│   ├── dispersion_relation_bands.png
│   └── dbr_transmission_spectrum.png
├── matlab/
│   ├── simulate_dispersion_bandgap.m
│   └── simulate_dbr_transmission.m
└── python/
    └── photonic_crystal_tmm.py

4. How to Run

Option A: Using Python (NumPy / Matplotlib)

Run the standalone Python simulation to reproduce all calculations and regenerate figures:

python python/photonic_crystal_tmm.py

Option B: Using MATLAB

  1. Open MATLAB and navigate to the matlab/ directory.
  2. Run simulate_dispersion_bandgap.m for band structure and Brillouin zone mapping.
  3. Run simulate_dbr_transmission.m for DBR transmission spectrum and Chebyshev polynomial verification.

5. Author & Academic Context

  • Author: Danial Ghorbani
  • LinkedIn: Danial Qorbani
  • Degree: B.Sc. in Electrical Engineering (Electronics), Minor in Computer Engineering
  • Course: Fundamentals of Photonics (Graduate Level)
  • Institution: School of Electrical and Computer Engineering, University of Tehran
  • Contact: daniel.ghorbani.work@gmail.com

About

Computational photonics framework in Python & MATLAB modeling 1D Photonic Crystals, Photonic Bandgaps (PBG), and DBRs using Transfer Matrix Method (TMM) & Bloch theory.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages