You are on page 1of 28

7/21/2017

Instructor
Dr. Raymond Rumpf
(915) 747‐6958
rcrumpf@utep.edu

EE 5337
Computational Electromagnetics

Lecture #18

Maxwell’s Equations in 
Fourier Space
 These notes may contain copyrighted material obtained under fair use rules.  Distribution of these materials is strictly prohibited  
Lecture 18 Slide 1

Outline
• Maxwell’s Equations in Fourier Space
• Matrix form of Maxwell’s equations in Fourier space
• Constructing convolution matrices for orthorhombic 
geometries
• Fast Fourier factorization
• Consequences of Fourier‐space representation

Lecture 18 Slide 2

1
7/21/2017

Maxwell’s Equations 
in Fourier Space

Lecture 18 Slide 3

What is Fourier Space?
Real Space
So far, we have been representing fields 
and devices on an x‐y‐z grid where field 
values are known at discrete points. Real Space

Fourier Space
In Fourier‐space, we represent fields as a 
sum of plane waves at different angles 
and wavelengths called spatial harmonics.   r Fourier Space
We will represent devices as the sum of 
sinusoidal gratings at different angles and 
q
periods. p

Lecture 18 Slide 4

2
7/21/2017

Fourier‐Space Vs. Frequency‐Domain

 H
  E  
t
We Fourier 
transform x, y, and z
 E We Fourier
 H   transform t to .
to kx, ky, and kz. t


  H
jk  E     
t   E   j H
  
  E   H  j E
jk  H  
t
Fourier Space Frequency Domain

Real‐Space Fourier‐Space
Time‐Domain FDTD, Discontinuous Galerkin Pseudo‐spectral FDTD
Frequency‐Domain FDFD, FEM, MoM, MoL RCWA, SAM, Spectral Domain Method

Lecture 18 Slide 5

Visualizing the Spatial Harmonics


k  p, q, r   k x  p  xˆ  k y  q  yˆ  k z  r  zˆ

2 p
kx  p   p  integer
x
2 q
ky q  q  integer
y
2 r
kz  r   r  integer
z

Each of these plane waves will be 
assigned its own complex amplitude 
to convey its magnitude and phase.

Lecture 18 Slide 6

3
7/21/2017

Conventional Complex Fourier Series
Periodic functions can be expanded into a Fourier series.

For 1D periodic functions, this is
 2 px  2 2 px
1 j
 a  p e
j
f  x  
a  p   f  x  e  dx
p    2

For 2D periodic functions, this is
 2 px 2 qy   2 px 2 qy 
  j    j  
 x  y  1   y 
f  x, y     a  p, q  e a  p, q    f  x, y  e 
 x
dA
p  q  A A

For 3D periodic functions, this is
 2 px 2 qy 2 rz   2 px 2 qy 2 rz 
   j     j   
  z  1   z 
f  x, y , z    a  p, q, r  e  x
a  p, q , r   f  x, y , z  e
y  x y

p  q  r  V 


V
dV

Lecture 18 Slide 7

Generalized Complex Fourier Series
Fourier series can be written in terms of the reciprocal lattice vectors.
For 1D periodic functions, this is
 2

1 2
f  x   a  pe
p 
jpTx
a  p 
  2
f  x  e jpTx dx T

For 2D periodic functions, this is
       
  1  j  pT1  qT2  r
f  x, y    a  p, q  e a  p, q    
j pT1  qT2  r

A 
f x , y e dA
p  q  A

For 3D periodic functions, this is
      
   1   j  pT1  qT2  rT3 r
f r     a  p , q, r  e a  p , q, r   f r e
j pT1  qT2  rT3  r

p  q  r  V 


V
dV

For rectangular, tetrahedral, or orthorhombic geometries, the 
reciprocal lattice vectors are:
 2  2  2
T1  xˆ T2  yˆ T3  zˆ
x y z
Lecture 18 Slide 8

4
7/21/2017

Visualizing Expansions with Different ’s
 
 0 



 0 



Lecture 18 Slide 9

Visualizing Expansions with Different Symmetries

Simple‐Cubic Face‐Centered‐Cubic Hexagonal

Square Triangular

Lecture 18 Slide 10

5
7/21/2017

Starting Point
We start with Maxwell’s equations in the following form…

Ez E y H z H y


  k0  r H x   k 0 r E x
y z y z
Ex Ez H x H z
  k0  r H y   k 0 r E y
z x z x
E y Ex H y H x
  k0  r H z   k 0 r E z
x y x y

Recall that we normalized the magnetic field according to
  
H   j 0 H
0

Lecture 18 Slide 11

Fourier Expansion of the Materials
Assuming the device is infinitely periodic in all directions, the 
permittivity and permeability functions can be expanded into 
Fourier Series.
      
  
r r    a  p, q, r  e
j pT1  qT2  rT3  r

p  q  r 

1   j  pT1  qT2  rT3 r


a  p, q, r     r  r  e dV
V V

      

r  r      b  p, q, r  e  
j pT1  qT2  rT3  r

p  q  r 

1   j  pT1  qT2  rT3 r


b  p, q, r    r  r  e dV
V V

Lecture 18 Slide 12

6
7/21/2017

Fourier Expansion of the Fields (1 of 2)
The field expansions are slightly different because a wave could be 


travelling in any direction    .  The expansions must satisfy the Floquet
boundary conditions.
             
j  pT  qT  rT  r
E r   e  j  r
   S  p, q, r  e
p  q  r 
Think of  as kinc 1 2 3

 
e  j  r was brought 
    
   

   S  p , q, r  e
 j   pT1  qT2  rT3  r inside summation and 
 combined with second 
p  q  r  
Let this be  k  p, q, r  exponential.
      This is clearly a set of 
    S  p, q , r  e
p  q  r 
 jk  p , q , r  r
plane waves with 

k  p, q, r 
amplitudes                  .
     j  k x  p , q , r  x  k y  p , q , r  y  k z  p , q , r  z 
    S  p, q, r  e
p  q  r  k x  p, q, r    x  pT1, x  qT2, x  rT3, x

     k y  p, q, r    y  pT1, y  qT2, y  rT3, y


k  p, q, r     pT1  qT2  rT3
k z  p, q, r    z  pT1, z  qT2, z  rT3, z
Lecture 18 Slide 13

Fourier Expansion of the Fields (2 of 2)
For cubic, tetragonal, and orthorhombic symmetry, the expansions 
reduce to
     
  j  k x  p  x  k y  q  y  k z  r  z  
   S  p, q , r  e
 j  k x  p  x  k y  q  y  k z  r  z 
Ex  r   x H x  r      U  p, q , r  e x
p  q  r  p  q  r 
     
  j  k x  p  x  k y  q  y  k z  r  z  
   S  p, q, r  e
 j  k x  p  x  k y  q  y  k z  r  z 
Ey  r   y H y  r      U  p, q, r  e y
p  q  r  p  q  r 
     
  j  k x  p  x  k y  q  y  k z  r  z    j  k x  p  x  k y  q  y  k z  r  z 
Ez  r      S  p, q, r  e
p  q  r 
z H z  r      U  p, q, r  e z
p  q  r 

2 p
k x  p, q, r   k x  p    x  p  , , 2, 1, 0,1, 2, ,  The wave vectors kx, ky, and kz
x are still distributed over all 
2 q possible values of p, q, and r.  
k y  p, q, r   k y  q    y  q  , , 2, 1, 0,1, 2, ,  However, their values only 
y change in one direction, which is 
2 r conveyed by the argument in 
k z  p, q, r   k z  r    z  r  , , 2, 1, 0,1, 2, ,  parentheses.
z

Think this way  Think this way 
for size of arrays. for dependence.

Lecture 18 Slide 14

7
7/21/2017

Substitute Expansions into Maxwell’s Equations
 2 p 2 q 2 r 
   j x y z
     x  z 
 r r    a  p , q, r  e
 j  k x  p  x  k y  q  y  k z  r  z  y
H y  r      U  p, q, r  e

y
p  q  r  p  q  r 

  
  j  k x  p  x  k y  q  y  k z  r  z     
H z  r      U  p, q , r  e
p  q  r 
z Ex  r      S  p, q , r  e x
 j  k x  p  x  k y  q  y  k z  r  z 

p  q  r 

H z H y
  k 0 r E x
y z

      j  k x  p  x  k y  q  y  k z  r  z         j  k x  p  x  k y  q  y  k z  r  z  
    U z  p , q, r  e       U y  p, q, r  e 
y  p  q  r   z  p  q  r  
     2 p 2 q 2 r 
z 
 z    j  k  p  x  k y  q  y  k z  r  z  
j x y   
 
 k0     a  p , q , r  e  x 
  p   S x  p, q, r  e  x
y

 p  q  r  


 
 q  r  

Lecture 18 Slide 15

Algebra for the Left Side Terms
First ugly term…
      j  k x  p  x  k y  q  y  k z  r  z  
  
  j  k x  p  x  k y  q  y  k z  r  z 
    U z  p, q , r  e     U  p, q, r  y e z
y  p  q  r   p  q  r 
  

   U  p, q, r    jk e  j  k x  p  x  k y  q  y  k z  r  z 
 z y , pqr
p  q  r 
  
 j  k x  p  x  k y  q  y  k z  r  z 
     jk  q U  p, q, r  e
p  q  r 
y z

Second ugly term…
      j  k x  p  x  k y  q  y  k z  r  z  
  
  j  k x  p  x  k y  q  y  k z  r  z 
    U y  p, q, r  e     U  p, q, r  z ey
z  p  q  r   p  q  r 
  

   U  p, q, r    jk e  j  k x  p  x  k y  q  y  k z  r  z 
 y z , pqr
p  q  r 
  
 j  k x  p  x  k y  q  y  k z  r  z 
     jk  r U  p, q, r  e
p  q  r 
z y

Lecture 18 Slide 16

8
7/21/2017

Algebra for the Right Side Term
Third ugly term…
Here we have the product of two triple summations.
     2 p 2 q 2 r 
z 
 z    j  k  p  x  k y  q  y  k z  r  z  
j x y   
 
 
   a  p, q, r  e  x    S x  p, q, r  e  x
y

 p  q  r    p  q  r  


  

This is called a Cauchy product and is handled as follows.
       n

  an     bn    cn cn   ambn  m
 n 0   n0  n 0 m0

Applying this rule to the triple summations, we get

     j  k x  p  x  k y  q  y  k z  r  z 
   
   e    a  p  p, q  q, r  r  S  p, q, r  x
p  q  r   p   q  r   

Lecture 18 Slide 17

Combine the Terms Inside Summation
      j  k x  p  x  k y  q  y  k z  r  z         j  k x  p  x  k y  q  y  k z  r  z  
    U z  p, q, r  e       U y  p, q , r  e 
y  p  q  r   z  p  q  r  
     2 p 2 q 2 r 
z 
 z    j  k  p  x  k y  q  y  k z  r  z  
j x y   
 
 k0     a  p, q , r  e  x 
  p   S x  p , q, r  e  x
y

 p  q  r  


 
 q  r  

     
 j  k x  p  x  k y  q  y  k z  r  z   j  k x  p  x  k y  q  y  k z  r  z 
    jk  q U  p, q, r  e
p  q  r 
y z  
p  q  r 
jk z  r  U y  p, q, r  e

     j  k x  p  x  k y  q  y  k z  r  z 
   
 k0    e    a  p  p, q  q, r  r  S  p, q, r  x
p  q  r   p   q  r   

Our equation can now be brought inside a single triple summation.
 jk  q  U  p, q, r  e  j kx  p  x  k y  q  y  kz  r  z   jk  r U  p, q, r  e  j kx  p  x  k y  q  y  kz  r  z  
   y z z y

     j  k x  p  x  k y  q  y  k z  r  z 
   
p  q  r    k0 e    a  p  p, q  q, r  r   S x  p, q, r   
 p  q  r   

Lecture 18 Slide 18

9
7/21/2017

Final Equation for (p,q,r)th Harmonic
 jk  q  U  p, q, r  e j k x  p  x  k y  q  y  k z  r  z   jk  r  U  p, q, r  e  j kx  p  x  k y  q  y  kz  r  z  
    y z z y

     j  k x  p  x  k y  q  y  k z  r  z 
   
p  q  r    k0 e    a  p  p, q  q, r  r   S x  p, q, r   
 p  q  r   

The equation inside the braces much be satisfied for each 
combination of (p,q,r).
 j  k x  p  x  k y  q  y  k z  r  z   j  k x  p  x  k y  q  y  k z  r  z 
 jU z  p, q, r  k y  q  e  jU y  p, q, r  k z  r  e
  
 j  k x  p  x  k y  q  y  k z  r  z 
 k0 e    a  p  p, q  q, r  r  S  p, q, r 
p   q   r  
x

Finally, we divide both sides by the common exponential term and 
move the j to the right‐hand side.
  
k y  q  U z  p, q, r   k z  r  U y  p, q, r   jk0    a  p  p, q  q, r  r  S  p, q, r
p q r  
x

Lecture 18 Slide 19

Alternate Derivation
We start with
H z H y
  k0  r E x
y z 
Point‐by‐point multiplication in real‐space…

We Fourier‐transform this equation in x, y, and z resulting in


k y  q  U z  p, q, r   k z  r  U y  p, q, r   jk0 a  S x Our point‐by‐point multiplication 
 becomes a convolution.
a  FT  r 
S x  FT  Ex 

We now realized that the strange triple summation remaining in our 
equation is actually 3D convolution in Fourier space!
  
 r  Sx     a  p  p, q  q, r  r  S  p, q, r
p  q  r  
x

Lecture 18 Slide 20

10
7/21/2017

Maxwell’s Equations in Fourier Space
Real‐Space Fourier‐Space
H z H y
  k 0 r E x k y  q  U z  p, q, r   k z  r U y  p, q, r   jk0 a  p, q, r   S x  p, q, r 
y z
k z  r U x  p, q, r   k x  p U z  p, q, r   jk0 a  p, q, r   S y  p, q, r 
H x H z
  k 0 r E y k x  p U y  p, q, r   k y  q U x  p, q, r   jk0 a  p, q, r   S z  p, q, r 
z x
H y H x
  k 0 r E z
x y 2 p
kx  p    x  p  , , 2, 1, 0,1, 2, , 
x
2 q
ky q   y  q  , , 2, 1, 0,1, 2, , 
y
2 r
kz  r    z  r  , , 2, 1, 0,1, 2, , 
Ez E y z
  k0  r H x
y z
Ex Ez
  k0  r H y k y  q  S z  p, q, r   k z  r  S y  p, q, r   jk0b  p, q, r  U x  p, q, r 
z x
k z  r  S x  p, q, r   k x  p  S z  p, q, r   jk0b  p, q, r  U y  p, q, r 
E y Ex
  k0  r H z k x  p  S y  p, q, r   k y  q  S x  p, q, r   jk0b  p, q, r  U z  p, q, r 
x y

Lecture 18 Slide 21

Visualizing Maxwell’s Equations in Fourier Space

In real‐space, we know the field values at discrete points.
In Fourier‐space, we know the amplitudes of discrete plane waves.

A less clear, but more accurate 
picture is when all of the plane 
waves overlap.
r

q
p
Lecture 18 Slide 22

11
7/21/2017

Matrix Form of 
Maxwell’s Equations 
in Fourier Space

Lecture 18 Slide 23

Conversion to Matrix Form
The following equation is written once for each spatial harmonic.
P 2 Q 2 R 2
k y  q U z  p, q, r   k z  r U y  p, q, r   jk0    a  p  p, q  q, r  r  S  p, q, r 
p   P 2 q  Q 2 r   R 2
x

total # spatial harmonics  P  Q  R

This large set of equations can be written in matrix form as
K y u z  K z u y  jk0  r  s x
Only Toeplitz
 ki 1,1,1 0  The K terms are diagonal  for 1D
  matrices containing all 
k 1,1, 2 
Ki   i  the wave vector   
  
 r   Toeplitz 
  components along the 
i 
 0 k P , Q , R center diagonal.
 
 U i 1,1,1   Si 1,1,1  ui and si are column  Convolution 
   
U 1,1, 2   S 1,1, 2   vectors containing the  matrix
ui   i si   i amplitudes of each 
     
    spatial harmonic in 
U i  P, Q, R    Si  P, Q, R   the expansion.
Lecture 18 Slide 24

12
7/21/2017

Matrix Form of Maxwell’s Equations in Fourier Space

Analytical Equations Numerical Equations

k y  q U z  p, q, r   k z  r U y  p, q, r   jk0 a  p, q, r   S x  p, q, r  K y u z  K z u y  jk0  r  s x
k z  r U x  p, q, r   k x  p  U z  p, q, r   jk0 a  p, q, r   S y  p, q, r  K z u x  K x u z  jk0  r  s y
k x  p  U y  p, q, r   k y  q U x  p, q, r   jk0 a  p, q, r   S z  p, q, r 
K xu y  K y u x  jk0  r  s z

k y  q  S z  p, q, r   k z  r  S y  p, q, r   jk0b  p, q, r  U x  p, q, r  K y s z  K z s y  jk0  r  u x
k z  r  S x  p, q, r   k x  p  S z  p, q, r   jk0b  p, q, r  U y  p, q, r  K z s x  K xs z  jk0  r  u y
k x  p  S y  p, q, r   k y  q  S x  p, q, r   jk0b  p, q, r  U z  p, q, r 
K xs y  K y s x  jk0  r  u z

Lecture 18 Slide 25

Interpreting the Column Vectors
Each element of the column vector ui is the complex amplitude of a 
spatial harmonic.

S 2
  
S 
 2  S 1
 S 1 
 
si   S0 
S0
 S1 
 
 S2  S1
  
 
Column vector
S2

 Electric field
Spatial harmonics
Lecture 18 Slide 26

13
7/21/2017

Constructing the 
Convolution Matrices for 
Orthorhombic Geometries

Lecture 18 Slide 27

Calculating the Fourier Coefficients
The Fourier coefficients are calculated by solving the following 
equation for every combination of values of p, q, and r.
 2 p 2  q 2 r 


1  j  x y z
 z 
a  p, q , r   r r  e 
x y
dV
V
V

For cubic, tetragonal, and orthorhombic symmetries, these are easily 
calculated using a multi‐dimensional Fast Fourier Transform (FFT).

2D‐FFT a  p, q 
Real‐Space Fourier‐Space
a 2

q
y 0
q

a 2

a 0 a p
2 2
x

Lecture 18
p Slide 28

14
7/21/2017

How Many Points Are Needed on the Real‐Space 
Grid?

real
m0 m0

imag
m 1 m 1

m2 m2

m3 m3

m4 m4

m5 m5

m6 m6

Several hundred in order to accurately calculate the coefficients of the Fourier series.
Lecture 18 Slide 29

Convergence of Fourier Coefficients for 2D Functions

Conclusion: when using more spatial harmonics, even more points are needed 
on the high resolution grid to calculate accurate Fourier coefficients.
Lecture 18 Slide 30

15
7/21/2017

The Convolution Matrix
There are two matrices that we must construct that perform a 3D 
convolution in Fourier space.
Don’t confuse these for r and r used 
 r  and  r  in FDFD that were diagonal matrices.
These will be full convolution matrices.

We construct these matrices with the following picture in mind.

 
 
 row p,q,r    

   a  p  p, q  q, r  r  S  p, q, r 


  p   q  r  
x

 r    
 mrow   r   1 PQ   q  1 P  p
 
 
  Constructing the convolution matrices is as 
  simple as placing the Fourier coefficients in the 
  proper order in each row in the matrix.
Lecture 18 Slide 31

Header for MATLAB Code to Construct Convolution 
Matrices
The following slides will step you through the procedure to write a 
MATLAB code that calculates convolution matrices for 1D, 2D, or 3D 
problems.  To handle an arbitrary number of dimensions, the header 
should look like…
function C = convmat(A,P,Q,R)
% CONVMAT Rectangular Convolution Matrix
%
% C = convmat(A,P); for 1D problems
% C = convmat(A,P,Q); for 2D problems
% C = convmat(A,P,Q,R); for 3D problems
%
% This MATLAB function constructs convolution matrices
% from a real-space grid.

%% HANDLE INPUT AND OUTPUT ARGUMENTS

% DETERMINE SIZE OF A
[Nx,Ny,Nz] = size(A);

% HANDLE NUMBER OF HARMONICS FOR ALL DIMENSIONS


if nargin==2
Q = 1;
R = 1;
elseif nargin==3
R = 1;
end

Lecture 18 Slide 32

16
7/21/2017

Step 1: Calculate the Fourier Coefficients
We begin by calculating the indices of the 
spatial harmonics, centered at 0.
Q
% COMPUTE INDICES OF SPATIAL HARMONICS
NH = P*Q*R; %total number
p = [-floor(P/2):+floor(P/2)]; %indices along x
q = [-floor(Q/2):+floor(Q/2)]; %indices along y
P
r = [-floor(R/2):+floor(R/2)]; %indices along z
P  number of spatial harmonics along x
Then the Fourier coefficients are  Q  number of spatial harmonics along y
R  number of spatial harmonics along z
calculated using an n‐dimensional FFT.
% COMPUTE FOURIER COEFFICIENTS OF A
A = fftshift(fftn(A)) / (Nx*Ny*Nz);

We need to calculate the position of the zero‐order harmonic in the 
array A.  Knowing this, all others can be found because they are 
centered around the zero‐order harmonic.
% COMPUTE ARRAY INDICES OF CENTER HARMONIC
p0 = 1 + floor(Nx/2);
q0 = 1 + floor(Ny/2); These equations are valid for both odd 
r0 = 1 + floor(Nz/2); and even values of Nx, Ny, and Nz.

Lecture 18 Slide 33

Step 2: Initialize Convolution Matrix
The convmat() function will run very slow if the convolution 
matrix is not first initialized.
% INITIALIZE CONVOLUTION MATRIX
C = zeros(NH,NH);

0 0  0
0 0  0 
 r       
 
0 0  0

Lecture 18 Slide 34

17
7/21/2017

Step 3: Loop Through the Rows
 
With the picture in mind of filling in rows,  


 row p,q,r
it makes sense to start by creating a loop   
 r    row = 1,2,3,… 
that steps through each row of the   
 
convolution matrix. 



 
for rrow = 1 : R
for qrow = 1 : Q P  number of spatial harmonics along x
for prow = 1 : P Q  number of spatial harmonics along y
row = (rrow-1)*Q*P + (qrow-1)*P + prow; R  number of spatial harmonics along z

end
end
end

Lecture 18 Slide 35

Step 4: Loop Through the Columns
 
Now we step from left to right within the  



row by looping through the columns.  
 
 r    
 
 
 col = 1,2,3,… 
 
 
for rrow = 1 : R
for qrow = 1 : Q P  number of spatial harmonics along x
for prow = 1 : P Q  number of spatial harmonics along y
row = (rrow-1)*Q*P + (qrow-1)*P + prow; R  number of spatial harmonics along z
for rcol = 1 : R
for qcol = 1 : Q
for pcol = 1 : P
col = (rcol-1)*Q*P + (qcol-1)*P + pcol;

end
end
end
end
end
end

Lecture 18 Slide 36

18
7/21/2017

Step 5: Calculate Where to Get Value from FFT
 
We need to know which Fourier  
 row p,q,r 
coefficient to place into C(row,col).  To   
 r    

determine this, we refer to the original   
 
summation that defined the convolution. 



 
for rrow = 1 : R
for qrow = 1 : Q P  number of spatial harmonics along x
for prow = 1 : P Q  number of spatial harmonics along y
row = (rrow-1)*Q*P + (qrow-1)*P + prow; R  number of spatial harmonics along z
for rcol = 1 : R
for qcol = 1 : Q
for pcol = 1 : P
col = (rcol-1)*Q*P + (qcol-1)*P + pcol;
pfft = p(prow) - p(pcol);
Q
qfft = q(qrow) - q(qcol);  a pfft, qfft, rfft,
rfft = r(rrow) - r(rcol);

end
end P
end P 2 Q 2 R 2
end
end
   a  p  p, q  q, r  r  S  p, q, r 
p  P 2 q Q 2 r   R 2
x
end

Lecture 18 Slide 37

Step 6: Fill in Element of Convolution Matrix
 
Last, we copy the Fourier coefficient from  
 row p,q,r 
the n‐FFT into the convolution matrix at   
 r    

element (row,col).  
 
 
 
 
for rrow = 1 : R
for qrow = 1 : Q P  number of spatial harmonics along x
for prow = 1 : P Q  number of spatial harmonics along y
row = (rrow-1)*Q*P + (qrow-1)*P + prow; R  number of spatial harmonics along z
for rcol = 1 : R
for qcol = 1 : Q
for pcol = 1 : P
col = (rcol-1)*Q*P + (qcol-1)*P + pcol;
pfft = p(prow) - p(pcol);
qfft = q(qrow) - q(qcol);
rfft = r(rrow) - r(rcol);
C(row,col) = A(p0+pfft,q0+qfft,r0+rfft);
end
end
end
end We have included the offsets to the 
end zero‐order harmonic.
end
pfft = qfft = rfft = 0 needs to access 
the zero‐order harmonic located at p0, q0, r0.
Lecture 18 Slide 38

19
7/21/2017

What Does a Convolution Matrix Look Like?

Device  r  x, y  Convolution Matrix  r 

High Resolution Grid Convolution Matrix
• Must be on a very high resolution  • Full matrix
grid to calculate accurate Fourier  • Numbers tend smaller with 
coefficients. distance from the center diagonal.

Lecture 18 Slide 39

Convolution Matrices for Homogeneous Media

The convolution matrix for a homogeneous material is simply a 
diagonal matrix with the diagonals all set to r.

Device  r  x, y  Convolution Matrix  r 

 r    r I
Lecture 18 Slide 40

20
7/21/2017

Notes
• You now have a very powerful code!
• Most of the tediousness of Fourier space methods are 
absorbed into the convolution matrices.
• It is able to construct 1D, 2D, and 3D convolution matrices 
without changing anything.
– For 1D devices: P1, Q=1, R=1
– For 2D devices: P1, Q1, R=1
– For 3D devices: P1, Q1, R1
• This code can only be used for devices with cubic, 
tetragonal, and orthorhombic symmetries due to the form 
of the expansion used.
• Convolution matrices for homogeneous materials are 
 r    r I
diagonal with the form                 .
• Uniform directions require only one harmonic.

Lecture 18 Slide 41

Fast Fourier Factorization 
(FFF)

Lecture 18 Slide 42

21
7/21/2017

Product of Two Functions
Suppose we have the product of two periodic functions that have 
the same period:
f  x  g  x  h  x

Then we expand each function into its own Fourier series.
2 mx 2 mx 2 mx
     

 m   m   m
j j j
a e 
b e 
 c e 

 m    m   m 

This is exact as long as an infinite number of terms is used.

Obviously, only a finite number of terms can be retained in the 
expansion if it is to be solved on a computer.

Lecture 18 Slide 43

Finite Number of Terms
To describe devices on a computer, we can retain only a finite 
number of terms
2 mx 2 mx 2 mx Problem:  the left side of the equation 
 M  M  M

  am e    bm e    cm e
j j j
   converges slower than the right.  That 
 m  M   m  M  m  M is, more terms are needed for a given 
level of “accuracy.”
f  x  g  x  h  x
We have four special cases for                               :

1. f(x) and g(x) are continuous everywhere.
2. Either f(x) or g(x) has a step discontinuity, but not  No problem
both at the same point.
3. Both f(x) and g(x) have a step discontinuity at the 
Problem is fixable
same point, but their product is continuous.
4. Both f(x) and g(x) have a step discontinuity at the  Problem is NOT fixable
same point and their product is also discontinuous.
When we retain only a finite‐number of terms, cases 3 
and 4 exhibit slow convergence.  Only case 3 is fixable.

Lecture 18 Slide 44

22
7/21/2017

The Fix for Case 3
We can write our product of two functions in Fourier space.
f g  h   F  G    H 
For Case 3, both f(x) and g(x) are have a step discontinuity at the 
same point, but their product f(x)g(x)=h(x) is continuous.  To handle 
this case, we bring f(x) to the right‐hand side of the equation.
1 1
g h  G     H 
f  F 
Now, there are no problems with this new equation because both 
sides of the equation are Case 2.  We bring the convolution matrix 
back to left side of the equation.
1
1  1 1
  g  h    G    H 
 F 
 f 
Lecture 18 Slide 45

Convergence Problem with Finite Terms

f  x
g  x
h  x  ideal

h  x  No FFF
h  x  FFF

Fast convergence Slow convergence Fast convergence 


again!
Lecture 18 Slide 46

23
7/21/2017

FFF and Maxwell’s Equations
In Maxwell’s equations, we have the product of two functions…
  
r r   E r 
The dielectric function is discontinuous at the interface between two 
materials.  Boundary conditions require that

E1,||  E2,|| Tangential component is continuous across the interface

1 E1,   2 E2, Normal component is discontinuous across the interface, 


but the product of  E is continuous.

We conclude that we must handle the convolution matrix differently 
for the tangential and normal components.  This implies that the final 
convolution matrix will be a tensor.

Lecture 18 Slide 47

FFF for Maxwell’s Equations
First, we decompose the electric field into tangential and normal 
components at all interfaces.

 r s   r  s||  s    r s||   r s


We now have the opportunity to associate different convolution 
matrices with the different field components.

 r s   r ,||  s||   r ,  s


Case 2. Case 3.
No problems. Fixable with FFF.

1
 r FFF s   r ,||  s||  1  r ,  s

Lecture 18 Slide 48

24
7/21/2017

Normal Vector Field
To implement FFF, we must determine what directions are parallel 
and perpendicular at each point in space.
For arbitrarily shaped devices, this comes from knowledge of the 
materials within the layer.
We must construct a vector function throughout the grid that is 
normal to all the interfaces.  This called the “normal vector” field.

nˆ  x, y, z 
This can be very difficult 
to calculate!!

P. Gotz, T. Schuster, K. Frenner, S. Rafler, W. Osten, “Normal vector method for the RCWA 
with automated vector field generation,” Opt. Express 16(22), 17295‐17301 (2008). 

Lecture 18 Slide 49

Incorporating Normal Vector Function
Recall the FFF fix
1
 r FFF s   r s||  1  r  s
The parallel and perpendicular components of s can be calculated 
using the normal vector matrix N.
s   Ns
s||  s  Ns   I  N  s
Substituting these into the FFF equation yields

 r FFF s   r  I  N  s  1  r  Ns
1

1
This defines a new 
  r  s   r  Ns  1  r  Ns convolution matrix that 
incorporates FFF.
  r    r  N  1  r  N  s
1

Lecture 18 Slide 50

25
7/21/2017

Revised Convolution Matrix
The convolution matrix incorporating FFF is then
1
 r FFF   r    r  N  1  r  N
  r   1  r    r  N
1

This is often written as
1
 r FFF   r    r  N   r   1  r    r 
This is interpreted as 
a correction term 
that incorporates FFF.

Lecture 18 Slide 51

Consequences of 
Fourier‐Space

Lecture 18 Slide 52

26
7/21/2017

Efficient Representation of Devices
Along a given direction, approximately half the number of the terms 
are needed in Fourier space than would be needed in real space.
3×3 7×7 11×11 15×15 19×19 23×23 27×27 31×31 35×35 39×39

For 2D problems in real space, 4× more terms are needed making 
the matrices 16× larger.

For 3D problems in real space, 8× more terms are needed making 
the matrices 64× larger.

Lecture 18 Slide 53

Blurring from Too Few Harmonics
If too few harmonics are used, the geometry of the device is blurred.
• Boundaries are artificially blurred.
• Reflections at boundaries are artificially reduced.
• It is difficult or impossible to resolve fine features or rapidly varying fields.

1×1 3×3 5×5 7×7

11×11 21×21 41×41 81×81

Lecture 18 Rule of Thumb:  # harmonics = 10 per  Slide 54

27
7/21/2017

Gibb’s Phenomena
A problem occurs when a discontinuous function (material interface) is 
represented by continuous basis functions (sin’s and cos’s).  When the 
Fourier transform is used, “spikes” appear around each discontinuity.  
Fourier space methods act is if those spikes are actually present.

 


 2 sin x
 0 x
http://mathworld.wolfram.com/GibbsPhenomenon.html  dx  1.1789797445

Lecture 18 Slide 55

Gibb’s Phenomena in Maxwell’s Equations
A Fourier‐space numerical method treats the spikes as if they are real.
• The magnitude of the spikes remains constant no matter how many harmonics are used.
• The magnitude of the spikes is proportional to the severity of the discontinuity.
• The width of the spikes becomes more narrow with increasing number of harmonics.
• In Fourier‐space, Maxwell’s equations really think the spikes are there.

1×1 3×3 5×5 7×7

11×11 21×21 41×41 81×81

Due to Gibb’s phenomenon, Fourier‐space analysis is most efficient for structures with low 
to moderate index contrast, but many people have modeled metals effectively.
Lecture 18 Slide 56

28

You might also like