Skip to content

EM Simulation Methods Comparison

Written: 2026-02-11 | COMPASS project research document


1. Overview

Optical simulation of CMOS image sensor (CIS) pixels requires numerical solutions of Maxwell's equations. As pixel pitch has reached the same scale (0.6--1.4 um) as visible light wavelengths (0.38--0.78 um), geometric optics alone can no longer capture wave effects such as diffraction, interference, and near-field coupling.

The choice of simulation methodology is determined by three fundamental trade-offs:

AxisDescription
AccuracyFidelity to physical reality. Level of approximation to Maxwell's equations
SpeedWall-clock time for a single simulation
GeneralityRange of geometries and materials that can be handled

No single method can simultaneously optimize all three axes, which is the fundamental reason why diverse numerical methods coexist. COMPASS adopts RCWA and FDTD as its primary solvers and ensures result reliability through cross-validation.

MethodDomainDimensionPeriodicityWavelength BandCIS Suitability
RCWAFrequency3DRequiredSingle★★★★★
FDTDTime3DOptionalBroadband★★★★☆
FEMFrequency3DOptionalSingle★★★☆☆
BEMFrequencySurfaceNot requiredSingle★★☆☆☆
TMMFrequency1DN/ASingle★★★☆☆
Ray TracingN/A3DNot requiredBroadband★★☆☆☆

2. RCWA (Rigorous Coupled-Wave Analysis)

2.1 Mathematical Foundation

RCWA is a semi-analytical method that solves Maxwell's equations for periodic structures by expanding them in Fourier series in the frequency domain. Key steps:

(1) Fourier expansion of permittivity: For a structure with periods Λx,Λy, the permittivity of each layer is expanded as:

ε(x,y)=p=NNq=NNε^pqei(Gpxx+Gqyy)

where the reciprocal lattice vector Gpx=2πp/Λx, and the total number of harmonics is M=(2N+1)2.

(2) Eigenvalue problem

Substituting the Fourier expansion into Maxwell's equations for each layer yields a 2M×2M eigenvalue problem:

Ωwj=γj2wj

where γj is the z-direction propagation constant for each mode, and wj is the mode profile.

(3) S-matrix cascading

The scattering matrices of individual layers are combined using the Redheffer star product:

Stotal=S1S2SL

This method is numerically stable for evanescent modes, unlike the transfer matrix (T-matrix) approach.

2.2 Strengths

StrengthDescription
Optimal for periodic structuresImage sensor pixel arrays are inherently periodic, making them ideal for RCWA
Accurate thin-film handlingEach layer is treated exactly without spatial discretization (anti-reflection coating, color filter)
Spectral analysisSingle-wavelength computation is very fast → efficient QE spectrum calculation per wavelength
Exponential convergenceExponential convergence with increasing Fourier order (for smooth profiles)
GPU accelerationMatrix operation-based, well-suited for GPU acceleration (PyTorch/JAX backends)

2.3 Weaknesses

WeaknessDescription
Cannot handle non-periodic structuresFinite structures, defects, and non-periodic patterns are fundamentally impossible to treat
Staircase approximation of curved surfacesCurved surfaces such as microlenses require staircase approximation → degraded convergence
Memory scalingMemory O(M2) and computation O(M3) for eigenvalue decomposition. At N=15, M=961, matrix size 1922×1922
Dispersive materialsSeparate computation required for each wavelength (repeated cost for broadband sweeps)

2.4 Key Parameters

ParameterRoleCOMPASS Default
Fourier order (N)Determines spatial resolution. Higher is more accurate but cost scales as O(N6)[9, 9]
Li's factorizationImproves convergence at discontinuous boundaries. Inverse rule, normal vector methodli_inverse
PolarizationTE/TM or arbitrary polarization. Li's rule is particularly important for TMUnpolarized (averaged)

Li's Fourier factorization rules:

The three rules introduced by Lifeng Li (1996) are central to RCWA convergence:

  1. Laurent's rule: When two functions have no simultaneous discontinuities → [[fg]]=[[f]][[g]]
  2. Inverse rule: When all discontinuities are complementary → [[fg]]=[[f1]]1[[g]]
  3. Impossible condition: When non-complementary simultaneous discontinuities exist, both Laurent and inverse rules fail to converge

2.5 CIS Application Scenarios (When to Use for CIS)

  • Color filter: Periodic array, planar layers → optimal for RCWA
  • BARL (Bottom Anti-Reflection Layer): Thin-film stack optimization, wavelength sweep → optimal for RCWA
  • Microlens: Staircase approximation required, but sufficient accuracy at order 15+
  • Metal grid / DTI: Sharp permittivity discontinuities → Li inverse rule essential, high order required
  • Parameter sweep: Single-wavelength computation is fast, advantageous for thickness/pitch/angle sweeps

3. FDTD (Finite-Difference Time-Domain)

3.1 Mathematical Foundation

FDTD directly discretizes the curl equations of Maxwell's equations in both time and space.

Yee lattice:

The staggered grid proposed by Kane Yee (1966) places the six components of the electric field (E) and magnetic field (H) offset by half a grid point in space. This arrangement naturally ensures second-order accurate central differences.

Update equations (Leapfrog time-stepping):

The electric and magnetic fields are updated alternately in half time steps:

Hxn+1/2=Hxn1/2+Δtμ0(Eyn|k+1Eyn|kΔzEzn|j+1Ezn|jΔy)Exn+1=Exn+Δtε0εr(Hzn+1/2|jHzn+1/2|j1ΔyHyn+1/2|kHyn+1/2|k1Δz)

Courant-Friedrichs-Lewy (CFL) stability condition:

The time step must satisfy the following condition for numerical stability:

Δt1c1Δx2+1Δy2+1Δz2

3.2 Strengths

StrengthDescription
Broadband responseEntire visible spectrum obtained from a single simulation (Fourier transform of impulse response)
Arbitrary geometryAny 3D structure can be represented within grid resolution. No periodicity required
Time-domain informationPulse propagation and transient response can be directly observed
Intuitive implementationUpdate equations are simple arithmetic operations → easy parallelization and GPU acceleration
Nonlinear materialsNonlinear response can be naturally included in the time domain

3.3 Weaknesses

WeaknessDescription
CFL constraintFine grid → small time step → long simulation time. Critical for thin films
MemoryEntire 3D grid must be kept in memory. 5 nm grid, 1 um pixel → 20038×106 cells x 6 components
Dispersive materialsFrequency-dependent permittivity of metals and semiconductors must be handled via auxiliary differential equations (ADE)
Thin-film inefficiencyEven BARL layers of a few nm thickness must be resolved by the full grid (RCWA handles them analytically)
Numerical dispersionInsufficient grid resolution causes artificial dispersion in phase velocity (Δxλ/20 recommended)

3.4 Key Parameters

ParameterRoleRecommended for CIS Simulation
Grid spacing (Δx,Δy,Δz)Spatial resolution. λ/(20n) or below recommended5--10 nm (visible, Si)
Time step (Δt)Automatically determined by CFL~0.01 fs (5 nm grid)
PML layer countThickness of Perfectly Matched Layer8--16 layers
Total time stepsUntil steady state is reachedThousands to tens of thousands of steps
Source typeBroadband pulse or continuous wave (CW)Gaussian pulse (380--780 nm)

PML (Perfectly Matched Layer): The PML proposed by Berenger (1994) is an artificial layer that absorbs outgoing waves at the computational domain boundary without reflection. UPML and CPML are the current mainstream implementations.

3.5 CIS Application Scenarios (When to Use for CIS)

  • Complex 3D structures: Asymmetric DTI, irregular metal interconnects → FDTD advantageous
  • RCWA result verification: Cross-validation via FDTD spot-check at selected wavelengths
  • Broadband QE: When the entire visible band needs to be obtained in a single run
  • Time-domain analysis: Visualization of light propagation through microlenses
  • Non-periodic structures: Single-pixel analysis, edge effect studies

4. FEM (Finite Element Method)

The Finite Element Method (FEM) solves the weak form of Maxwell's equations on tetrahedral/hexahedral meshes. The variational formulation of the vector wave equation:

Ω[1μr(×E)(×F)k02εrEF]dΩ=ik0Z0ΩJFdΩ

The geometry is subdivided into tetrahedra, and the key advantage is the ability to perform adaptive mesh refinement near curved surfaces.

Strengths and Weaknesses

StrengthsWeaknesses
Accurate representation of curved geometry (curvilinear elements)Cost of assembling and solving large sparse matrices
Adaptive mesh refinement (AMR)Mesh generation itself is complex (especially in 3D)
Easy multiphysics coupling (thermal, structural)Frequency domain → repeated computation per wavelength required
Non-uniform/anisotropic material handlingLimited open-source optical FEM solvers

COMPASS does not currently include FEM. For the periodicity of CIS pixels, RCWA is more efficient, and commercial FEM (COMSOL) has high licensing costs. However, FEM may be the only option for microlens curved surfaces or thermo-optical multiphysics simulations.


5. BEM (Boundary Element Method)

The Boundary Element Method (BEM) places unknowns only on boundary surfaces rather than throughout the volume. Using the free-space Green's function G(r,r)=eik|rr|/(4π|rr|), surface integral equations reduce a 3D volume problem to a 2D surface problem.

Strengths and Weaknesses

StrengthsWeaknesses
Dimension reduction: 3D problem to 2D surface problemDense matrix → O(N2) memory, O(N3) solve
Open boundary naturally handledDifficulty with non-uniform/nonlinear materials
Efficient for far-field calculationsSpecialized Green's function needed for layered media
Optimized for scattering problemsInefficient for multilayer thin-film stacks

BEM is not commonly used for CIS pixel simulation. Image sensors are multilayer structures where the electric field distribution throughout the entire volume is important. It may be useful for studying scattering characteristics of individual microlenses or plasmonic responses of metal nanoparticles.


6. TMM (Transfer Matrix Method)

6.1 Mathematical Foundation

The Transfer Matrix Method (TMM) is an analytical method that describes electromagnetic wave propagation in planar multilayer thin films as matrix products.

2x2 transfer matrix (isotropic, normal incidence):

The transfer matrix for each layer j is:

Mj=(cosδjinjsinδjinjsinδjcosδj)

where the phase thickness δj=2πλnjdjcosθj.

The transfer matrix for the entire stack is a simple product:

Mtotal=M1M2ML

4x4 Berreman matrix (anisotropic):

For cases involving anisotropic materials, Berreman's (1972) 4x4 formulation is required:

ddzΨ(z)=iωcD(z)Ψ(z)

where Ψ=(Ex,Hy,Ey,Hx)T and D is a 4x4 matrix constructed from the permittivity tensor.

6.2 Strengths and Weaknesses

StrengthsWeaknesses
Extremely fast: Completed in just a few matrix multiplicationsLimited to 1D: Cannot handle lateral patterns
Analytical accuracy: No numerical discretization errorPossible numerical instability in thick absorbing layers
Immediate calculation of reflectance/transmittance/absorptanceCannot capture diffraction or scattering phenomena
Industry standard for multilayer thin-film designCannot handle 2D/3D patterns such as microlenses and metal grids

6.3 CIS Application Scenarios (When to Use for CIS)

TMM is not used as a direct solver in COMPASS, but is extremely useful for the following purposes:

  • Initial stack design: Starting point for BARL and ARC (Anti-Reflection Coating) thickness optimization
  • Material screening: Rapid evaluation of absorption/transmission characteristics of color filter materials
  • Analytical verification: Reference for RCWA results in structures composed only of uniform layers
  • 1D convergence check: RCWA results at N=0 (zeroth order only) should match TMM

COMPASS's compass.materials.database.MaterialDB internally uses TMM-based thin-film reflectance calculations.


7. Ray Tracing

7.1 Geometric Optics Approximation

Ray tracing treats light as rays and traces propagation using Snell's law and Fresnel coefficients. It corresponds to the short-wavelength limit (λ0) of Maxwell's equations.

Ray equation:

dds(ndrds)=n

where s is the arc length along the ray path, and n(r) is the refractive index distribution.

7.2 Strengths and Weaknesses

StrengthsWeaknesses
Extremely fast: Millions of rays traced in secondsIgnoring diffraction at wavelength-scale structures → critical errors
Intuitive physics: Easy visualization of ray pathsCannot capture interference phenomena (thin-film effects, etc.)
Standard for lens system design (Zemax, Code V)Ignores near-field coupling
Suitable for CRA (Chief Ray Angle) analysisRapidly inaccurate when pixel pitch < several λ

7.3 Role in CIS

In modern CIS design, ray tracing is primarily used as a pre-processing stage for wave optics:

  1. Camera lens → sensor plane: Compute CRA and irradiance distribution in Zemax/Code V
  2. Handoff: Extract incidence conditions (angle, amplitude) at the sensor plane
  3. Wave optics simulation: Pixel simulation with the corresponding incidence conditions in COMPASS's RCWA/FDTD

COMPASS's compass.sources.ray_file_reader and compass.sources.cone_illumination modules support this handoff.


8. Hybrid Methods

No single method can efficiently handle all scales of an image sensor system. Hybrid methods combine the optimal method for each scale.

8.1 Ray Tracing → RCWA Handoff (Zemax → COMPASS)

Camera lens (mm scale)          →  Zemax (Ray Tracing)
    ↓ CRA, irradiance
Pixel stack (um scale)          →  COMPASS (RCWA/FDTD)
    ↓ QE, crosstalk
Sensor performance (pixel array) →  System analysis

Key interface: angle of incidence (θ, ϕ), polarization state, power distribution.

8.2 FEM + Scattering Matrix (EMUstack Approach)

EMUstack solves each layer with 2D FEM and handles inter-layer coupling via scattering matrices. It combines the geometric flexibility of FEM with the numerical stability of S-matrices, but the complexity of mesh generation remains.

8.3 Multi-scale Approaches

ScaleMethodTarget
Several mmRay TracingCamera lens, microlens array
Several umRCWA / FDTDColor filter, BARL, DTI
Several nmFEM / BEMPlasmonic nanostructures, surface roughness

As a future direction, neural network-based surrogate models are gaining attention. Neural networks trained on RCWA/FDTD data provide real-time predictions, and precise solvers are called only at points where high accuracy is needed.


9. Comprehensive Performance Comparison

9.1 Qualitative Comparison

CharacteristicRCWAFDTDFEMBEMTMMRay Tracing
AccuracyHigh (periodic)HighVery highHigh (surface)Exact (1D)Low (ignores wave effects)
Speed (single wavelength)Very fastSlowSlowMediumExtremely fastExtremely fast
Speed (broadband)Medium (repeated)Fast (single run)Slow (repeated)Slow (repeated)Extremely fastExtremely fast
MemoryMediumHighHighHigh (dense)Extremely lowLow
Geometric flexibilityLow (periodic only)HighVery highMediumNone (1D only)High (macro)
Material flexibilityHighMediumVery highLowHighMedium
Automatic differentiation (AD)PossiblePossibleLimitedDifficultPossibleDifficult
GPU accelerationVery suitableSuitableLimitedLimitedUnnecessarySuitable

9.2 Computational Scaling

MethodSpatial DOFTime ComplexityMemory ComplexityBottleneck
RCWAM=(2N+1)2O(M3) per layerO(M2)Eigenvalue decomposition
FDTDNxNyNzO(NtotalT)O(Ntotal)Number of time steps T
FEMNDOF (mesh nodes)O(NDOF1.5) sparseO(NDOF) sparseMatrix solve
BEMNsurfaceO(Nsurface3)O(Nsurface2)Dense matrix
TMML (number of layers)O(L)O(1)None
Ray TracingNraysO(NraysS)O(Nrays)Number of rays Nrays, number of surfaces S

9.3 Typical Execution Times

1 um pitch BSI pixel, 2x2 Bayer unit cell, at 550 nm:

MethodParameter SettingsDOFSingle Wavelength Time41-Wavelength Sweep
RCWA (GPU)N=9, 10 layers~7,0000.3 s12 s
RCWA (GPU)N=15, 10 layers~19,0002 s80 s
FDTD (GPU)Δx=5 nm, PML 12~8M cells45 s45 s (broadband)
FDTD (CPU)Δx=10 nm, PML 8~1M cells300 s300 s
FEMAdaptive mesh, λ/10~500K DOF60 s2,460 s
TMM10 layers10< 0.001 s0.04 s

Note: The above figures are representative estimates and can vary significantly depending on hardware (GPU: NVIDIA A100, CPU: 8-core) and implementation.

9.4 Differentiable Simulation Support

Automatic differentiation (AD) support for inverse design and topology optimization:

MethodAD FrameworkGradient MethodRepresentative Solvers
RCWAPyTorch, JAXForward/Reverse ADmeent, fmmax, torcwa
FDTDPyTorch, JAXReverse AD, AdjointFDTDX, flaport, fdtdz
FEMLimitedAdjoint methodEMOPT (FDFD)
TMMEasyAnalytical gradientCustom implementation

RCWA vs FDTD Solver Comparison

Compare simulated quantum efficiency (QE) curves from RCWA and FDTD solvers. Adjust pixel pitch and solver parameters to see how results and performance change.

RCWA (Fourier order = 9)
0%20%40%60%80%100%400500600700Wavelength (nm)QE (%)RedGreenBlue
FDTD (grid = 20 nm)
0%20%40%60%80%100%400500600700Wavelength (nm)QE (%)RedGreenBlue
RCWA
Time estimate:137 ms
Memory:6 MB
Periodic structures:Yes
Arbitrary geometry:Limited
FDTD
Time estimate:188 ms
Memory:3 MB
Periodic structures:Yes
Arbitrary geometry:Yes
Agreement
Max |Delta QE|:2.2%
Avg |Delta QE|:0.9%
Status:Good agreement

10. Application in COMPASS

10.1 Rationale for RCWA + FDTD Selection

CriterionRCWAFDTDRationale
CIS pixel periodicityPerfect fitSuitablePixel array = periodic structure
Thin-film stack handlingAnalytical treatmentGrid discretizationRCWA advantage for BARL/ARC design
Cross-validation--Independent verification via different mathematical approaches
GPU accelerationVery suitableSuitableLeveraging PyTorch/JAX-based open source
LicenseMIT availableMIT availablemeent (MIT), flaport (MIT)

10.2 Cross-Validation Philosophy

Because the same physical laws are solved with different mathematical approaches, agreement between the two solvers significantly increases result confidence. Checklist when discrepancies arise:

  1. Insufficient RCWA convergence → Increase Fourier order
  2. Insufficient FDTD resolution → Refine grid
  3. Modeling differences → Review staircase approximation, material models, boundary conditions
  4. Energy conservation violation (R+T+A1) → Implementation bug

The SolverComparison class automates QE difference, relative error, and energy conservation verification.

10.3 Solver Selection Guide (Decision Guide)

Start simulation

    ├─ Is the structure periodic?
    │   ├─ YES → Only thin films?
    │   │         ├─ YES → TMM (initial design) → RCWA (precise)
    │   │         └─ NO  → RCWA (default) + FDTD (verification)
    │   └─ NO  → FDTD

    ├─ Is broadband needed?
    │   ├─ YES, 50+ wavelengths → FDTD (single run is more efficient)
    │   └─ NO, < 50 wavelengths → RCWA (per-wavelength iteration is faster)

    └─ Is time-domain information needed?
        ├─ YES → FDTD
        └─ NO  → RCWA (default choice)

10.4 Future Directions

COMPASS solver expansion roadmap:

PrioritySolver/MethodPurpose
Highfmmax (RCWA) integrationImproved convergence via vector FMM, JAX batching
HighFDTDX (FDTD) integrationMulti-GPU 3D, large-scale inverse design
MediumBuilt-in TMM moduleFast stack pre-design, 1D reference
MediumNeural network surrogate modelReal-time parameter optimization
LowFEM integration (EMUstack)Plasmonic/curved surface specialized research

References

Key Papers

  • K. S. Yee, "Numerical solution of initial boundary value problems involving Maxwell's equations in isotropic media," IEEE Trans. Antennas Propag., vol. 14, no. 3, pp. 302-307, 1966.
  • M. G. Moharam and T. K. Gaylord, "Rigorous coupled-wave analysis of planar-grating diffraction," J. Opt. Soc. Am., vol. 71, no. 7, pp. 811-818, 1981.
  • L. Li, "Use of Fourier series in the analysis of discontinuous periodic structures," J. Opt. Soc. Am. A, vol. 13, no. 9, pp. 1870-1876, 1996.
  • J.-P. Berenger, "A perfectly matched layer for the absorption of electromagnetic waves," J. Comput. Phys., vol. 114, no. 2, pp. 185-200, 1994.
  • D. W. Berreman, "Optics in stratified and anisotropic media: 4x4-matrix formulation," J. Opt. Soc. Am., vol. 62, no. 4, pp. 502-510, 1972.

Web Resources