Skip to content

RCWA Explained

선수 지식 | Prerequisites

전자기파회절 → 이 페이지 RCWA가 처음이라면 먼저 솔버 선택 가이드에서 개요를 확인하세요.

RCWA (Rigorous Coupled-Wave Analysis) is one of the two main solver types in COMPASS. Think of it as a method that breaks down the pixel structure into its spatial frequency components (Fourier series), then solves Maxwell's equations for each component. It's particularly fast for periodic structures like pixel arrays.

Rigorous Coupled-Wave Analysis (RCWA) is the primary solver method in COMPASS. It solves Maxwell's equations in the frequency domain for periodic structures by expanding fields in Fourier harmonics.

Core idea

RCWA decomposes the problem into two parts:

  1. Lateral (xy): The periodic permittivity and fields are expanded in a truncated Fourier series.
  2. Vertical (z): Within each layer, the Fourier coefficients satisfy a system of coupled ODEs that can be solved by eigendecomposition.

The layers are then connected using scattering-matrix (S-matrix) recursion to enforce boundary conditions at every interface.

Step-by-step algorithm

1. Fourier expansion of permittivity

For a 2D periodic structure with periods Λx and Λy, the permittivity in each layer is expanded:

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

where Gpx=2πp/Λx and Gqy=2πq/Λy are reciprocal lattice vectors. The expansion is truncated to |p|Nx and |q|Ny, giving a total of (2Nx+1)(2Ny+1) harmonics.

In COMPASS, the Fourier order is set in the solver config:

yaml
solver:
  name: torcwa
  params:
    fourier_order: [9, 9]   # Nx=Ny=9 -> 19x19 = 361 harmonics

2. Eigenvalue problem

Within each layer, substituting the Fourier expansion into Maxwell's equations yields an eigenvalue problem of dimension 2M×2M, where M=(2Nx+1)(2Ny+1):

Ωw=λ2w

The matrix Ω encodes the coupling between Fourier harmonics due to the permittivity pattern. The eigenvalues λj give the propagation constants and the eigenvectors wj give the mode profiles.

For a uniform layer, Ω is diagonal and the eigenvalues are simply the plane-wave propagation constants.

3. S-matrix recursion

Individual layer S-matrices are combined using the Redheffer star product, which avoids the numerical instability of transfer-matrix (T-matrix) cascading:

Stotal=S1S2SN

The star product formula for combining SA and SB:

S11=S11A+S12ADS11BS21AS12=S12ADS12B

where D=(IS11BS22A)1. This formulation is numerically stable because all intermediate matrices involve only decaying exponentials.

4. Field computation

Once the global S-matrix is known, the reflected and transmitted diffraction orders are obtained directly:

(rt)=(S11S12S21S22)(a0)

where a is the incident wave amplitude. The diffraction efficiencies (reflected and transmitted power per order) are then:

Rm=Re(kz,mr)kz,0i|rm|2Tm=Re(kz,mt)kz,0i|tm|2

Fourier factorization

The convergence of RCWA depends critically on how the permittivity Fourier coefficients are computed. For structures with sharp material boundaries (e.g., metal grids), the standard approach converges slowly for TM polarization.

Li's inverse rule dramatically improves convergence by using [FT(1/ε)]1 instead of FT(ε) for the appropriate field components:

FactorizationWhen to useCOMPASS setting
Naive (Laurent rule)Continuous permittivity profilesfourier_factorization: "naive"
Li inverse ruleDiscontinuous boundaries (metal grids, DTI)fourier_factorization: "li_inverse"
Normal vector methodComplex 2D patternsfourier_factorization: "normal_vector"

Convergence

The accuracy of RCWA improves as the Fourier order increases, but so does the computational cost (the eigenvalue problem scales as O(M3)). A typical convergence study sweeps fourier_order from 3 to 25 and plots QE vs order:

RCWA Convergence Demo

See how increasing the Fourier order N improves the accuracy of permittivity reconstruction and RCWA reflectance/transmittance convergence for a binary grating.

Total Harmonics:11
Matrix Size:11×11 = 121
Computational Cost (O(M³)):~1.3K
Gibbs Overshoot:9.4%
Permittivity Profile Reconstruction
14710120L/2LεPosition in unit cellOriginalFourier (N=5)
R, T Convergence vs Fourier Order
0%10%20%30%40%50%15101520Fourier Order NR (reflectance)T (transmittance)
yaml
solver:
  convergence:
    auto_converge: true
    order_range: [5, 25]
    qe_tolerance: 0.01

For a 1 um pitch pixel with a simple color filter pattern, order 9 is usually sufficient. For finer features (metal grids, DTI), order 15-21 may be needed.

RCWA solvers in COMPASS

COMPASS wraps three RCWA libraries:

SolverLibraryGPU supportNotes
torcwatorcwaCUDA (PyTorch)Default. Best for GPU-accelerated sweeps.
grcwagrcwaCUDA (JAX/PyTorch)Alternative GPU backend.
meentmeentCUDA/CPUSupports analytic eigendecomposition.

All three implement the same SolverBase interface, so switching between them requires only changing solver.name in the config.