optical moulation

Upload: zahid-ali-arain

Post on 24-Feb-2018

217 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/25/2019 Optical Moulation

    1/22

    1

    Optical Simulation of Grating Diffraction in MATLAB

    by Ken Johnson

    TheGrating Diffraction Calculator (GD-Calc)is a MATLAB-based,electromagnetic simulation program that computes diffraction efficiencies of opticalgrating structures, including biperiodic gratings. The programs capabilities include ageneral and flexible grating modeling facility, structure parameterization (with anynumber of parameters), and unrestricted control over diffraction order selection.Additionally, its implementation within the generic programming and applicationdevelopment framework of MATLAB provides a degree of flexibility and softwareinteroperability that is not available with stand-alone diffraction analysis programs.

    Part 1 of this article provides a conceptual overview of GD-Calc, describing ingeneral terms how grating structure is specified and how electromagnetic computationsare carried out. The presentation is primarily concept-oriented, but a few simple codeexamples are provided to give the reader a sense of how the GD-Calc software interfaceworks. Part 2 provides a more in-depth introduction to the software interface, using as anexample a tungsten photonic crystal structure1to illustrate how grating structure isspecified. (The code listings from Part 2 are summarized in gdc_intro.m.)

    The primary focus of this article is grating structure specification. Applicationexamples for electromagnetic computations are provided in an accompanying document,GD-Calc_Demo.pdf. (All of the code examples in this article and in GD-Calc_Demo.pdfcan be run with the free demo/tutorial code from the GD-Calc website. The photoniccrystal example is based on the demo script gdc_demo11.m.) The electromagnetic theoryand algorithms underlying GD-Calc are detailed in GD-Calc.pdf.

    Part 1: Conceptual Overview

    MATLAB development environment

    An advantage of working in the MATLAB environment is that functional linksinto and out of GD-Calc can be created without having to rely on cumbersome data

    conversion and import/export procedures. For example, in a semiconductor lithographyapplication, a photoresist gratings thickness and refractive index might both be affectedby exposure-related resist densification, so it would be natural to specify thickness andrefractive index both as user-defined functions of exposure. This is especially useful with

    GD-Calc_Intro.pdf, version 09/22/2006

    1The photonic crystal structure is described in S. Y. Lin, J. G. Fleming, and I. El-Kady, Highly efficientlight emission at by a three-dimensional tungsten photonic crystal, Optics Letters 28(18), 1683-1685(2003).

    Copyright 2006, Kenneth C. Johnsonsoftware.kjinnovation.com

    mailto:[email protected]://software.kjinnovation.com/http://software.kjinnovation.com/http://software.kjinnovation.com/http://software.kjinnovation.com/http://software.kjinnovation.com/gdc_intro.mhttp://software.kjinnovation.com/GD-Calc_Demo.pdfhttp://software.kjinnovation.com/http://software.kjinnovation.com/gdc_demo11.mhttp://software.kjinnovation.com/GD-Calc.pdfhttp://software.kjinnovation.com/GD-Calc.pdfhttp://software.kjinnovation.com/gdc_demo11.mhttp://software.kjinnovation.com/http://software.kjinnovation.com/GD-Calc_Demo.pdfhttp://software.kjinnovation.com/gdc_intro.mhttp://software.kjinnovation.com/mailto:[email protected]
  • 7/25/2019 Optical Moulation

    2/22

    2

    structure parameterization, e.g., exposure could be defined as a vectorized quantity, inwhich case all exposure-dependent quantities, including the resist thickness, refractiveindex, and calculated diffraction efficiencies, will be similarly vectorized.

    Typically, a gratings optical characteristics are not themselves of primary

    interest; what is of interest is the optical response of a complete system that includes thegrating as one component. MATLABs generic programming capability makes it easy tofunctionally link GD-Calc into user-defined optical system models, which can themselvesbe incorporated into generic optimization routines to optimize design performance.GD-Calc is simply a MATLAB function (gdc.m), which can be incorporated into otherMATLAB functions or scripts, and which takes arguments that can be instantiated touser-defined functions.

    Although stand-alone programs lack the generality and flexibility of theMATLAB development environment, they can have the advantage of simplicity andease-of-use. However, GD-Calc can be used in conjunction with MATLAB to create

    customized user interfaces that are optimally adapted for specific applications. Many ofthe functions and scripts associated with GD-Calc such as its plotting facility(gdc_plot.m), its output data conversion function (gdc_eff.m), and a number of demoscripts are distributed as public-domain software so that users can freely modify andadapt the code to best suit their own or their customers needs.

    Structure specification

    The primary limitation of GD-Calcs grating modeling capability is that gratingsmust be block-structured (or must be defined approximately in terms of a block-

    structured representation), meaning that the grating comprises optically homogeneousregions whose bounding surfaces are planes parallel to a set of primary coordinate planes.For example, a grating comprising a periodic array of pyramids would be representedusing a staircase approximation, as illustrated in Figure 1.

    The grating is subdivided into a number of strata, wherein each stratum isbounded by upper and lower planes parallel to the grating substrate. The grating has aheight-independent lateral cross-section within each stratum. Figure 2 illustrates aparticular stratum extracted from the pyramidal grating of Figure 1. Each stratum ispartitioned into parallel stripes, which are further partitioned into rectangular blocksrepresenting optically homogeneous regions.

    GD-Calc_Intro.pdf, version 09/22/2006Copyright 2006, Kenneth C. Johnson

    software.kjinnovation.com

    http://software.kjinnovation.com/gdc.mhttp://software.kjinnovation.com/gdc_plot.mhttp://software.kjinnovation.com/gdc_eff.mhttp://software.kjinnovation.com/gdc_eff.mhttp://software.kjinnovation.com/gdc_plot.mhttp://software.kjinnovation.com/gdc.m
  • 7/25/2019 Optical Moulation

    3/22

    3

    GD-Calc_Intro.pdf, version 09/22/2006

    stratum

    Figure 1 Pyramidal grating

    block

    stripe

    Figure 2 Grating stratum

    In terms of software representation, a structure such as that of Figure 1 would berepresented as a nested hierarchy of cell arrays within structs. The top-level datastructure, designated here as gr at i ng, is a struct containing a cell-array stratumfield

    whose elements, gr at i ng. st r at um{1}, gr at i ng. st r at um{2}, represent the gratingstrata (numbered from the bottom up). The i-th stratums stripes are represented asgr at i ng. st r at um{i }. st r i pe{1}, gr at i ng. st r at um{i }. st r i pe{2}, , and the j-thsuch stripes blocks are represented as gr at i ng. st r at um{i }. st r i pe{j }. bl ock{1},gr at i ng. st r at um{i }. st r i pe{j }. bl ock{2}, . Other fields within these structsdefine the bounding plane locations and the optical material within each block. Theoptical materials are described in terms of their complex permittivities, which are

    Copyright 2006, Kenneth C. Johnsonsoftware.kjinnovation.com

  • 7/25/2019 Optical Moulation

    4/22

    4

    enumerated in a top-level cell array gr at i ng. pmt , each element of which represents aparticular material. A particular grating regions optical material is specified as an integerindex into this list (e.g. gr at i ng. st r at um{i }. st r i pe{j }. bl ock{k}. pmt _i ndex); thusmultiple regions can be constrained to represent the same material by giving them thesame material index.

    There are five different types of stratum objects that can be used to define thegrating. These are enumerated below:

    Stratum type Descriptionhomogeneous homogeneous grating layer with no stripe boundariesuniperiodic stratum with homogeneous stripes, no block boundariesbiperiodic general biperiodic stratum (as illustrated in Figure 2)coordinate break applies a translational shift to all strata above break planereplication module for defining 3-dimensionally periodic grating regions

    Each stratum object has a t ype index indicating its type. For example, ahomogeneous stratum is defined by three struct fields: the type index (zero), the stratumthickness, and the permittivity index, e.g.,

    st r at um. t ype = 0; % homogeneousst r at um. t hi ck = 0. 5;st r at um. pmt _i ndex=1; % i ndex i nt o gr at i ng. pmtgr at i ng. st r atum{1} = st r atum;

    The homogeneous and uniperiodic stratum types are basically specializations of the moregeneral biperiodic type. A coordinate break is a stratum in the abstract sense that it isassociated with a lateral plane at a particular height in the grating, and it provides asimple mechanism for applying a lateral translational shift to all strata above the breakplane without having to modify the individual stratum definitions. A replication

    module is a composite type of stratum object used to represent a structure pattern thatrepeats itself periodically in a direction transverse to the grating substrate. (The basicstructure pattern is represented as a stack of strata, which can be of any type includingother replication modules.)

    Figures 3 and 4 illustrate conceptually how the above structuring elements couldbe combined to define a photonic crystal structure. First, the three-stratum configurationillustrated in Figure 3 is defined. The first two strata are uniperiodic with orthogonalstripe orientations, and the third stratum is a coordinate break, which applies a half-periodtranslational shift in each of the two periodicity directions. (The translational shift isrepresented by the arrow in Figure 3.) Next, the three strata are combined into a

    replication module object, which has an associated replication count indicating how manytimes the pattern is to be repeated. Figure 4 illustrates the resulting structure with areplication count of four. The structure comprises four stacked copies of the basic bilayerpattern, with each copy laterally shifted by a half period in both periodicity directionsrelative to the underlying bilayer.

    GD-Calc_Intro.pdf, version 09/22/2006Copyright 2006, Kenneth C. Johnson

    software.kjinnovation.com

  • 7/25/2019 Optical Moulation

    5/22

    5

    GD-Calc_Intro.pdf, version 09/22/2006

    translational shift

    stratum 3stratum 2stratum 1

    Figure 3 Bilayer pattern (with coordinate break) for photonic crystal

    Figure 4 Photonic crystal

    Rather than using a replication module in the above example, the grating could bedefined by simply stacking four copies of the Figure 3 structure. However, the advantageof using a replication module is not just one of convenience. Whereas the GD-Calccomputation time generally scales in proportion to the number of grating strata, the

    Copyright 2006, Kenneth C. Johnsonsoftware.kjinnovation.com

  • 7/25/2019 Optical Moulation

    6/22

    6

    computation time for a replication module scales in proportion to the logarithm of thereplication count.

    Parameterization

    The GD-Calc interface specification (defined in the gdc.mcomment header)identifies a number of grating attributes as parameters. A parameter, in this context,is a numeric quantity that can be vectorized as a multidimensional array. A parameter canbe one of a number of basis parameters, each of which is associated with a particulararray dimension (and which has only one non-singleton dimension), or it can be afunction of other parameters. (A parameters non-singleton dimensions indicate itsfunctional dependencies.) The only fundamental restriction on parameters is that theymust all be size-matched, except that singleton dimensions are implicitly repmat-extended, if necessary, to match parameter sizes.

    A simple application example showing the use of parameterization is illustrated inFigure 5.2The figure shows a cross-section of an alignment-sensor grating comprising asubstrate, a uniperiodic, surface-relief reflective grating (stratum 1), a homogeneous airspace (stratum 2), a coordinate break (stratum 3), and a uniperiodic phase grating(stratum 4) on a transparent superstrate. A small, lateral translational shift between thetwo gratings will result in a measurable shift in the energy balance between the first- andminus-first-order diffraction efficiencies; thus the gratings can function as a sensitivepositional transducer.

    stratum 1stratum 2stratum 4stratum 3

    substrate

    superstrate

    Figure 5 Alignment-sensor grating

    In this example, two grating parameters are vectorized: the air space thickness,represented as gr at i ng. st r at um{2}. t hi ck, and the phase plates translational shift,represented as gr at i ng. st r at um{3}. dx2. These could be defined, for example, as

    gr at i ng. st r at um{2}. t hi ck = wavel engt h*[ 3; 2; 1] ;gr at i ng. st r atum{3}. dx2 = d*( 0: 63) / 64;

    (The wavel engt hand dvariables are scalars representing the illumination wavelengthand grating period, respectively.) The air space is size-[3,1], and is vectorized indimension 1, while the translational shift is size-[1,64], and is vectorized in dimension 2.Any quantities that are functionally dependent on both the air space and the translational

    GD-Calc_Intro.pdf, version 09/22/2006

    2This example is based on the GD-Calc demo script, gdc_demo9.m.

    Copyright 2006, Kenneth C. Johnsonsoftware.kjinnovation.com

    http://software.kjinnovation.com/gdc.mhttp://software.kjinnovation.com/gdc_demo9.mhttp://software.kjinnovation.com/gdc_demo9.mhttp://software.kjinnovation.com/gdc.m
  • 7/25/2019 Optical Moulation

    7/22

    7

    shift, including computed diffraction efficiency quantities, will be size-[3,64]. Based onthe repmat-extension convention described above, these arrays are all size-compatible.

    Parameterization can, in some instances, dramatically improve GD-Calcscomputational performance. As explained in the next section, the GD-Calc algorithms are

    based primarily on two operations: first, calculating an S matrix for each stratum, andthen combining the S matrices from bottom to top by means of a stacking operation todetermine a composite S matrix for the entire grating. In the above example, there are192 parameter combinations (3 air space thicknesses and 64 translational displacements),so if the parameters were iterated outside of GD-Calc all of the S-matrix computationswould have to be repeated 192 times. But with parameterization, the S matrices for thegrating layers (strata 1 and 4) will only have to be calculated once, the air spaces Smatrix is calculated only three times, and the coordinate breaks S matrix is calculatedonly 64 times. Furthermore, the stacking operation for stratum 2 will be calculated just 3times, and only the stratum 3 and 4 stacking will have to be done for all 192 parametercombinations.

    Electromagnetic theory

    GD-Calcs algorithmic foundation is based on a generalized variant of rigorouscoupled-wave (RCW) theory, which first came into use about three decades ago but hassince undergone a couple of major improvements. In essence, the method represents boththe electromagnetic field and the optical permittivity at any particular height in thegrating in terms of their Fourier series in two lateral grating coordinates, and a set ofdifferential equations are developed that describe the propagation of the fields Fouriercoefficients through the grating.

    In the original formulation of RCW theory, the propagation equations werenumerically solved to determine a transmission matrix that defined the field amplitudes(Fourier coefficients) at the top of each stratum as a linear function of the amplitudes atthe bottom, and these matrices were then multiplied to determine a compositetransmission matrix for the entire grating. But numerical contamination fromexponentially growing errors caused this method to be numerically unstable, especiallywith very deep or highly conducting gratings. The problem has been resolved by using analternative S-matrix (scattering matrix) approach, which represents each stratum interms of a linear mapping relating the outgoing field amplitudes to the incoming fieldamplitudes at both boundaries. The individual mappings (S matrices) for the strata are

    combined by means of a numerically stable stacking algorithm to determine thegratings composite S matrix.

    The S-matrix method resolved the numerical stability problem, but convergencewith respect to the number of Fourier coefficients retained in the calculations wastypically very slow. The main problem had to do with terms in the differential equationsrepresenting the product of the electromagnetic field and the permittivity. Each productsFourier series was determined from its factors truncated Fourier series, but severe

    GD-Calc_Intro.pdf, version 09/22/2006Copyright 2006, Kenneth C. Johnson

    software.kjinnovation.com

  • 7/25/2019 Optical Moulation

    8/22

    8

    numerical convergence problems arose when the factors had concurrent discontinuitiesassociated with optical boundaries. This problem has been resolved by using a FastFourier Factorization method that, in essence, rearranges the equations to avoid productfactors with concurrent discontinuities (i.e., in each equation where a concurrentdiscontinuity occurs, the permittivity factor is brought to the other side of the equation

    before applying the Fourier decomposition).

    GD-Calc uses both the S-matrix method and Fast Fourier Factorization tooptimize computational performance. (The numerical algorithms are detailed inGD-Calc.pdf.) One problem that remains with RCW methods, however, is the staircaseapproximation that must be used to describe sloped or curved surfaces in terms of theblock-structured representation. Simply partitioning the grating into very small blocksdoes not ensure good accuracy, because the electromagnetic field can exhibit large spikesnear the block corners, and the number of retained diffracted orders must be increased inproportion to the block partitioning density in order to adequately resolve the spikes.Thus, users of GD-Calc should be aware of convergence difficulties that can arise,

    particularly with highly-conducting gratings that are not inherently block-structured. (TheGD-Calc demo scripts and GD-Calc_Demo.pdfprovide examples of the programsconvergence behavior for a variety of test cases, including comparisons with publisheddata.)

    Diffraction order selection

    GD-Calc gives the user complete freedom in selecting which diffracted orders(i.e., Fourier coefficients) to retain in calculations. Generally, computational data storagerequirements scale in approximate proportion to the square, and runtime scales in

    proportion to the cube, of the number of retained orders, so optimizing the order selectioncan very significantly impact computational performance.

    The checkerboard grating illustrated in Figure 6 (in plan view) is one examplewhere order selection is particularly useful. The grating is described in relation to two

    fundamental period vectors; for example vectors Ar

    and Br

    would be a natural choice.

    However, the grating has a periodic symmetry stronger than that described by vectors Ar

    and Br

    because, for example, the fundamental period vectors Ar

    and Cr

    define a unit cell

    whose area is half that of Ar

    and Br

    . Thus, if the gratings optical permittivity is Fourier

    analyzed with respect to orthogonal coordinates represented by vectors Ar

    and Br

    , half of

    its Fourier orders will be identically zero, and similarly half of the electromagnetic fieldsdiffracted orders will be zero.

    Each grating Fourier coefficient, and correspondingly each electromagneticdiffraction order, has two associated Fourier order indices and ; and the user must

    specify what set of index pairs to retain in the electromagnetic field expansion.

    In the Figure 6 example, using basis periods

    1m 2m

    ),( 21 mm

    Ar

    and Br

    , all orders with odd21 mm

    GD-Calc_Intro.pdf, version 09/22/2006Copyright 2006, Kenneth C. Johnson

    software.kjinnovation.com

    http://software.kjinnovation.com/GD-Calc.pdfhttp://software.kjinnovation.com/GD-Calc_Demo.pdfhttp://software.kjinnovation.com/GD-Calc_Demo.pdfhttp://software.kjinnovation.com/GD-Calc.pdf
  • 7/25/2019 Optical Moulation

    9/22

    9

    would be identically zero, so only index pairs with),( 21 mm 21 mm even need be

    retained. The elimination of extraneous orders would reduce data storage requirements byabout a factor of 4, and computation time would improve by about a factor of 8.

    Cr

    Ar

    Br

    Figure 6 Checkerboard grating

    The photonic crystal illustrated in Figure 4 is another example for which orderselection can be used effectively. Rather than using the standard rectangular ordertruncation defined by the conditions maxmm _|| 1 and maxmm _|| 2 for some

    truncation limit , an alternative diagonal truncation method, defined by the

    conditions , may be employed. The diffraction calculations

    convergence performance with respect to would be similar with both methods,

    but diagonal truncation would be much more computationally efficient.

    maxm_

    maxmmm _|||| 21 +

    maxm_

    Part 2: GD-Calc Software Interface

    GD-Calc usage overview

    The first step in using GD-Calc is to construct a gr at i ng data structuredefining the grating geometry and optical materials. (Most of this tutorial will focus on

    this step.) You can then run a data validation check as follows,

    gdc( gr at i ng) ; (1)

    Also, you can plot a 3-D view of the grating,

    gdc_pl ot ( gr at i ng, par am_i ndex, pmt _di spl ay, x_l i mi t ) ; (2)

    GD-Calc_Intro.pdf, version 09/22/2006Copyright 2006, Kenneth C. Johnson

    software.kjinnovation.com

  • 7/25/2019 Optical Moulation

    10/22

    10

    param_i ndexis a multi-dimensional parameter index, which relates to GD-Calcsparameterization capabilities. (In the following examples param_i ndexis just set to 1.)pmt _di spl ayspecifies display colors and legend strings for the gratings opticalmaterials, and x_l i mi t specifies 3-D plotting limits. gdc_pl ot internally invokes

    gdc( gr at i ng) to check data validity.

    Next, you construct two additional data structures: i nc_ f i el d, which specifiesthe incident electromagnetic fields wavelength and direction; and order , whichspecifies which diffraction orders to retain in the calculations. The GD-Calc computationengine is then invoked as follows,

    [ par am_si ze, scat _f i el d, i nc_fi el d] =. . .

    gdc(gr at i ng, i nc_fi el d, or der ) ; (3)

    The param_size output is related to parameterization, and the scat_ f i el d and

    i nc_ f i el d outputs (i.e., scattered field and incident field) are passed to anaccessory function, gdc_ef f, which converts the results to diffraction efficiencies forreflected and transmitted diffraction orders (RandT, respectively),

    [ R, T] =gdc_ef f ( scat _f i el d, i nc_f i el d) ; (4)

    (RandTare struct arrays defining diffraction efficiencies for multiple diffraction orders.)

    The diffraction efficiency calculations require the calculation engine(gdc_engi ne. p), which is not part of the free demo/tutorial package; but for the photoniccrystal example (gdc_demo11.m) the demo function gdc_demo_engi ne. pcan be invoked

    in lieu of listing (3),

    g, par am_si ze, scat _f i el d, i nc_f i el d] =. .[ gr at i n . gdc_demo_engi ne( 11, i nc_f i el d, or der , . . .

    gr at i ng_pmt , d, t hi ck, wi dt h, r ep_count ) ; (5)

    gdc_demo_engine constructs the gr at i ngstructure based on the user-specified inputarguments (grat i ng_pmt , d, thi ck, wi dt h, and r ep_count ), which are described below.

    The grating struct

    The gr at i ngstruct comprises the following elements: (1) gr at i ng. pmt , a cellarray of complex permittivities associated with the grating materials; (2)gr at i ng. pmt _sub_i ndexand pmt _sup_i ndex, the grating substrate and superstratepermittivities (specified as indices into gr at i ng. pmt ); (3) gr at i ng. d21, d31, d22, andd32, which specify the gratings fundamental period vectors; and (4) gr at i ng. str at um,a cell array of grating strata that define the gratings internal structure. Following is anexample of a trivially simple grating structure, a bare tungsten substrate with a complex

    GD-Calc_Intro.pdf, version 09/22/2006Copyright 2006, Kenneth C. Johnson

    software.kjinnovation.com

    http://software.kjinnovation.com/gdc_demo11.mhttp://software.kjinnovation.com/gdc_demo11.m
  • 7/25/2019 Optical Moulation

    11/22

    11

    refractive index of 1. 52+6. 46*i . (This is the approximate refractive index of tungsten ata wavelength of m825.1 . The permittivity is the square of the refractive index.)

    GD-Calc_Intro.pdf, version 09/22/2006

    (6)

    d=1. 5; % gr at i ng per i odgr at i ng_pmt =( 1. 52+6. 46*i ) 2; % gr at i ng per mi t t i vi t ycl ear gr at i nggr at i ng. pmt ={1. 0, gr at i ng_pmt };gr at i ng. pmt _sub_i ndex=2;gr at i ng. pmt _sup_i ndex=1;gr at i ng. d21=d;gr at i ng. d31=0;gr at i ng. d22=0;gr at i ng. d32=d;gr at i ng. st r atum={};

    The grating period vectors are irrelevant for a bare substrate but they mustnevertheless be specified, and they will become relevant as we add periodic strata to thestructure. The grating geometry is specified in relation to orthonormal coordinate basis

    vectors , , and , wherein is normal to the grating substrate, and and areparallel to the substrate. Relative to these coordinate bases, the gratings two period

    vectors

    1e 2e 3e 1e 2e 3e

    ][1g

    dr

    and ][2g

    dr

    have the following coordinate representations,

    (7)]g[ 1,33]g[1,22

    ]g[1

    deded +=r

    (8)]g[ 2,33]g[2,22

    ]g[2 deded +=r

    The grating geometry is invariant under translation by ][1g

    dr

    or ][2g

    dr

    , and the gr at i ngdata

    fields, gr at i ng. d21, etc., correspond to , etc.]g[

    1,2d

    The following sections illustrate the variety of stratum types that can beincorporated in the grating. There are five stratum types, which are indicated by a typeidentifier in the range of 0 to 4. These are summarized below:

    type index stratum type0 homogeneous1 uniperiodic2 biperiodic3 coordinate break4 replication module

    Copyright 2006, Kenneth C. Johnsonsoftware.kjinnovation.com

  • 7/25/2019 Optical Moulation

    12/22

    12

    Stratum type 0: homogeneous

    The following code listing illustrates how the preceding grating specification(listing (6)) could be modified to represent a free-standing, homogeneous tungsten film ofthickness m5.0 ,

    GD-Calc_Intro.pdf, version 09/22/2006

    (9)

    . . .t hi ck=0. 5; % st r at um t hi ckness. . .gr at i ng. pmt _sub_i ndex=1;. . .c l ear str at umst r at um. t ype=0; % homogeneousst r at um. t hi ck=t hi ck;st r atum. pmt _i ndex=2;gr at i ng. st r atum{1}=st r atum;

    Note that gr at i ng. pmt _sub_i ndexhas been changed to 1, so the substrate now haspermittivity 1.0 (gr at i ng. pmt {1}= 1.0), representing vacuum. The stratumstruct has

    three data fields: the type index (0for homogeneous), a thickness, and a permittivityindex (pmt _i ndex), which indexes into gr at i ng. pmt .

    Stratum type 1: uniperiodic

    The following code excerpt replaces the homogeneous stratum of listing (9) witha uniperiodic stratum comprising free-standing, parallel, rectangular-section tungstenrods with a rod width of m5.0 ,

    (10)

    . . .

    wi dt h=0. 5; % r od wi dt h. . .c l ear str at umst r at um. t ype=1; % uni per i odi cst r at um. t hi ck=t hi ck;st r atum. h11=1;st r atum. h12=0;cl ear st r i pest r i pe. c1=- 0. 5*wi dt h/ d;st r i pe. pmt _i ndex=1;st r at um. st r i pe{1}=st r i pe;st r i pe. c1=0. 5*wi dt h/ d;st r i pe. pmt _i ndex=2;st r at um. st r i pe{2}=st r i pe;

    gr at i ng. st r atum{1}=st r atum;

    Before discussing the above code, lets first plot the structure:

    Copyright 2006, Kenneth C. Johnsonsoftware.kjinnovation.com

  • 7/25/2019 Optical Moulation

    13/22

    13

    GD-Calc_Intro.pdf, version 09/22/2006

    (11)

    cl ear pmt _di spl aypmt _di spl ay( 1) . name=' ' ;pmt _di spl ay( 1) . col or =[ ] ;pmt _di spl ay( 1) . al pha=1;pmt _di spl ay( 2) . name=' Tungst en' ;

    pmt _di spl ay( 2) . col or =[ 1, 1, 1] *0. 75;pmt _di spl ay( 2) . al pha=1;x_l i mi t =[ - t hi ck, - 1. 75*d, - 1. 75*d; . . .

    2*t hi ck, 1. 75*d, 1. 75*d] ;gdc_pl ot ( gr at i ng, 1, pmt _di spl ay, x_l i mi t ) ;

    pmt _di spl ay(1) and pmt _di spl ay(2) define the display attributes for the two materialsrepresented by gr at i ng. pmt {1}and gr at i ng. pmt {2}, respectively, in listing (6). (Theassignment pmt _di spl ay(1) . col or =[ ] suppresses display of the first material, which isvacuum.) x_l i mi t specifies 3-D plot limits, with columns 1, 2, and 3 corresponding tocoordinates , , and , respectively. (The axis is vertical, i.e. normal to the

    grating substrate; and the and axes are parallel to the substrate.) Figure 7 shows the

    gdc_pl ot result (with annotation added), which illustrates three tungsten rods. (The rodsare shown as hollow, tubular elements, cut off at the display limits, although the gratingis actually modeled as an infinite array of infinitely long, solid rods.)

    1x 2x 3x 1x

    2x 3x

    stripe 1stripe 2

    ][1g

    dr][

    2g

    dr

    1e

    3e 2e

    Figure 7. Uniperiodoc stratum, from listings (10) and (11).

    As illustrated in listing (10), a uniperiodic stratum is defined by the following datafields: the type index (1), the stratum thickness, two harmonic indices h11and h12, anda st r i pe data field. The physical structure represented by the stratum comprises aperiodic array of parallel, vertical-wall stripes whose periodicity and orientation are

    Copyright 2006, Kenneth C. Johnsonsoftware.kjinnovation.com

  • 7/25/2019 Optical Moulation

    14/22

    14

    determined by the harmonic indices. With the assigned values h11=1and h12=0the

    stripes are parallel to and have a periodicity defined by][2g

    dr

    ][1g

    dr

    ; see Figure 7. (An

    explanation of how the harmonic indices are used in general is provided below.)

    The stratum comprises two stripes per period (the grating line/space pairs), which

    are defined by the structs st r at um. st r i pe{1}and st r at um. st r i pe{2}. Each stripestruct has two data fields: c1, which defines one of the stripes wall positions, andpmt _i ndex(an index into gr at i ng. pmt ), which defines the stripe material. In thisexample, the boundary between the first and second stripes is at

    , and the boundary between the second stripe and the

    next adjacent stripe is at . (An explanation of how the

    stripe geometry is specified more generally is provided below.) The st r at um. st r i pecell array can be extended to define any number of stripes per period.

    d*r i pe{1}. c1st r at um. st=2x

    d*r i pe{2}. c1st r at um. st=2x

    Stratum type 2: biperiodic

    Next, we consider a stratum comprising a free-standing tungsten film with abiperiodic array of square holes. Code listing (10) is modified as follows for thisexample,

    GD-Calc_Intro.pdf, version 09/22/2006

    (12)

    . . .c l ear str at umst r at um. t ype=2; % bi per i odi cst r at um. t hi ck=t hi ck;st r atum. h11=1;st r atum. h12=0;st r atum. h21=0;

    st r atum. h22=1;cl ear st r i pest r i pe. t ype=1; % i nhomogeneousst r i pe. c1=- 0. 5*wi dt h/ d;cl ear bl ockbl ock. c2=- 0. 5*wi dt h/ d;bl ock. pmt _i ndex=1;st r i pe. bl ock{1}=bl ock;bl ock. c2=0. 5*wi dt h/ d;bl ock. pmt _i ndex=2;st r i pe. bl ock{2}=bl ock;st r at um. st r i pe{1}=st r i pe;cl ear st r i pest r i pe. t ype=0; % homogeneous

    st r i pe. c1=0. 5*wi dt h/ d;st r i pe. pmt _i ndex=2;st r at um. st r i pe{2}=st r i pe;gr at i ng. st r atum{1}=st r atum;

    A plot of the grating structure (cf. listing (11)) is shown in Figure 8. The basic differencebetween a uniperiodic stratum (listing (10)) and a biperiodic stratum (listing (12)) is thatthe latter has two additional harmonic indices (h21and h22), and its stripes can be either

    Copyright 2006, Kenneth C. Johnsonsoftware.kjinnovation.com

  • 7/25/2019 Optical Moulation

    15/22

    15

    of two types: homogeneous or inhomogeneous (indicated by a str i pe. t ypefield equalto 0or 1, respectively). A homogeneous stripe such as st r at um. st r i pe{2}has the sameformat in either a uniperiodic or biperiodic stratum, except that in the latter context thestripe has a type identifier (st r i pe. t ype=0).

    stripe 1stripe 2

    block 1block 2

    Figure 8. Biperiodoc stratum, from listing (12).

    An inhomogeneous stripe (e.g. st r at um. st r i pe{1}in listing (12)) comprises thetype identifier (st r i pe. t ype=1), the c1data field defining the positions of boundarywalls between stripes, and a bl ock data field representing structural blocks within thestripe. As illustrated in Figure 8, the first stripe comprises two blocks per period (thesquare hole and the partition between holes), which are defined by st r i pe. bl ock{1}and st r i pe. bl ock{2}. Each block is defined by two data fields: c2, which defines theposition of one of the walls between adjoining blocks, and pmt _i ndex(an index intogr at i ng. pmt ), which defines the block material. In this example, the boundary betweenthe first and second blocks is at d*ck{1}. c2st r i pe. bl o=3x , and the boundary

    between the second block and the next adjoining block is at. (An explanation of how the block geometry is specified

    more generally is provided below.) The str i pe. bl ockcell array can be extended todefine any number of blocks per period.

    d*ck{2}. c2st r i pe. bl o=3x

    GD-Calc_Intro.pdf, version 09/22/2006Copyright 2006, Kenneth C. Johnson

    software.kjinnovation.com

  • 7/25/2019 Optical Moulation

    16/22

  • 7/25/2019 Optical Moulation

    17/22

    17

    ][22,1

    ][11,1

    ][1

    ggsfhfhfrrr

    += (uniperiodic) (17)

    A stratums geometry is defined relative to its period vectors ][1s

    dr

    and (or just

    for a uniperiodic stratum) as illustrated in Figure 9. (The coordinate origin isrepresented as 0

    ][2s

    dr

    ][

    1

    s

    d

    r

    r

    in the figure.) The stratums stripe list comprises elements ,

    , wherein is the number of stripes per period; and the range of is

    implicitly extended to

    }str i pe{ 2l

    22 1 Ll K= 2L 2l

    = K2l by periodicity3. The boundary wall between

    and is parallel to}str i pe{ 2l }str i pe{ 1+2l][

    2s

    dr

    (or in the case of a uniperiodic stratum,

    perpendicular to ) and intercepts the point][1s

    dr

    ][12s

    dlr

    *}. c1str i pe{ .

    ][

    232

    ][

    12

    ss

    dlldl

    rr

    *}. c2}. bl ock{str i pe{*}. c1str i pe{ +

    ][12s

    dlr

    *}. c1str i pe{

    ][1s

    dr

    ][2s

    dr

    0r

    }str i pe{ 2l

    }str i pe{ 1+2l

    }}. bl ock{str i pe{ 32 ll }}. bl ock{str i pe{ 1+32 ll

    Figure 9. Stratum geometry definition.

    If is inhomogeneous, it comprises structural blocks

    , , wherein is the number of blocks per period. The

    range of is implicitly extended to

    }str i pe{ 2l

    }}. bl ock{str i pe{ 32 ll 33 1 Ll K= 3L

    3l = K3l by periodicity. The blocks are

    rectangular, and the boundary wall between and}}. bl ock{str i pe{ 32 ll

    GD-Calc_Intro.pdf, version 09/22/2006

    3The GDC-Calc documentation generally uses the , l and indices to label strata, stripes, and

    blocks, respectively.1l 2 3l

    Copyright 2006, Kenneth C. Johnsonsoftware.kjinnovation.com

  • 7/25/2019 Optical Moulation

    18/22

    18

    }}. bl ock{str i pe{ 1+32 ll intercepts the point][

    12s

    dlr

    *}. c1str i pe{ +][

    232s

    dllr

    *}. c2}. bl ock{str i pe{ .

    To illustrate the use of harmonic indices, code listing (18) extends listing (10) to

    add a second stratum to the grating. The second stratum is identical to the first, exceptthat its stripe orientation is rotated by by swapping h11and h12. Figure 10 shows aplot of the grating structure. (In generating Figure 10, the assignment x_l i mi t ( 2, 1) =3*t hi ckis made to extend the plot limits; cf. listing (11). The limit should be similarlyextended in other figures to follow.)

    o90

    GD-Calc_Intro.pdf, version 09/22/2006

    (18)

    . . .st r atum. h11=1;st r atum. h12=0;. . .gr at i ng. st r atum{1}=st r at um; % same as l i st i ng ( 10)st r at um. h11=0; % Swap h11 and h12.st r atum. h12=1;gr at i ng. st r atum{2}=st r atum;

    Figure 10. Grating structure from listing (18).

    Copyright 2006, Kenneth C. Johnsonsoftware.kjinnovation.com

  • 7/25/2019 Optical Moulation

    19/22

    19

    Stratum type 3: coordinate break

    The coordinate-break stratum type does not represent a physical grating layer, butit is abstractly classified as a stratum of zero thickness, in the sense that it is associatedwith a lateral plane at a particular height in the grating. It has the effect of applying a

    specified lateral ( , ) translational shift to all strata above the coordinate break.

    Listing (19) illustrates the use of a coordinate break. This example extends listing (18) byinserting a coordinate break above the second stratum (this applies a half-period lateralshift to both the and coordinates), and then adding copies of the first two strata to

    the grating. As illustrated in Figure 11, the translational shift is applied to the top twostrata.

    1x

    2x 3x

    2x 3x

    GD-Calc_Intro.pdf, version 09/22/2006

    (19)

    . . .gr at i ng. st r at um{1}=. . . ; % same as l i st i ng ( 18). . .gr at i ng. st r at um{2}=. . . ; % same as l i st i ng ( 18)cl ear str at umst r at um. t ype=3; % coordi nat e br eakst r at um. dx2=d/ 2; % hal f - per i od x2- shi f tst r at um. dx3=d/ 2; % hal f - per i od x3- shi f tgr at i ng. st r atum{3}=st r atum;gr at i ng. st r atum{4}=gr at i ng. st r atum{1};gr at i ng. st r atum{5}=gr at i ng. st r atum{2};

    Figure 11. Grating structure from listing (19).

    Copyright 2006, Kenneth C. Johnsonsoftware.kjinnovation.com

  • 7/25/2019 Optical Moulation

    20/22

    20

    Stratum type 4: replication module

    A three-dimensionally periodic (tri-periodic) grating structure could be definedby first constructing the strata for one period in the vertical direction, and then iterativelyreplicating the first period. For example, listing (19) could be modified to define a

    photonic crystal structure by replacing the last two lines with the following loop,

    (20)f or l 1=4: 11gr at i ng. st r at um{l 1}=gr at i ng. st r at um{l 1- 3};

    end

    However, a more efficient way to define this type of structure would be to use areplication module, which is a composite type of stratum comprising an encapsulatedlist of strata (for one period) and a replication count.

    The following code excerpt illustrates the use of a replication module. The threestrata encapsulated by the replication module ( ,

    , ) are defined the same way as the first threegrating strata in listings (18) and (19). Figure 12 illustrates the grating structure definedby listing (21).

    r at um{1}st r at um. st

    r at um{2}st r at um. st r at um{3}st r at um. st

    Figure 12. Grating structure from listing 21.

    GD-Calc_Intro.pdf, version 09/22/2006Copyright 2006, Kenneth C. Johnson

    software.kjinnovation.com

  • 7/25/2019 Optical Moulation

    21/22

    21

    . . .c l ear str at umst r at um. t ype=4; % r epl i cat i on modul est r at um. st r atum{1}=. . . ; % same as previ ous grat i ng. st r atum{1}st r at um. st r atum{2}=. . . ; % same as previ ous grat i ng. st r atum{2}

    st r at um. st r atum{3}=. . . ; % same as previ ous grat i ng. st r atum{3}st r at um. r ep_count =4; % r epl i cat i on countgr at i ng. st r atum={st r at um};

    (21)

    Incident field and diffraction order selection

    The diffraction calculations assume a plane-wave incident electromagnetic field

    characterized by its spatial frequency vector ][ifr

    . Using polar coordinates, this vector can

    be defined as

    (

    sinsincossincos 321][ 1 eeef

    i ++= )r

    (22)

    wherein is wavelength, and and are polar and azimuth angles of incidence. The

    i nc_ f i el dstruct specifies the wavelength and the and projections of2e 3e][i

    fr

    (denoted

    as f 2and f 3), e.g.,

    GD-Calc_Intro.pdf, version 09/22/2006

    (23)

    wavel engt h=1. 825;t heta=0. 0;phi =0. 0;i nc_f i el d. wavel engt h= wavel engt h;

    i nc_f i el d. f 2=si n( t het a) *cos( phi ) / wavel engt h;i nc_f i el d. f 3=si n( t het a) *si n( phi ) / wavel engt h;

    (The incident fields polarization state is not specified because the GD-Calc output can beused to determine diffraction efficiencies for any incident polarization state.)

    The diffracted electromagnetic field comprises diffraction orders whose grating-tangential spatial frequencies differ from that of the incident field by increments

    ][22

    ][11

    ggfmfmrr

    + , wherein and are integer-valued order indices. Only a finite

    number of orders are retained in diffraction calculations, and GD-Calc provides the userfull control over which orders are retained. The orders are specified by the or der struct

    array, each element of which corresponds to a specific index and a list of indicesassociated with that value. Typically, the order selection is defined by rectangular

    order truncation: and

    1m 2m

    2m 1m2m

    m_max|| 1m m_max|| 2m for some truncation limit m_max, as

    defined by the following code excerpt,

    Copyright 2006, Kenneth C. Johnsonsoftware.kjinnovation.com

  • 7/25/2019 Optical Moulation

    22/22

    22

    GD-Calc_Intro.pdf, version 09/22/2006

    (24)

    m_max=10;or der =[ ] ;m1=- m_max: m_max;f or m2=- m_max: m_max

    or der ( end+1) . m2=m2;

    or der ( end) . m1=m1;end

    However, alternative truncation conditions can be used. For example, the photonic crystalgrating described above can be analyzed using a diagonal truncation method defined bythe conditions . (The two methods exhibit similar numerical

    convergence with respect to m_max, but the computation time is reduced by about a factorof 8 by using diagonal truncation.) The following code excerpt illustrates diffractionorder selection using diagonal truncation,

    m_max+ |||| 21 mm

    (25)

    m_max=10;

    or der =[ ] ;m1=- m_max: m_max;f or m2=- m_max: m_max

    or der ( end+1) . m2=m2;or der ( end) . m1=m1( abs( m1) +abs( m2)