Fourir Modal Mthod Solution to th Sminar Tasks Thomas Kaisr, Matthias Zilk Th assignmnt was about th implmntation of a D vrsion of th Fourir Modal Mthod in TE polarization and was dividd into two tasks. Th first task was to solv th ignvalu problm in Fourir spac that lads to th grating mods. Th scond task was to find th amplituds of th rflctd and transmittd diffraction ordrs as wll as thir diffractioicincis. Task : Layr Eignmods Th goal of Task was th implmntation of a function fmmd_te_layr_mods() that calculats th TE ignmods of a singl grating layr in th Fourir domain. Th ignmods of th grating layr in a truncatd Fourir basis ar dtrmind by th algbraic ignvalu problm β φ = [k ε K ] φ = Mφ. () ε is a Toplitz matrix that contains th Fourir cofficints ε m of th spatial distribution ε mn = ε m n ε = ε ε ε ε ε N ε N ε N ε N+ ε () whrby N is th numbr of rtaind positiv Fourir ordrs in th xpansion of th lctric fild. Th diagonal matrix K = G N + k x G N + k x G N + k x (3) contains th transvrs momntum of th rspctiv Fourir componnts that is mad up of th contribution of th rciprocal lattic G m = π Λ m () and th th transvrs wav vctor componnt of th illumination k x. Th matrix M is complx valud. For a ral valud distribution ε(x) it is Hrmitian. In cas of absorption, i.. a complx valud distribution, M has no spcial symmtry. Th ignvalus and ignvctors of M can b calculatd with th Matlab function ig().
. Implmntation Th calculation of th ignmods of th grating layr first rquirs th calculation of th Toplitz matrix ε. This part was implmntd in a sparat function fmmd matrix(). Th function first chcks if th layr is homognous: fmmd matrix.m if isscalar ( prm ) ( max (abs ( prm (:) - prm ())) == ) 5 prm_top = diag ( prm ()* ons (,*N+)); 6 rturn 7 nd If this is th cas, a diagonal matrix is rturnd dirctly. Othrwis th discrt Fourir transform of th is calculatd with th fft() routin and th rquird positiv and ngativ Fourir componnts ar xtractd. fmmd matrix.m 8 prm_ft = fft ( prm )/ numl ( prm ); 9 prm_ pos = prm_ ft (:* N +); 3 prm_ng = prm_ft ([, nd : -: nd -*N + ]); Th rsults of fft() has to b dividd by th numbr of lmnts in th vctor to obtain th corrct scaling, whr prm_ft() == man(prm). Plas not that th ngativ Fourir componnts ar stord at th nd of th vctor prm_ft in rvrs ordr and that th zroth componnt from th bginning of th vctor has to b addd by insrting a at th bginning of th indx vctor in lin 3. Th xtractd Fourir componnts ar thn passd to th built-in toplitz() function that taks car of assmbling th Toplitz matrix: fmmd matrix.m 3 prm_ top = toplitz ( prm_pos, prm_ ng ); Th actual calculation of th ignmods and th propagation constants was implmntd in th function fmmd_te_layr_mods(): 7 m = -N: N; 8 k = (m** pi/ priod + kx ).^; 9 % homognous layr fmmd_te_layr_mods.m if isscalar ( prm ) ( max (abs ( prm (:) - prm ())) == ) phi = y (* N +); 3 bta = prm ()* k ^ - k; % inhomognous layr 5 ls 6 prm_ top = fmmd matrix ( prm, N); 7 [phi, bta ] = ig (k ^* prm_top - diag (k )); 8 bta = diag ( bta ); 9 nd 3 bta = sqrt ( bta ); 3 % mak sur that th propagation constants blong to forward mods 3 ind = ( ral ( bta ) + imag ( bta )) < ; 33 bta (ind) = -bta (ind );
Λ = 3 µm ε H = ε L = w =.5 µm Figur : Gomtry of th grating layr invstigatd in task. Only a singl priod is usd in th simulation. Th implmntation xplicitly handls th cas of a homognous layr in th lins to 3. This nsurs that th ordring of th ignmods and propagation constants of a homognous layr is consistnt with th numbring of th Fourir ordrs. Th inhomognous cas is handld in th lins 6 to 8. Th matrix ε is calculatd with th aformntiond function fmmd matrix(). Th rmaining assmbling of th matrix of th ignvalu problm is a litral translation of quations (), (3) and () into Matlab xprssion. Th matrix is passd to th built-in ig() function that calculats all ignvctors and ignvalus. In ordr to obtain th propagation constants, th squar root of th calculatd ignvalus is takn in lin 3. Thrby it has to b mad sur that th obtaind propagation constants actually blong to th forward mods. This th purpos of th last two lins of th function.. Rsults Th implmntation of th function fmmd_te_layr_mods() was tstd by calculating th ignmods of th grating layr shown in figur at a wavlngth of λ =.6 µm and with a transvrs wav vctor k x =. Th numbr of positiv of Fourir ordrs was N = 5. Th normalizd propagation constants β i /k of th grating mods ar shown in figur a and th magnitud of thir Fourir componnts is show in figur b. As th transvrs wav vctor k x was zro, positiv and ngativ componnts with th sam ordr ar xcitd qually strong. Nin mods xhibit a ral propagation constant and can propagat. Th rmaining mods hav purly imaginary propagation constants. Th spctrum of th propagating mods compriss primarily th lowr Fourir componnts whil th vanscnt mods ar dominatd by th largr Fourir componnts. Nonthlss, vn th propagating mods hav non-vanishing contributions from Fourir componnts of th ordr and abov. It is thrfor important to notic, that th numbr of Fourir componnts has to b chosn largr than th numbr of propagating diffraction ordrs in th substrat and cladding rgion in ordr to proprly dscrib th dynamics in th structurd grating rgion, vn whn th insid th grating dos not xcd th abov or blow. Th fild distributions of th propagating mods is shown in figur 3. Th ffctiv indx = β i /k of th mods is shown in th plots. Fiv mods hav activ indx that xcds th lowr rfractiv indx n L = of th grating. Ths mods ar guidd within th high indx rgion of th grating. Th rmaining mods hav activ indx < n L and hav significant fild also in th low indx rgion. Th lowr th ffctiv indx of th mods is, th strongr thy oscillat along th transvrs dirction. As th grating profil is symmtric and as k x =, th mods xhibit ithr an vn or an odd symmtry with rspct to th symmtry plan of th grating. Task : Diffraction Efficincis Th goal of task was th solution of th boundary valu problm in ordr to calculat th amplituds and diffractioicincis of th transmittd and rflctd diffraction ordrs. Th boundary valu problm is solvd with th T-matrix algorithm that builds th transfr matrix T(, M + ) (5) 3
Fourir ordr log(magnitud) (normalizd) 8 - -.5 6 - - /k -.5 - ral part imaginary part -.5 3 5 mod numbr (a) propagation constants 3 5 mod numbr (b) Fourir cofficints -3 Figur : Propagation constants and Fourir cofficints of th ignmods of th invstigatd grating layr. Th mods ar not shown in th ordr as rturnd by fmmd_te_layr_mods() but hav bn sortd by th ral and imaginary part of th propagation constants. =.975 =.899 =.767-3 =.569-3 =.88-3 =.935-3 =.98-3 =.56-3 =.36-3 - 3-3 Figur 3: Ral part of th ral-spac fild distributions of all propagating ignmods of th invstigatd grating layr. Th phas of th mods has ban adjustd to maximiz th ral part of th filds bfor plotting (lading to a vanishing imaginary part for k x = ). Th distribution within th grating layr is shown in orang.
of th whol grating with M layrs in a stpwis fashion. Th algorithm starts in th homognous rgion in front of th grating with layr indx k =, thicknss d =, ignvctors φ () = [ φ (),,, φ(),n+] (6) and ignvalus β = diag ([ β (),, β() N+]). (7) Th initial systm transfr matrix is th idntity matrix: T(, ) =. (8) Th algorithm thn itrats ovr all layrs. In ach layr k it calculats th ignvctor β (k) and builds th transfr matrix from th prvious layr to th currnt layr and ignvalus T(k, k) = [ β (k) β (k) ] [ φ (k ) φ (k ) β (k) φ (k ) φ (k ) β (k) ] [ p (k )+ (d k ) p (k ) (d k ) ] (9) whrby th ntris of th propagators p (k )± (d k ) ar givn by p (k )± mn (d k ) = δ mn xp ( ±iβ m (k ) d k ). () This layr transfr matrix is multiplid with th systm transfr matrix which yilds th xtndd systm transfr matrix: T(, k) = T(k, k) T(, k ). () Th algorithm nds in th homognous layr bhind th grating with layr indx k = M +. Onc th systm transfr matrix is known, th amplitud rflction and transmission cofficints ar givn by [ T ] = T(, M + ) [ a in R ] = [ t t t t ] [ a in R ] () whrby a in dscribs th incidnt fild with a in m = δ mn+. Rarranging quation () yilds th xplicit xprssions R = t t a in, T = ( t t t (3) t ) a in. () Th diffractioicincis η R T transmission cofficints via = [η R T, N,, η R T,N] T can b calculatd from th rflction and η R = η R = R R { β N+} () { β () (R R )}, (5) R { β () N+} R { β (M+) (T T )}. (6) 5
. Implmntation Th T-matrix algorithm was implmntd in th function fmmd_te() which contains a litral translation of th dscribd algorithm: fmmd_te.m 33 k = * pi/ lam; % vacuum wavnumbr 3 kx = k* sqrt ( prm_ in )* sin ( thta ); % transvrs wav vctor 35 Ntot = * N + ; % total numbr of diffraction ordrs 36 37 % initial T- matrix 38 t_ matrix = y (* Ntot ); 39 % mods on th incidnc sid d = ; [bta, phi ] = fmmd_te_layr_mods ( prm_in, priod, k, kx, N); 3 bta_ in = bta ; 5 % itration ovr grating layrs 6 for la = : numl ( layr_ ticknsss ) 7 d = layr_ ticknsss ( la ); 8 [bta, phi ] = fmmd_te_layr_mods ( layr_prm (la,:), priod,... 9 k, kx, N); 5 layr_ t_ matrix = fmmd_ layr_ t_ matrix ( bta, phi, d,... 5 bta, phi, d ); 5 % prpnd T- matrix of th currnt layr 53 t_matrix = layr_t_matrix * t_matrix ; 5 bta = bta ; 55 phi = phi ; 56 d = d; 57 nd 58 59 % mods on th th xit sid 6 d = ; 6 [bta, phi ] = fmmd_te_layr_mods ( prm_out, priod, k, kx, N); 6 bta_ out = bta ; 63 layr_ t_ matrix = fmmd_ layr_ t_ matrix ( bta, phi, d,... 6 bta, phi, d ); 65 t_matrix = layr_t_matrix * t_matrix ; 66 67 % amplituds of th incidnt mods 68 ind = N + ; % indx of th th diffraction ordr 69 ap = zros ( Ntot,); 7 ap(ind ) = ; 7 7 % transmission and rflction cofficints 73 i = : Ntot ; 7 i = Ntot +:* Ntot ; 75 S = -t_matrix (i, i )\ t_matrix (i, i ); 76 S = t_matrix (i, i) + t_matrix (i, i )* S; 77 T = S *ap; 78 R = S *ap; 79 8 % diffractioicincis 8 ta_r = ral (R.* conj (R).* bta_in (:) )/ ral ( bta_in ( ind )); 8 ta_t = ral (T.* conj (T).* bta_out (:))/ ral ( bta_in ( ind )); 6
d = d = d 3 =.5 µm x θ z ε in = ε H ε L ε H = ε L = ε H ε L ε out = w =.5Λ w =.5Λ w 3 =.75Λ Λ = 3 µm Figur : Gomtry of th multilayr grating invstigatd in task. Th dirction of th incidnt light is indicatd by th rd arrow. Only a singl priod is usd in th simulation. Th only notabl fatur of th implmntation is th optimization that not all ignvctors and propagations constants ar stord. Th T-matrix algorithm only nds th thicknss, th propagation constants and th ignvalus of th last prvious and of th currnt layr. Th valus of th prvious layr ar stord in th variabls d, phi and bta. Th valus of th currnt layr ar stord in d, phi and bta. At th nd of ach itration in th lins 5 to 56 th valus of th prvious layr ar updatd with th valus of th currnt layr. Additionally, th propagation constants of th homognous layr in front of th grating ar rquird for th calculation of th diffractioicincis. Ths ar stord in th variabl bta_in. Th propagation constants of th homognous layr bhind th grating ar rquird to b calculatd th diffractioicincis of th transmittd diffraction ordrs. Aftr th T-matrix algorithm thy ar containd in bta. Howvr, to mak th cod mor radabl, thy ar also stord in th variabl bta_out. To kp th function fmmd_te() compact and simpl, th calculation of th layr transfr matrix was shiftd to a sparat function fmmd_layr_t_matrix() which contains just a litral translation of quations (9) and (): fmmd_layr_t_matrix.m 7 p = diag ([ xp ( i* bta (:)* d ); xp (-i* bta (:)* d )]); 8 t_ matrix = [ phi, phi ;... 9 phi * diag ( bta ), -phi * diag ( bta )]... 3 \ [ phi, phi ;... 3 phi * diag ( bta ), -phi * diag ( bta )]; 3 t_ matrix = t_ matrix * p;. Rsults Th implmntation of th algorithm was tstd with a multilayr grating that is shown in figur. Th diffractioicincis wr calculatd at a wavlngth of λ =.6 µm for various angls of incidnc θ { 3,, +3 }. Th numbr of positiv of Fourir ordrs was N =. Th spatial distribution was discrtizd with N x = grid points. Th rsults ar ar show in figur 5. Th numrical valus ar also givn in tabls and. Th grating has a strongly asymmtric profil. Hnc vn at normal incidnc th distribution diffraction fficincis of th xcitd diffraction ordrs is quit asymmtric. Th distribution of th rflctd light is shown figur 5a. At normal incidnc th diffractioicincis of th positiv rflctd diffraction ordrs ar largr than th diffractioicincis of th rspctiv ngativ ordrs. Howvr, th rflctd powr is sprad ovr all propagating diffraction ordrs and thr is no singl dominating diffraction ordr. Whn 7
diffractioicincy diffractioicincy rflctd diffraction ordrs.7 transmittd diffraction ordrs..35.3 =-3 = =+3.6.5 =-3 = =+3.5...3.5..5.. -7-6 -5 - -3 - - 3 5 6 7 diffraction ordr (a) rflctd diffraction ordrs -7-6 -5 - -3 - - 3 5 6 7 diffraction ordr (b) transmittd diffraction ordrs Figur 5: Diffractioicincis of th rflctd and transmittd diffraction ordrs of th invstigatd grating gomtry for various angls of incidnc. Tabl : Diffractioicincis of th rflctd diffraction ordrs. θ 7 6 5 3 + + + +3 + +5 +6 +7 3.......87.8.88.36..5.........8.3.66.5.39..... +3....5.3.8.7.8.5...... Tabl : Diffractioicincis of th transmittd diffraction ordrs. θ 7 6 5 3 + + + +3 + +5 +6 +7 3....353.3.77.6358.9.359.95.6.65.9.3....8.678.98.9.535.36.3.7.76.76.95.. +3..63.8.33.8.336.5675.8.3.375.95.3... th angl of incidnc is changd, som diffraction ordrs bcom vanscnt and can no longr propagat whil othr diffraction ordr that wr vanscnt at normal incidnc can now propagat instad. For xampl, at θ = 3 th nd diffraction ordr disappars and th +3 rd and + th ordr appar instad. Accordingly at θ = +3 th + nd diffraction ordr disappars and th 3 rd and th ordr appar instad. Th distribution of th transmittd light is shown in figur 5b. It is quit diffrnt form th distribution of th rflctd light. Th st diffraction ordr dominats ovr all othr diffraction ordrs. This blaz ffct rsults from th approximatly triangular shap of th grating that is cratd by th staircas lik arrangmnt of th 3 grating layrs. In a grating with prfctly triangular shap, th blaz ffct is strongst whn a diffraction ordr propagats at th sam angl as th light that is rfractd at th slopd grating groovs. Howvr, to approximat such a prfct triangular grating, significantly mor than 3 layrs ar ncssary. In th analyzd 3 layr grating, th blaz ffct is not prfct as can b sn from th rlativly larg fraction of powr that is transmittd into th othr diffraction ordrs. Intrstingly, th blaz ffct in transmission sms to b quit robust against variations of th angl of incidnc..3 Stability Issus Th transfr matrix algorithm is numrically instabl. Whn th numbr of positiv Fourir ordrs is incrasd to N =, Matlab issus a warning that a singular matrix is ncountrd in th calculation of th rflction and transmission cofficints: 8
> In fmmd_te (lin 75) In tst_fmmd_te (lin ) Warning: Matrix is clos to singular or badly scald. Rsults may b inaccurat. RCOND =.36367-. Chcking th sum of th transmittd and rflctd powr fraction - sum(ta_r + ta_t) = -.853+ rvals that nrgy is no longr consrvd. Th calculatd diffractioicincis hav unphysical valus. Th sam happns whn th thicknsss of th grating layrs ar doubld from d i =.5 µm to d i =.5 µm: > In fmmd_te (lin 75) In tst_fmmd_te (lin 8) Warning: Matrix is clos to singular or badly scald. Rsults may b inaccurat. RCOND = 6.68593-. Again th diffractioicincis hav unphysical valus: - sum(ta_r + ta_t) = -8.6665+. Th root of this problm is th backwards propagator p (d) that appars in th transfr matrix algorithm whn th mod amplituds hav to b translatd from th top of a layr to th bottom: [ a + bot a bot ] = [ p + (d) p (d) ] [ a + top a top ] (7) with p ± (d k ) according to quation (). For vanscnt mods with I {β m} > th ntris of p (d) grow xponntially with th layr thicknss d. For a larg numbr of Fourir ordrs (lading to strongly vanscnt mods with vry larg imaginary parts of th propagation constants) or for sufficintly larg layr thicknsss, th ntris of th matrix ovrflow and subsqunt calculations yild wrong rsults. A stratgy to ovrcom this instability is to avoid th xponntially growing factors by xchanging th positions of th input ports in th algorithm: [ a + bot a top ] = [ p + (d) p + (d) ] [ a + top a bot ]. (8) Equation (8) no longr conncts th amplituds on on sid of th layr with th amplituds on th othr sid of th layr in trms of a transfr matrix, but it conncts th incidnt amplituds with th scattrd amplituds in trms of a scattring matrix. This ida can b xtndd across th boundary of adjacnt layrs and is th foundation of th numrically stabl S-matrix algorithm. Howvr, th numrical stability of this algorithm coms at th pric of an incrasd complxity. Scattring matrics of multipl layrs can t b concatnatd by a simpl matrix multiplication, but rquir a mor sophisticatd schm instad. Dtails can b found in []. Th stabl S-matrix algorithm was implmntd in th function fmmd_te_stabl. W lav it to th intrstd radr to xplor th sourc cod of this function. Rfrncs [] Lifng Li, Formulation and comparison of two rcursiv matrix algorithms for modling layrd diffraction gratings, JOSA A 3, p. (996), https://doi.org/.36/josaa.3.. 9