Skip to content

FDTD Explained

Prerequisites

Electromagnetic Waves -> this page. If FDTD is new to you, start with the solver selection guide.

FDTD (Finite-Difference Time-Domain) solves Maxwell's equations directly in space and time. Instead of expanding a periodic pixel into Fourier harmonics like RCWA, it voxelizes the geometry, injects a time-dependent source, and advances the electric and magnetic fields step by step.

For image sensors, that makes FDTD valuable when you need a real-space view of the field: how light bends through a microlens, how it scatters from a metal grid, how it leaks across DTI, or how a finite/non-periodic layout behaves. The cost is that the grid must resolve both the smallest geometry and the shortest wavelength inside the highest-index material.

What problem FDTD solves

In a non-magnetic optical stack, the time-domain curl equations are:

Ht=1μ0×EEt=1ε0εr(r)(×HJ)

FDTD replaces the continuous derivatives with finite differences on a rectangular grid:

xi=iΔx,yj=jΔy,zk=kΔz,tn=nΔt

The output can be interpreted in two ways:

  • Time-domain fields: snapshots of E(t) and H(t).
  • Frequency-domain observables: Fourier-transformed fields accumulated during the run, such as reflectance, transmittance, absorption, and QE at selected wavelengths.

Broadband does not mean free

A short pulse can cover many wavelengths in one run, but the simulation still needs enough physical time for all relevant frequencies and resonant tails to decay. A broadband FDTD result is only meaningful after both grid and time-window convergence are checked.

Mental model

Think of FDTD as a movie camera for Maxwell's equations:

  1. The pixel stack is converted to a 3D array of material values.
  2. A source injects a pulse or continuous wave.
  3. Fields propagate, scatter, interfere, and absorb on the grid.
  4. Monitors collect flux and field data.
  5. The run stops when the source has passed and residual energy has decayed.

Unlike RCWA, FDTD does not require every layer to be laterally periodic. Periodic boundaries are optional. That flexibility is why FDTD is often used as a cross-check for RCWA or as a reference method for difficult geometry.

From pixel stack to FDTD grid

COMPASS turns a PixelStack into a voxelized permittivity volume:

Physical featureFDTD representationMain risk
Air, planarization, BARLUniform voxel regionsThin films may be under-resolved
MicrolensStaircase or smoothed 3D shapeCurvature needs fine x-y-z resolution
Color filterAbsorbing/dispersive voxel regionWrong material loss changes QE directly
Metal gridHigh-loss, high-contrast voxelsSkin depth and sharp corners need fine grid
DTI/BDTISilicon/oxide/trench voxel boundariesCrosstalk depends strongly on boundary placement
PhotodiodeAbsorption integration volumeMonitor region must match the electrical collection model
Top/bottom open spacePML absorbing layersToo-close PML reflects near fields

The solver sees only the discretized grid. Always verify the voxelized geometry before treating field maps as physical insight.

The Yee lattice

FDTD normally uses the Yee lattice: electric and magnetic field components are staggered in both space and time. Each curl update uses nearby field samples in the natural orientation for Maxwell's equations.

Interactive Yee Cell Viewer

Visualize the staggered Yee grid cell used in FDTD simulations. E-field components sit on cell edges, while H-field components sit on face centers.

Cells per wavelength (550 nm):5.5
Courant number S:0.5716
Stability limit (1/sqrt(3)):0.5774
Warning: Need 10+ cells/wavelength for accuracy
xyzExEyEzHxHyHz
Staggered Grid Concept

The Yee cell staggers E and H field components in both space and time. E-field components are located on the edges of the cell, while H-field components are located at the face centers.

This arrangement ensures that every curl finite-difference is centered, giving second-order accuracy. The spatial staggering by half a grid cell naturally satisfies the divergence-free conditions for both E and B fields.

For a grid spacing of 25 nm, the cell resolves 5.5 points per wavelength at 550 nm in silicon (n=4). A minimum of 10 cells per wavelength is recommended.

The staggering has two practical consequences:

  • Field components are not stored at the same point, so energy density and flux monitors may interpolate fields.
  • Dielectric interfaces can sit between field samples, so staircasing and subpixel averaging matter near sharp material boundaries.

Leapfrog update

The electric and magnetic fields are updated alternately:

  1. Hn+1/2 is updated from En.
  2. En+1 is updated from Hn+1/2.
  3. The process repeats until the desired physical time has elapsed.

For example, one electric-field component in a non-magnetic, nondispersive medium is:

Exn+1(i,j,k)=Exn(i,j,k)+Δtε0εr(i,j,k)[Hzn+1/2(i,j,k)Hzn+1/2(i,j1,k)ΔyHyn+1/2(i,j,k)Hyn+1/2(i,j,k1)Δz]

The other components follow the same curl pattern. In lossy or dispersive media, additional material-update terms are included so that ε(ω) and absorption are represented correctly.

Stability: the CFL limit

The time step must satisfy the Courant-Friedrichs-Lewy (CFL) condition. For a 3D Cartesian grid:

ΔtSc1Δx2+1Δy2+1Δz2

where S is the Courant factor. A smaller spatial grid forces a smaller time step. This is why refining a 3D FDTD grid is expensive twice: the number of voxels increases, and the number of time steps needed for the same physical duration also increases.

If a simulation suddenly produces NaN, exploding fields, or nonphysical energy gain, check the time step, material model, and PML first.

Grid resolution and numerical dispersion

The grid must resolve the shortest wavelength inside the highest-index material:

Δλ0nmaxNppw

where Nppw is the target points per wavelength. A common starting point is 15-20 points per wavelength for qualitative work, with finer checks for sign-off.

For silicon at λ0=400 nm and n4:

Δ0.4 μm4×20=5 nm

That single estimate explains most FDTD cost in image sensors. Blue light inside silicon demands very fine cells, and a 2x2 Bayer domain can reach hundreds of millions of Yee samples if every dimension is refined uniformly.

What under-resolution looks like

SymptomLikely cause
QE changes strongly when dx changesGrid dispersion or geometry staircasing
Metal-grid effect disappearsSkin depth or metal edge under-resolved
DTI crosstalk looks too optimisticTrench width or sidewall location shifted by voxelization
Field hot spots move with resolutionInterface interpolation artifact
Flux balance driftsMonitors too close, grid too coarse, or material loss mismatch

Sources and monitors

FDTD results depend heavily on source and monitor setup.

Sources

Source typeUse it whenCaveat
Continuous wave (CW)One wavelength, steady-state field mapsMust run long enough to reach steady state
Gaussian pulseBroadband spectraNeeds frequency-domain monitor normalization
Planewave/TFSFIncident plane wave on a finite scattererSource box must not intersect scatterers or PML
Bloch-periodic planewavePeriodic pixel array at oblique CRABoundary phase must match the incident wavevector

Broadband oblique incidence

Oblique broadband planewaves need extra care. With Bloch-periodic boundaries, the lateral phase is tied to the incident wavevector. If a short pulse spans many wavelengths, the same nominal source setup can represent slightly different polar angles across the spectrum unless the backend explicitly handles broadband oblique injection.

There are three common strategies:

StrategyUse whenCaveat
Single-frequency Bloch sweepHighest accuracy per angle/wavelengthMany runs
Broadband Bloch run plus interpolationModerate bandwidth and smooth angular responseMust interpolate angular response carefully
Specialized broadband oblique sourceBackend supports it directlyBackend-specific assumptions must be documented

For image-sensor angular response, a robust workflow is to solve a structured angular grid, store QE(λ,θ,ϕ), and interpolate that data to the CRA/MRA or ray-file angles used by the camera model. This avoids pretending that a sparse, nonuniform set of lens rays is itself a good FDTD sweep grid.

When reporting broadband oblique FDTD, include the angular grid, wavelength grid, source type, boundary phase convention, and interpolation method.

Monitors

Flux monitors measure the Poynting vector through a surface:

S=12Re(E×H)

For spectra, fields are Fourier-transformed at monitor points and then combined into flux. Do not Fourier-transform the time-domain power trace directly unless the backend explicitly documents that workflow.

For image-sensor QE, absorption is normally integrated in silicon or photodiode regions:

Pabs(ω)=12ωε0εr(ω)V|E(r,ω)|2dV

The integration volume is part of the model. Optical absorption in silicon is not automatically the same as collected charge if the electrical collection region is smaller than the absorbing region.

Boundary conditions

Periodic and Bloch boundaries

For a repeated unit cell, lateral boundaries can be periodic:

E(x+Λx,y,z)=E(x,y,z)

For oblique illumination, the periodic boundary needs a Bloch phase:

E(x+Λx,y,z)=E(x,y,z)eikxΛx

Use Bloch periodicity when comparing FDTD against RCWA for the same infinite pixel array.

PML absorbing boundaries

Open boundaries are usually terminated with PML (Perfectly Matched Layers). PML is an artificial absorbing layer placed outside the physical region so outgoing waves leave the simulation cell with minimal reflection.

Practical PML rules:

  • Keep PML away from high-index geometry and strong near fields.
  • Increase PML thickness for grazing incidence, high-Q resonances, or evanescent-rich fields.
  • Check reflection by moving the PML farther away and rerunning.
  • Do not place sources or flux monitors inside the PML.

Practical FDTD workflow for image sensors

  1. Start from a simple 1D stack and match TMM or zero-order RCWA.
  2. Add the periodic pixel geometry with coarse but valid grid spacing.
  3. Verify the voxelized geometry before running expensive sweeps.
  4. Normalize against an incident-field reference run.
  5. Place reflection/transmission monitors away from sources, scatterers, and PML.
  6. Run until fields decay below the target threshold.
  7. Sweep grid spacing: for example 20 nm, 10 nm, 5 nm.
  8. Sweep PML thickness and monitor offsets.
  9. Compare integrated R+T+A against 1.
  10. Only then interpret photodiode QE and crosstalk.

Runtime and memory scaling

The memory footprint scales roughly with the number of Yee cells:

Ncells=NxNyNz

Each cell stores multiple electric and magnetic components, material coefficients, and sometimes DFT monitor accumulators. Runtime scales with:

workNxNyNzNt

and Nt increases as the grid spacing shrinks. Halving Δx, Δy, and Δz can increase memory by about 8× and runtime by more than 16× for the same physical duration.

Common failure modes

Fields blow up

Check the Courant factor, negative or inconsistent material coefficients, dispersive material setup, and whether the source overlaps a lossy or PML region.

PML reflects too much

Move the PML farther from the pixel stack, thicken it, and rerun with the same monitor placement. This is especially important for oblique CRA, high-index silicon, and guided or evanescent fields.

Broadband spectrum is noisy

Increase the run time, reduce the source bandwidth, use a smoother pulse, or use frequency-domain convergence criteria. A short time trace cannot resolve narrow spectral features.

RCWA and FDTD disagree

First match the physical problem: same unit cell, same materials, same incident angle, same polarization, same absorption volume, and same boundary conditions. Then converge RCWA order and FDTD grid independently.

FDTD vs RCWA vs TMM

MethodBest atWeak at
TMM1D thin-film stacksNo lateral diffraction
RCWAPeriodic layered pixels and wavelength sweepsAperiodic finite features
FDTDReal-space fields, finite geometry, broadband checksFine-grid memory and runtime

For normal periodic BSI pixels, RCWA is usually the fastest primary solver. Use FDTD for validation, finite-layout studies, broadband response, and field intuition.

COMPASS FDTD solvers

SolverLibraryGPU supportNotes
fdtd_flaportfdtd (flaport)CUDA (PyTorch)Lightweight backend for prototyping and quick checks.
fdtdzfdtdzCUDA/JAX depending installExperimental high-performance workflow for structured grids.
meepMeepCPU/MPIMature reference backend with broad material and monitor support.

These backends share the SolverBase interface, but their feature coverage is not identical. Treat backend changes as cross-validation, not as a drop-in guarantee.

Practical setup for image sensors

yaml
solver:
  name: fdtd_flaport
  type: fdtd
  params:
    grid_spacing: 0.01        # um; start coarse, then converge
    runtime_fs: 300
    courant_factor: 0.5
    pml_thickness: 20         # cells
    source:
      type: gaussian_pulse
      normalize_reference: true
    monitors:
      flux_offset: 0.2        # um from patterned stack
      dft_fields: true
  convergence:
    grid_spacing_um: [0.02, 0.01, 0.005]
    energy_tolerance: 0.02

For final reports, include grid spacing, time step or Courant factor, physical runtime, PML thickness, monitor locations, and the final energy balance. Without those, an FDTD number is hard to reproduce.

Further reading