OptiGrating User S Reference and Tutorials
OptiGrating User S Reference and Tutorials
Version 4.2
for Windows® XP/2000
OptiGrating
User’s Reference and Tutorials
Integrated & Fiber Optical Gratings Design Software
All OptiGrating documents, including this one, and the information contained therein, is copyright material.
No part of this document may be reproduced, stored in a retrieval system, or transmitted in any form or by any means whatsoever,
including recording, photocopying, or faxing, without prior written approval of Optiwave.
Disclaimer
Optiwave makes no representation or warranty with respect to the adequacy of this documentation or the programs which it
describes for any particular purpose or with respect to its adequacy to produce any particular result. In no event shall Optiwave, its
employees, its contractors or the authors of this documentation be liable for special, direct, indirect or consequential damages,
losses, costs, charges, claims, demands, or claim for lost profits, fees or expenses of any nature or kind.
Technical support
If you purchased Optiwave software from a distributor that is not listed here, please send technical
questions to your distributor.
Optiwave Canada/US
Tel (613) 224-4700 E-mail [email protected]
Fax (613) 224-4706 URL www.optiwave.com
Protection key........................................................................................................................10
OptiGrating Directory............................................................................................................11
Installation .............................................................................................................................11
Examples................................................................................................................................97
Example 1: FBGApod.ifo..........................................................................................97
Apodized Fiber Bragg Grating Simulation................................................................97
Example 2: SuperStructure.ifo .................................................................................98
Sampled grating .......................................................................................................98
Example 3: ModeConversion.ifo ..............................................................................99
Mode Conversion by Fiber Bragg Grating................................................................99
Example 4: WBGTransmission.ifo .........................................................................100
Phase-shifted Bragg Grating Filter Based on Planar Waveguide ..........................100
Example 5: LPGGainFlat.ifo...................................................................................101
Long-period Fiber Grating for Gain Flattening .......................................................101
Example 6: PulseUltrshort1.ifo...............................................................................102
Pulse Reshaping by Uniform Fiber Grating............................................................102
Example 7: PulseUltrshort2.ifo...............................................................................104
Pulse Reshaping by Apodized Fiber Gratings .......................................................104
Example 8: MoireGrating.ifo...................................................................................106
In-Fiber Moiré Gratings ..........................................................................................106
Single Fiber..........................................................................................................................112
Single Waveguide................................................................................................................141
The Single Waveguide Module ..............................................................................141
To select the Single Waveguide module................................................................141
The Single Waveguide Profile dialog box ..............................................................141
To open the Single Waveguide dialog box.............................................................141
Photosensitivity ......................................................................................................142
Single Waveguide Modes dialog box .....................................................................143
To compute guided modes in the Single Waveguide Modes dialog box................145
2D Preview of the field dialog box..........................................................................147
Using Calculation Options......................................................................................148
Waveguide Coupler.............................................................................................................148
Other Waveguide.................................................................................................................153
Open .....................................................................................................................................156
Save Worksapce..................................................................................................................157
FWHM ....................................................................................................................176
Using the FWHM Command ..................................................................................176
To perform a Full Width At Half Maximum calculation ...........................................176
The FWHM Tools dialog box..................................................................................177
Group Delay ...........................................................................................................178
Export Curve ..........................................................................................................180
Crossection Monitor ...............................................................................................181
Display ...................................................................................................................183
Re-sampling 3D Propagation Graphs ....................................................................184
To define a graph's properties when working in a 3D view ....................................184
Profile Palette.........................................................................................................185
Variables ................................................................................................................189
Arrays.....................................................................................................................189
Mathematical Operators.........................................................................................189
Boolean Operators .................................................................................................190
Comparison Operators...........................................................................................190
Constants.............................................................................................................................195
Mathematical Constants.........................................................................................195
Physical Constants.................................................................................................195
Functions .............................................................................................................................196
Conversions.........................................................................................................................200
Length ....................................................................................................................200
Temperature...........................................................................................................200
Zoom In ..................................................................................................................201
Zoom Out ...............................................................................................................201
Trace Curve ...........................................................................................................201
Table of Points .......................................................................................................203
Copy Bitmap...........................................................................................................203
Print........................................................................................................................203
Curve Properties ....................................................................................................204
Axis Properties .......................................................................................................205
Grid Properties .......................................................................................................206
Graph Properties....................................................................................................206
Labels.....................................................................................................................207
CHAPTER 1: WELCOME TO OPTIGRATING 4.2
OptiGrating 4.2 offers you different options for analyzing and designing typical grating
assisted fibers and waveguides. You can select one of the options and set device
parameters. For example, the design of a Bragg fiber grating filter involves
adjustments of the grating shape, length, apodization, index modulation and chirp,
according to the fiber diameter and refractive index. Once such a device setup is
done, you can use the program to perform numerical simulations. Such simulations
are based on solving coupled mode equations that describe the interaction of guided
modes. The coupled mode equations are solved by the Transfer Matrix Method (a
fundamental matrix method).
9
CHAPTER 1: WELCOME TO OPTIGRATING 4.2
Improved functionality
OptiGrating 4.2 improves the overall functionality in several areas, including new
commands that allow the user to work within Fiber/Waveguide with greater ease.
described below.
Protection key
A hardware protection key is supplied with the software.
Note: Please ensure that the hardware protection key is NOT connected during
the installation of OptiGrating.
Note: Use a switch box to prevent protection key conflicts. Ensure that the cable
between the switch box and the computer is a maximum of one meter long.
10
CHAPTER 1: WELCOME TO OPTIGRATING 4.2
OptiGrating Directory
By default, the Installer will create an OptiGrating directory on your hard disk. The
OptiGrating directory will contain the following subdirectories:
To install OptiGrating
11
CHAPTER 1: WELCOME TO OPTIGRATING 4.2
Online Help
You can also find additional information on using OptiGrating in the Online Help. To
access Online Help, from the Help menu click Help Topics. Use either the Contents
tab, the Find tab, or the Index tab to get the information you need.
12
CHAPTER 1: WELCOME TO OPTIGRATING 4.2
The Menu Bar displays the command and option menus that OptiGrating offers you.
The Toolbar displays the buttons you can use to speed up your work.
OptiGrating 4.2 allows you to use not only the standard buttons for working with files
but also the Clone View, FWHM Tools. You will find detailed information about those
buttons in the User Guide.
13
CHAPTER 1: WELCOME TO OPTIGRATING 4.2
The Toggle Pane button toggles the display between the window that has a Data
Entry Pane and the Graphics window.
The Display Curves buttons turn on and off the following curves: Transmission 1,
Transmission 2, Reflection 1, and Reflection 2.
The Calculation list box offers you the following options: Propagation, Spectrum,
Pulse Response.
Edit Parameters consist of the following buttons (from top down): Fiber/ Waveguide
parameters (edit fibers or waveguides), Mode parameters (edit list of modes), and
Grating parameters (edit gratings).
14
CHAPTER 1: WELCOME TO OPTIGRATING 4.2
You can also use a Multiple Window view. It is important to remember that you get
different tools, exporting curves, and printing options that are specific for each active
window, i.e. the window you are currently using. In the Multiple Window view, the
project window is split in two. The Input View window, with all edit boxes, is on the left;
the graph is on the right. If your active window is Input view, you cannot print, export
a curve, or use any of the tools. In order to be able to do all those operations, you have
to click in the window containing the graph.
What is a Workspace
In OptiGrating, you can save your multiple graph windows as a workspace. When you
use the Save Workspace option, you are saving not only multiple windows but also all
the information (settings, position and size of the windows, etc.) stored in those
windows. When you open a saved workspace, you actually open all of the projects or
views saved in that workspace.
What is a Template
A template is a collection of settings and options that work together to govern the
overall appearance of a project. Templates can be applied at any time when you are
working with OptiGrating. When you want to apply a template, you have to define the
files you want to open with that template.
15
CHAPTER 1: WELCOME TO OPTIGRATING 4.2
When you use the left mouse button to click inside a window, you automatically make
the window active.
Note: For each device configuration, a mode solver provides a complete list of
waveguide modes. You can design the grating that assists coupling between
selected modes and has control over all device parameters.
16
CHAPTER 1: WELCOME TO OPTIGRATING 4.2
17
CHAPTER 1: WELCOME TO OPTIGRATING 4.2
18
CHAPTER 2: TECHNICAL BACKGROUND
Technical Background
Integrated & Fiber Optical Gratings
An integrated or fiber optic grating is a periodic modulation of the refractive index in a
waveguide or on the surface of a waveguide. It can be fabricated by using either two-
beam interferometry or near-field holography through an optical phase mask.
Waveguide gratings play an important role in WDM systems since they can be used
for controlling, combining, and routing light. OptiGrating 4.2 is based on the Coupled
Mode Theory (CMT). The program has built-in mode solvers providing modal
constants and fields needed to formulate the Coupled Mode Equations (CMEs). In
turn, the Coupled Mode Equations are solved by using Transfer Matrix Method
(TMM).
19
CHAPTER 2: TECHNICAL BACKGROUND
For example, a dispersion flattened fiber design involves a few concentric index
regions.
In OptiGrating 4.2, regions define a fiber or slab waveguide profile. Each region has
its dimension (width) and refractive index profile. The default refractive index profile
options are listed below, where x is the region’s local coordinate, w is the width of the
region.
n ( x ) = const (1)
n( w) – n(0)
n ( x ) = n ( 0 ) + x ⋅ -----------------------------
(2)
20
CHAPTER 2: TECHNICAL BACKGROUND
x 2
n ( x ) = [ n ( w ) – n ( 0 ) ] ⋅ ---- + n ( 0 ) (3)
w
e ⋅ n( w) – n( 0 )
n ( x ) = [ n ( 0 ) – n ( w ) ] ⋅ ----------- ⋅ exp – ---- + ------------------------------------
e x (4)
e–1 w e–1
where n (0), n (w) is the refractive index at x=0 and x=w, respectively.
2 ⋅ ( x – x0 ) 2
n ( x ) = n max exp – ln 2 ⋅ ------------------------- (5)
h⋅w
where n max is the maximum index value x 0 is the peak position, and h is the
normalized value of FWHM
α
n ( x ) = n max ⋅ 1 – 2∆ ⋅ ----
x (6)
w
where n max is the maximum index value, and ∆ is the normalized index difference.
The difference is defined as
n max2– n min2
∆ = -------------------------
- (7)
2n max2
x α
n ( x ) = n max ⋅ 1 – 2∆ ⋅ 1 – ----
(8)
w
where n max is the maximum index value, and ∆ is the normalized index difference.
21
CHAPTER 2: TECHNICAL BACKGROUND
Waveguide Modes
In a waveguide, light propagates in the form of modes. OptiGrating 4.2 uses LP Fiber
modes, Vector Fiber modes, and Slab Waveguide modes.
LP Fiber Modes
The designation of Linearly Polarized (LP) Fiber modes is based on the assumption
of weak guidance. Weakly guiding fibers have a small difference between core and
cladding refractive index.
1 m – azimuthal number
2 n – orbital number
Both guided and cladding modes of arbitrary circular symmetric refractive index
profiles are calculated either by the accurate finite difference method or by the
analytical method (step index profile). The fundamental mode of fiber is LP (0,1).
In OptiGrating 4.2, the vector modes are calculated only for the step-index fiber. The
stepindex calculations are based on the analytical approach. The fundamental mode
of the stepindex fiber is HE (1,1).
The modes of a slab waveguide with arbitrary refractive index profile are calculated
either by the Transfer Matrix Method or by the analytical method (step index profile).
The fundamental mode is TE (0) or TM (0).
Mode Solver
Near the end of any calculation that finds the modes of an optical waveguide, it is
necessary to find the solution of an equation. This equation is a function of the
22
CHAPTER 2: TECHNICAL BACKGROUND
The numerical procedure for the so-called complex modes is more difficult, as the
search space is two dimensional. However, OptiGrating Version 4.2 uses an
advanced technique for finding these solutions. The user must specify a region in the
complex plane by giving limits to the imaginary values as well as the real ones. This
defines a rectangular shaped contour in the complex β plane. By one of the theorems
of Cauchy, the number of zeros of a function (minus the number of poles) enclosed in
a closed contour in a complex plane is given by the contour integral
1 f '( β)
°∫
N 0 = -------- ------------ dβ (9)
2πj f ( β )
c
OptiGrating performs the contour integral numerically, and uses the above formula to
determine the number of complex modes to be found within the given limits. The
calculation of the modes is aided by the numerical evaluation of the following integrals
at the same time
N0
f '(β)
∑ °∫
1
Nm = β im = -------- β m ------------ dβ (10)
2πj f(β)
i=1 c
23
CHAPTER 2: TECHNICAL BACKGROUND
Host materials
Optical telecommunication fibers are usually made from silica glasses. The high purity
glass is called the host material or substrate. Its bulk refractive index is usually the
fiber cladding refractive index. The fiber core is formed by adding dopant materials to
the host material.
Dopant materials
To change the refractive index of optical fiber, pure silica is often doped with dopants.
For example, adding germanium can result in an increase in the refractive index,
while adding fluorine reduces it. The refractive index of doped material can be
determined by the linear relationship between the doped material’s mole percentage
and permittivity.
Assume that n0 is the refractive index of the host material and n1 is the refractive
index of m1 mole-percentage doped material. Then, the refractive index n of m mole-
percentage doped material can be interpolated as:
m
n 2 = n 20 + ------ ( n 12 + n 02 ) (11)
m1
Note that this formula can also extrapolate (the case where m > m1 )
Material dispersion calculation
In OptiGrating 4.2, when the refractive index at a central wavelength λ 0, n ( λ 0 ) , and
the host and dopant material dispersion curves, n host ( λ ) and n dopant ( λ ) are
defined, the dependence of the refractive index with wavelength, n ( λ ) , is calculated
based on the following equation:
24
CHAPTER 2: TECHNICAL BACKGROUND
n 2 ( λ 0 ) – n host 2 (λ )
0
n 2 ( λ ) = n host
2 ( λ ) + -------------------------------------------------------------
- ⋅ [n2
dopant ( λ ) – n host ( λ ) ]
2 (12)
n2 dopant (λ ) – n2 (λ )
0 host 0
This equation is the same as (11), with the fraction m ⁄ m 1 estimated by comparing,
at the centre wavelength λ 0 , the refractive index of the given material with the index
of a doped material with known Sellmeier coefficients n dopant . OptiGrating uses
Equation 12 to handle the case where the Sellmeier coefficients are known for
material of just one doping concentration. If the material in question has the same
dopant, but with an unknown concentration, the fraction in Equation 12 will estimate
the concentration by comparing the given index n ( λ 0 ) with the reference index
n dopant ( λ 0 ) . With the doping concentration estimated this way, the refractive index
at other wavelengths is accurately estimated by Equation 12. On the other hand, in
the case where the Sellmeier coefficients are exacly known for the given material, the
user can enterthem himself in OptiGrating's Sellmeier Coefficient Library. OptiGrating
still uses Equation 12, since in this case the fraction is calculated as unity, and the left
hand side is assigned to n dopant ( λ ) for all wavelengths directly.
i=l
where N is the number of layers of the waveguide index profile, K i is the imaginary
part of the refractive index of ith layer material, and Γ i is the confinement factor of
the mode in the ith layer. The above equation is based on the perturbation method,
and it is only valid when Keff « 1 .
25
CHAPTER 2: TECHNICAL BACKGROUND
P ( r, ϕ ) = P r ( r ) ⋅ P ϕ ( ϕ )
(14)
In OptiGrating 4.2, regions define the fiber radial photosensitivity profile or slab
waveguide photosensitivity profile. Each region has its dimension (width) and
photosensitivity index profile. The default photosensitivity profile options are the same
as the default options for the index profile.
(15)
n ( x, y, z ) = n 0 ( x, y ) + ∆n 0 ( x, y, z ) + ∆n ⋅ P ( x, y ) ⋅ A ( z ) ⋅ f [ Λ ( z ) ⁄ cos θ, z ]
where
26
CHAPTER 2: TECHNICAL BACKGROUND
A ( z ) - apodization function
P - Photosensitivity profile of waveguide
In Equation 15, the average index modulation function ∆n 0 is applied only in the
region of the grating, i.e. in layers with non-zero photosensitivity. Layers with very
small photosensitivity will respond to average index modulation, but the grating will be
very weak there.
If the User wants to apply the Average Index change to a layer that does not contain
the grating, he should enter a very small number (.01) for the Photosensitivity of that
layer.
Grating Shape
In OptiGrating, the Grating Shape is the profile of index modulation within one grating
period Λ .
f ( z ) = +1 0<z<Λ⁄2 (16)
–1 elsewhere
• Sine
f ( z ) = sin ------ z
2π (17)
Λ
Other grating shapes can be supplied from a user file or defined by user functions.
• Uniform
∆n 0 = ∆ ∆ « n0 (18)
27
CHAPTER 2: TECHNICAL BACKGROUND
• Linear
z–L⁄2
∆n 0 = – ------------------ ∆ ∆ « n0
(19)
L
Other average index modulations can be supplied from a user file or defined by user
functions.
Λ ( z ) = Λ0 (20)
• Linear:
z–L⁄2
Λ ( z ) = Λ 0 – ------------------ ∆ ∆ « Λ0 (21)
L
• Quadratic:
z 2 1
Λ ( z ) = Λ 0 – --- – --- ∆ ∆ « Λ0
(22)
L 4
• Square root:
z 1
Λ ( z ) = Λ0 – --- – ------- ∆ ∆ « Λ0 (23)
L 2
• Cubic root:
1
Λ ( z ) = Λ0 – 3 --z- – ------- ∆ ∆ « Λ0 (24)
L 3 2
Other chirp forms can be supplied from a user file or defined by user functions.
Grating Apodization
The Grating Apodization is the slowly varying envelope of the grating profile.
28
CHAPTER 2: TECHNICAL BACKGROUND
The default apodization options are listed below, where s is the taper parameter and
L is the grating length.
A(z) = 1
(25)
• Gaussian:
2 ⋅ (z – L ⁄ 2) 2
A ( z ) = exp – In2 ⋅ ------------------------------- (26)
s⋅L
• Hyberbolic tangent:
Other chirp forms can be supplied from a user file or defined by user functions.
Phase Shift
The Phase Shift element is a piece of the current waveguide structure without the
grating.
The Phase Shift element can be defined alternatively by one of the two parameters:
• Phase – phase change accumulated in the Phase Shift element
• Length – length of the element
Multiple Gratings
You can simulate a collection of gratings and phase shifts in one waveguide device.
29
CHAPTER 2: TECHNICAL BACKGROUND
E(z) = ∑ [a i exp ( – jβ i z )
(+) + a i( - ) exp ( jβ i z ) ]e i (28)
i
(+) a i( - ) are the slowly varying amplitudes of ith mode traveling in the +z
where a i and
and –z directions. β i and e i is the propagation constant and modal field of the ith
mode.
The above electric field is used as trial solution in the Maxwell’s equation. The
following Coupled mode Equations (CMEs) can be derived by using the properties of
waveguide modes,
da i( + )
-------------- = – j ⋅
dz ∑ {a (+) (-)
k k ki exp [ – j ⋅ ( β k – β i ) ⋅ z ] + a k k ki exp [ j ⋅ ( β k + βi ) ⋅ z ] } (29)
da i( - )
------------
dz
- = j ⋅ ∑ {a (+)
k k ki exp [ – j ⋅ ( β k + βi ) ⋅ z ] + a k( - ) kki exp [ j ⋅ ( βk – βi ) ⋅ z ] } (30)
k
The coupling coefficient between modes k and i is given by:
∫∫
1 x
k kt = --- ωε 0 ñ 2 ( x, y, z )e k ⋅ e t dx dy (31)
4
ñ 2 ( x, y, z ) = ñ 2 ( x, y, z ) – n 02 ( x, y )
(32)
30
CHAPTER 2: TECHNICAL BACKGROUND
an analytic transfer matrix. The transfer matrix for the entire structure can be obtained
by multiplying the individual transfer matrices. The Coupled Mode Equations can be
solved with the initial values.
∆ -----2 = ∑P ε
1 (33)
n t ij j
j=1
P 11 P 12 P 12
P ij = P 12 P 11 P 12 (34)
P 12 P 12 P 11
∆ -----2 = ∆ -----2
1 1
= εP 12 – εv ( P 11 + P 12 ) (35)
n x, y n 1, 2
31
CHAPTER 2: TECHNICAL BACKGROUND
∆n = – --- n 3 ∆ -----2
1 1 1
= – --- n 3 ε [ P 12 – v ( P 11 + P 12 ) ]
2 n x, y 2 (36)
=n ⋅ y ⋅ ε
where the strain-optic coefficient y is defined as:
1 dn
y = --- ------ = – 0.5∗ n 2 [ P 12 – v ( P 11 + P 12 ) ] (37)
n dε
The grating period changes is:
∆Λ = ε ⋅ Λ (38)
The default strain distributions that can be applied to a fiber grating are listed below:
• Uniform
ε = ε0 (39)
ε(L ) – ε(0)
ε ( z ) = ε ( 0 ) + ---------------------------- ⋅ z (40)
L
where L is the grating length, ε ( 0 ) is the strain at z = 0 , and ε ( L ) is the strain
at z = L
• Gaussian
2 ⋅ (z – L ⁄ 2) 2
ε = ε 0 ⋅ exp – ln 2 ⋅ ------------------------------- (41)
w⋅L
where ε 0 is the peak strain value and w is the normalized value of FWHM.
Other strain distributions can be defined by user functions.
dn
∆n = n ⋅ ------------ ⋅ ∆T = ξ ⋅ n ⋅ ∆T (42)
n ⋅ dt
32
CHAPTER 2: TECHNICAL BACKGROUND
dΛ
∆Λ = Λ ⋅ --------------- ⋅ ∆T = η ⋅ Λ ⋅ ∆T (43)
Λ ⋅ dT
where η is the thermo-optic expansion coefficient.
The default temperature distributions that can be applied to a fiber are listed below:
• Uniform
∆T = ∆T 0 (44)
∆T ( L ) – ∆T ( 0 )
∆T ( z ) = ∆T ( 0 ) + ------------------------------------- ⋅ z
(45)
L
where L is the grating length, ∆T ( 0 ) is the temperature at z = 0 , and ∆T ( L ) is
the temperature at z = L .
• Gaussian
⋅ ( z – L ⁄ 2 )- 2
2------------------------------
∆T = ∆T 0 ⋅ exp – ln 2 ⋅ (46)
w⋅L
where ∆T 0 is the peak temperature value and w is the normalized value of FWHM.
Other temperature distributions can be defined by user functions.
PB
R = ------- P B – backward power P IN – input power (47)
P IN
33
CHAPTER 2: TECHNICAL BACKGROUND
The program calculates reflection for both coupled modes, called Reflection 1 and
Reflection 2 respectively.
• For Propagation calculations, the reflection is obtained at every point along the
grating device. In the case of multiple gratings, the device begins with the first
grating and ends with the last grating:
• For Spectrum calculations, the reflection is obtained at the end of the device
PB ( λ )
R = ---------------
- z = 0 λ ∈ ( λ min, λ max ) (49)
P IN ( λ )
Transmission
Transmission at a given position is quantified by the ratio of forward-carried power to
input power:
PF (50)
R = ------- P F – forward power P IN – input power
P IN
The program calculates transmission for both coupled modes, called Transmission 1
and Transmission 2 respectively.
• For propagation calculations, the transmission is obtained at every point along
the grating device. In the case of multiple gratings, the device begins with the first
grating and ends with the last grating:
• For spectrum calculations, the transmission is obtained at the end of the device.
PB ( λ )
R = ---------------
- z = end of device λ ∈ ( λ min, λ max ) (52)
P IN ( λ )
Cumulative Phase
Cumulative Phase is the phase change of the electromagnetic field accumulated for
a given wavelength.
34
CHAPTER 2: TECHNICAL BACKGROUND
Group Delay
Group Delay is the first derivative of the cumulative phase with respect to the angular
frequency.
dΨ dΨ dλ λ 2 dΨ
T g = -------- = -------- ------- = – --------- -------- Ψ – cumulative phase (53)
dω dλ dω 2πc dλ
Dispersion
Dispersion is defined as the first derivative of the group delay with respect to the
wavelength.
dT λ 2 d 2 ψ 2 dψ
D ( λ ) = --------g = – --------- --------2- + --- ------- (54)
dλ 2πc dλ λ dλ
35
CHAPTER 2: TECHNICAL BACKGROUND
Technical References
You will find below a list of general references relevant to waveguide and fiber
gratings and to waveguide optics. Optiwave Corporation does not endorse any of the
references, nor do the OptiGrating algorithms follow exactly the publications. The
references are listed for your convenience:
36
CHAPTER 2: TECHNICAL BACKGROUND
[9] M. Vengsarkar et. al., “Long-period fiber grating as Band-Rejection Filters”, J. Lightwave
Technol., vol. 14, No. 1, pp. 58-65, 1996.
Mode Solver
[1] Chengkun Chen, Pierre Berini, Dazeng Feng, Stoyan Tanev and Velko P. Tzolov , "Efficient
and accurate numerical analysis of multilayer planar optical waveguides in lossy anisotropic
media", OPTICS EXPRESS, Vol. 7, No. 8, p 260-272, 9 October 2000. Hyperlink
http://www.opticsexpress.org/topbiframe.htm.
37
CHAPTER 2: TECHNICAL BACKGROUND
38
CHAPTER 3: THE OPTIGRATING TUTORIAL
Tutorial
The best way to learn how to work with OptiGrating 4.2 is to do the Tutorial lessons.
By following the step-by-step instructions, you will see how quickly you can become
a highly efficient OptiGrating user.
Although you can use OptiGrating to perform a huge variety of tasks, in these
introductory lessons you will learn how to design a Fiber Bragg grating, how to work
with Sensors, and how to define Material Dispersion.
Step 1
The first thing you will do is to open a new project. Then, you will choose one of the
five available modules to work with: Single Fiber, Fiber Coupler, Single Waveguide,
Waveguide Coupler, and Other Waveguide.
Note: You can also open a new project by clicking the New button on the Toolbar.
Step 2
Next, you will define certain parameters for the Single Fiber. You will do that in the
Single Fiber dialog box in which you can set the following characteristics: Index
Profile, Photosensitivity Profile, Number Of Points In Mesh, Central Wavelength, etc.
39
CHAPTER 3: THE OPTIGRATING TUTORIAL
Note: Since you are going to use the default parameters, you don’t have to
change any of the predefined options.
2 Click OK to close the Single Fiber dialog box.
40
CHAPTER 3: THE OPTIGRATING TUTORIAL
Step 3
In this step, you will access a list of the calculated modes of your Fiber/Waveguide
structure. The fiber you use is a single mode fiber.
41
CHAPTER 3: THE OPTIGRATING TUTORIAL
Note: If you have chosen to work with the Single Fiber module or the Single
Waveguide module, you will see that there is only one list of modes in the Modes
dialog box. If you are working with other modules, you will see that there are two
lists available in the dialog box.
Step 4
In this step, you will learn how to open the Grating Manager dialog box and how to
access the Grating Definition dialog box in which you can define the parameters of
each grating. The Grating Manager gives you a list of your grating objects (and some
important information about those objects) and allows you to add, remove, or copy
gratings or phase shifts.
Note: To open the Grating Definition dialog box, you can also click the Edit Item
button.
Step 5
In this step, you will define the parameters of the grating you’re working with in the
Grating Definition dialog box.
42
CHAPTER 3: THE OPTIGRATING TUTORIAL
1 In the Grating Definition dialog box, from the Grating Shape list box, choose
Sine.
2 From the Average Index dialog box, choose Uniform.
3 In the Index Change box, make sure the index is set to 0.
4 From the Period Chirp list box, choose Linear.
5 In the Total Chirp box, type 2.
6 From the Apodization list box, choose User Defined.
7 In the Ind. Mod. box, type 0.0006.
8 In the Number of Segments box, type 101.
Note: You will notice that for some of the parameters you can use either the
predefined functions or the User Defined options. Notice that when you choose
the User Defined option form the Apodization list box, the Define button is
enabled.
• The grating will be defined by the number of segments entered in the Number Of
Segments box. All segments will be treated as a single uniform grating. Better
precision is available by increasing the number of the segments. However,
calculation time increases with the number of segments.
• All grating parameters are fully described in the Technical Background section.
Step 6
In this step, you will learn how to program functions in the User Defined dialog box.
The User Defined dialog box allows you to program functions by using Basic syntax
and to test visually the function by pressing the Display button. At the end of this step,
you will have defined all the necessary parameters for the Fiber Bragg grating.
2 In the User Defined Function dialog box, delete everything from the Edit
window (where you have a function already defined by default) and write the
following function:
w = 0.7
exp(-(2*(x-Length/2)/(Length*w))^4)
43
CHAPTER 3: THE OPTIGRATING TUTORIAL
3 Click the Display button to see a new curve with the parameters you have
defined in the Grating Definition dialog box.
Note: When you change the value of “w” and click the Display button, you will see
a different curve. You may want to experiment with different values before closing
the User Defined Function dialog box.
• Anything written on a line after the // command is ignored.
4 Click the OK button to close the User Defined Function dialog box.
5 In the Grating Definition dialog box, click the OK button.
6 In the Grating Manager dialog box, click the OK button to return to the Project
Window.
44
CHAPTER 3: THE OPTIGRATING TUTORIAL
Step 7
Having defined all the necessary parameters for the Fiber Bragg grating, you will now
learn how work in the Multiple View window.
In the Project Window, you have access to different Parameter buttons, displayed on
the left side of the Project Window. You can choose from several Calculation options,
listed in the Calculation list box; you can use the color button, placed on the small
Toolbar; and you can use the Display tabs, placed at the bottom of the Graph window.
Note: Each color represents a different curve. In the example above, only two
color buttons can be enabled because there are only two curves available.
• On the small toolbar that contains the color buttons, you can click the first
gray/white button to hide the Calculated options window and the Parameter
buttons.
45
CHAPTER 3: THE OPTIGRATING TUTORIAL
Step 8
There are several Display tabs available in the Multiple View window. Each tab
represents a different graph. Depending on the Module you are using and the options
you have chosen, some of the tabs may be disabled. For example, the 3D Display tab
is enabled only when you are performing a Propagation calculation.
Note: The pop-up menu allows you to use several commands: Crossection
Monitor (to see across sections), Display Properties, and Print Graph.
46
CHAPTER 3: THE OPTIGRATING TUTORIAL
Step 9
In this step, you will learn how to use the different calculation options and how to do
simple calculations. For this purpose, you will use the calculation options in the
Calculation list box that contains the most often used calculation options.
47
CHAPTER 3: THE OPTIGRATING TUTORIAL
Note: Notice that the parameters in the Calculation section change according to
the option you have chosen from the Calculation list box.
48
CHAPTER 3: THE OPTIGRATING TUTORIAL
Step 10
OptiGrating allows you to measure automatically full width at half maximum. To do so,
in this step you will use the FWHM tool.
7 In the Tools dialog box, to calculate the bandwidth at half of the maximum,
select the At check box beside bandwidth.
8 Enter 0.5 in the box next to the At check box.
9 Click Recalculate
10 Click the Close button to close the dialog box.
Note: In the Tools dialog box, you can calculate not only the bandwidth at half of
the maximum: if you enable the At check box, you can enter any desired y-axis
absolute position in the box and click the Recalculate button.
49
CHAPTER 3: THE OPTIGRATING TUTORIAL
• If the blue line showing bandwidth is not horizontal, you have to calculate more
points, i.e. you have to increase the number of steps in the Steps box.
• You can also close the Tools box, go back to the Project Window, click another
color button to display a different graph, and apply the FWHM command to it.
Step 11
In this step, you will see the Cumulative Phase graph, the Delay graph, and the
Dispersion graph.
4 Make sure both the Reflection and Transmission buttons are selected.
5 Click the Calculate button.
6 In the graph window, click the Phase tab.
50
CHAPTER 3: THE OPTIGRATING TUTORIAL
51
CHAPTER 3: THE OPTIGRATING TUTORIAL
Step 12
In this step, you will choose the Pulse Response Calculation option, define some of
the Pulse Response characteristics, and do a simple calculation.
Note: You do not need to enable the Link check box at this point.
Step 13
In this step, you will explore some of the graphs for Pulse Response. You can see
Input Pulse, Input Spectrum, Grating Spectrum, and Output Pulse.
52
CHAPTER 3: THE OPTIGRATING TUTORIAL
• The Profile tab displays your grating characteristics defined in the Grating
Manager and the Grating Definitions dialog boxes. You can display all
characteristics separately, as a 2D graph, or combined, as a Profile graph.
• To switch between characteristics, click the right mouse button and from the pop-
up menu choose the desired option.
53
CHAPTER 3: THE OPTIGRATING TUTORIAL
Select Apodization
On the y-axis of the Profile graph, you see the grating Refractive Index that is
determined by Apodization:
54
CHAPTER 3: THE OPTIGRATING TUTORIAL
This ends Lesson 1. You may now proceed to Lesson 2 that uses the grating profile
from Lesson 1. Otherwise, save your work in order to be able to do the next tutorial
lesson later. To save your work, select Save As from the File menu and enter a file
name (for example, Lesson1.ifo).
55
CHAPTER 3: THE OPTIGRATING TUTORIAL
Lesson 2 : Sensors
In this lesson, you will use the Fiber Bragg Grating example from Lesson 1. Have a
look at the Profile graph.
Step 1
In this step, you will learn to define Sensor characteristics.
56
CHAPTER 3: THE OPTIGRATING TUTORIAL
3 In the Grating Definition dialog box, enable the Sensors check box.
4 4 Click the Define button beneath the Sensors check box.
5 In the Fiber Bragg Grating Sensor dialog box, in the Temperature section,
select Linear from the list box.
6 Make sure the value in the From box is set to the default value, 0 degree
Celsius.
7 Make sure the value in the To box is set to the default value, 50 degree
Celsius.
8 Click the OK button to close the Fiber Bragg Grating Sensor dialog box, click
the OK button to close the Grating Definition dialog box, and click the OK
button to close the Grating Manager.
9 Select the Profile tab from the window.
10 Click the Calculate button.
11 The spectrum for the specified temperature distribution will be calculated.
Note that changing the distribution will change the spectrum.
57
CHAPTER 3: THE OPTIGRATING TUTORIAL
Note: The name of the region can be edited by double clicking on it.
Width: 4.15
Real Index: constant
Value: 1.44921
Width: 58.35
Real Index: constant
Value: 1.44403
width: 20
Real Index: constant
Value: 1.0
58
CHAPTER 3: THE OPTIGRATING TUTORIAL
Step 2
In this step, you will define the material dispersion of the fiber core.
To define the material dispersion of the fiber core
1 In the Single Fiber Profile dialog box, Select the Enable and deselect the
Global options in the dispersion section.
2 Highlight the core region, and select Define in the dispersion section.
3 In the Material dispersion dialog box, select Define in the Host section.
4 In the Sellmeier Parameters dialog box, select Pure Silica from the library and
press Get, followed by pressing OK to close the Sellmeier Parameters dialog
59
CHAPTER 3: THE OPTIGRATING TUTORIAL
box. You can see in the Material Dispersion dialog box that the host material
is now Pure Silica.
5 Similarly as in the previous step, define germanium-doped silica for the
Dopant+ material
6 Similarly as in the previous step, define fluorine-doped silica for the Dopant-
material
Your Material dispersion dialog box should look like this:
Step 3
In this step, you will learn how to use the library of Sellmeier coefficients.
60
CHAPTER 3: THE OPTIGRATING TUTORIAL
Note: The Sellmeier Coefficients Library is a separate file and is common for all
projects.
• You can add recently entered coefficients to the library, or you can get previously
added coefficients from the library.
• Instead of writing new coefficients, all you need to do is double-click on a desired
material in the library.
Step 4
In this step, you will define the material dispersion of the fiber cladding and Air.
61
CHAPTER 3: THE OPTIGRATING TUTORIAL
62
CHAPTER 3: THE OPTIGRATING TUTORIAL
Step 5
In this step, you will select fiber modes in the Single Fiber Modes dialog box.
To select modes
1 From the Parameters Menu, click Mode…to open the Single Fiber Modes
(multiple modes) dialog box. Here, you will see the calculated modes for the
fiber defined in the previous steps.
2 In the Single Fiber Modes dialog box, select the first six modes. To do this,
click the first mode, press down the SHIFT key, and click the sixth mode.
Note: In the Single Fiber Modes dialog box, you can select multiple modes.
63
CHAPTER 3: THE OPTIGRATING TUTORIAL
Step 6
In this step, you will define the grating parameters.
3 In the grating Definition dialog box, disable the Auto check box.
4 In the Period box, type 450.
5 From the Apodization list box choose Gaussian and in the Taper’s parameter
box type 1.
6 In the Length box, type 40000.
7 In the Ind. Mod. box, type 0.0002.
8 In the Number Of Segment box, type 101.
9 Click the OK button to close the Grating Definition dialog box, and then click
OK to close the Grating Manager dialog box.
Step 7
In this step, you will perform a Spectrum calculation and see the final result of all your
efforts.
64
CHAPTER 3: THE OPTIGRATING TUTORIAL
To do the calculation
1 In the Project Window, from the Calculation list box, select Spectrum.
2 In the From box, type 1.2 to set the beginning point of the calculation range.
3 In the To box, type 1.8 to set the end point of the calculation range.
4 In the Steps box, type 500 to assign many points for calculation.
5 Go to Parameters > Dispersion. Make sure the Dispersion option is checked
in the Parameters drop down box.
6 Click the Calculate button.
When the Power tab is enabled and you select only the leftmost red graph button,
your graph should look like this:
The graph shows the wavelengths for which the grating with period 450 µm will
transfer the incident mode’s power to the other five modes.
65
CHAPTER 3: THE OPTIGRATING TUTORIAL
In this lesson, we will simulate a grating, which has a higher order Gaussian
apodization profile. The FWHM of the grating apodization function will be scanned,
and the spectrum properties, such as bandwidth, sidelobe, peak value, peak position,
and dispersion at central wavelength are calculated. Based on the simulation results,
the optimized FWHM value for suppressing the sidelobe can be obtained.
Step 1
In this step, you will learn how to define a dispersion-shifted fiber profile.
1 File > New.
2 In the New dialog box, click the Single Fiber option.
3 From the Parameters menu, click Fiber/Waveguide.
4 Delete default Regions core and cladding by highlighting them and then
pressing the Remove button.
5 In the Single Fiber Profile dialog box, add four regions: Region 0 through
Region 3.
Width: 3.1
Real Index: user function.
The user function is defined as:
1.44439*sqrt(1+2*0.01*(1-x/WIDTH))
Radial Photosensitivity Type: constant
Radial Photosensitivity Value: 1.0
Steps: 100
Width:0.9
Real Index: constant
Value: 1.44439
Radial Photosensitivity Type: constant
Radial Photosensitivity Value: 0.0
66
CHAPTER 3: THE OPTIGRATING TUTORIAL
Width: 1.5
Real Index: constant
Value: 1.44728
Radial Photosensitivity Type: constant
Radial Photosensitivity Value: 0.0
Width: 20
Real Index: constant
Value: 1.44439
Radial Photosensitivity Type: constant
Radial Photosensitivity Value: 0.0
67
CHAPTER 3: THE OPTIGRATING TUTORIAL
68
CHAPTER 3: THE OPTIGRATING TUTORIAL
Step 2
In this step, you will access a list of the calculated modes of the fiber. The fiber you
are using is a single mode fiber.
1 From the Parameters Menu, click Mode…to open the Single Fiber Modes
(multiple modes) dialog box. Here, you will see the calculated modes for the
fiber defined in the previous steps.
2 In the Single Fiber Modes dialog box, select the LP(0,1) mode.
3 Click on the OK button.
Step 3
In this step, you will define the grating parameters and learn how to define scan
parameters in the user-defined function.
69
CHAPTER 3: THE OPTIGRATING TUTORIAL
7 In the edit window of the User Defined Function dialog box, define the user
defined function as:
where the SCAN parameter is the normalised FWHM of the apodization function.
8 Click the OK button to close the Grating Definition dialog box, and then click
OK to close the OK button to close the Grating Manager dialog box.
Note: The SCANdefault and SCAN are the key words in the user-defined
function. When you do Scan Calculation, the value of SCAN is changing. For
other calculations (Propagation, Spectrum, Pulse Response), the value of SCAN
is equal to the value of SCANdefault.
70
CHAPTER 3: THE OPTIGRATING TUTORIAL
Step 4
In this step, you will perform a Spectrum calculation. The SCAN value is equal to the
SCANdefault value.
1 In the Project Window, from the Calculation list box, select Spectrum.
2 In the From box, type 1.5496 to set the beginning point of the calculation
range.
3 In the To box, type 1.5504 to set the end point of the calculation range.
4 In the Steps box, type 1000 to assign many points for calculation.
5 Click the Calculate button.
6 Right click on the graph and choose Axis Properties.
7 Select the Left Y axis tab and then deselect the Show as dB check box.
8 Click OK.
When the Power tab is enabled, your graph should look like this:
Note: This step is important for the Scan calculation. The parameters set in this
step will be used in the Scan calculation. Choose proper From, To and Steps
parameters, so that the calculated spectra peaks are located around the center
of the calculation window.
71
CHAPTER 3: THE OPTIGRATING TUTORIAL
Step 5
In this step, you will perform a Scan calculation and see the final results
1 From the Calculation menu, select Scan.
2 In the Scan dialog box, select User Variable 'SCAN' in the Select Scan
Parameter section.
3 In the From box, type 0.2 to set the beginning value of the scanning
parameter.
4 In the To box, type 1.0 to set the ending value of the scanning parameter.
5 In the Steps box, type 50 to set the calculation steps.
6 In the Calculate Bandwidth at box, type –3, and enable the dB check box.
7 Press Calculation button.
8 After the Calculation is done, click the Scan tab in the Multiple View window.
9 By double clicking on the Scan graph, you can display Bandwidth, Sidelobe,
Peak value, Peak position, and Dispersion at Central Wavelength.
72
CHAPTER 3: THE OPTIGRATING TUTORIAL
10 Enable the bandwidth check box in the Display Selection dialog box. You will
see the results show Bandwidth vs. Scan Parameter. When the FWHM of the
apodization function increases, the effective length of the grating increases,
and the bandwidth will decrease.
11 Enable the Sidelobe check box in the Display Selection dialog box. You will
see the results show sidelob vs. Scan Parameter. The results show the
optimized FWHM for suppressing sidelobe is 0.712. In this case, the sidelobe
reaches a minimum value of 0.0105.
73
CHAPTER 3: THE OPTIGRATING TUTORIAL
12 Enable the Peak value check box in the Display Selection dialog box. You will
see the results show peak value vs. Scan Parameter. When the FWHM of the
apodization increases, the index modulation along the grating increases, so
the peak value (maximum reflectivity) will increase.
13 Enable the Peak position check box in the Display Selection dialog box. You
will see the results show peak position vs. Scan Parameter. During the
parameter scan calculation, the grating period is a constant; so peak position
(Central wavelength) is not changing with the scan parameter.
74
CHAPTER 3: THE OPTIGRATING TUTORIAL
75
CHAPTER 3: THE OPTIGRATING TUTORIAL
• The Steps field indicates the number of divisions used in the specified wavelength
range.
76
CHAPTER 3: THE OPTIGRATING TUTORIAL
5 In the Length field, enter the length of the grating, 5 cm (50,000 µm).
6 In the Segments field, enter the number of segments to be 1000, this is the
number of segments that will have constant coupling coefficients within them.
The layer peeling algorithm will use 1000 layers in this case.
7 Enter 4 in the Over Sample field. Over Sample is used in the reconstruction
of the truncated impulse response, the accuracy is sometimes improved by
using finer steps in the spectrum.
8 Click on the Define button next to the Ref/Trans.
This brings up a dialog box for defining the reflectivity spectrum as seen below:
77
CHAPTER 3: THE OPTIGRATING TUTORIAL
78
CHAPTER 3: THE OPTIGRATING TUTORIAL
Step 2
1 Click on the Causality button in the Inverse Problem Solver dialog box. This
will display the impulse response calculated from the spectrum you have
defined.
• Because of causality, any real impulse response must be zero for negative
arguments. In this picture some unphysical oscillations are seen in the negative
domain. These oscillations will cause inaccuracies in the reconstruction. They
can be reduced by adding delay to the response (a linear phase shift).
Note: You can experiment with various delays by entering other numbers in the
Linear Phase Shift field, and clicking Impulse Response to see the result.
2 Click on Close.
3 Click on Start in the Inverse Problem Solver dialog box to start the
reconstruction. A progress bar indicates the progress of the layer peeling
algorithm. When this process finishes, the reconstructed grating profile is
used to generate the spectrum of the new grating. A second progress bar
displays the progress of the calculation of the spectrum.
4 Select the Power tab to see the spectrum of the new grating
79
CHAPTER 3: THE OPTIGRATING TUTORIAL
5 The realised Reflectivity is shown in light blue, and the desired reflectivity in
dark blue. The Transmission is shown in red.
6 Select the Dispersion Tab to show the realised versus the desired dispersion.
• Within the reflection band, where significant power is reflected, the dispersion is
close to the desired value. The dispersion outside the reflection band comes from
the very small reflection in this spectral range, and the desired response is lost in
numerical noise.
80
CHAPTER 3: THE OPTIGRATING TUTORIAL
7 Select the Profile tab to see the actual grating which generated this spectrum.
81
CHAPTER 3: THE OPTIGRATING TUTORIAL
Step 1
1 File > Open. Choose file Ex1a.ifo.
2 Select the Profile tab to see the details of this grating.
• It has a linear chirp of 0.2 nm, and a gaussian apodization with FWHM = 0.5.
3 Select the Power tab to see the reflection and transmission spectra.
82
CHAPTER 3: THE OPTIGRATING TUTORIAL
Note: You can press Calculate to calculate the spectrum again, if desired.
4 Click on Spectrum in the Single Fiber drop down menu, then click on the
graph in the main window to active it.
5 Select Tools > Export Complex Spectrum and select the Reflection button as
shown below:
83
CHAPTER 3: THE OPTIGRATING TUTORIAL
6 Click Export.
7 In the Save As dialog box, find a suitable place and name for your data file.
8 Close Ex1a.ifo.
Step 2
1 Now, open a new project with File > New > Single Fiber.
2 Choose Calculation > Inverse Scattering Solver to get the Inverse Problem
Solver dialog box.
3 Select the From File checkbox.
4 Navigate to the place where you left the file with the reflection spectrum.
Open the file.
5 We suppose that the original length of the grating is known, so enter 50000
µm in the Length box. (Feel free to experiment with different lengths.)
• The original spectrum was generated with a profile having 100 segments. It is not
necessary that the reconstruction have the same number, here it is set to 1000.
84
CHAPTER 3: THE OPTIGRATING TUTORIAL
• Since this spectrum was generated from a real grating, it displays exactly the
causal property of being zero for negative argument.
7 Click Close.
8 Click Start in the Inverse Problem Solver dialog box to begin the
reconstruction.
9 Click on Spectrum to enable all tabs.
10 Select the Profile tab to see the reconstructed profile.
85
CHAPTER 3: THE OPTIGRATING TUTORIAL
11 To see the chirp more clearly, right click the mouse in the Profile window and
select Chirp Period.
86
CHAPTER 3: THE OPTIGRATING TUTORIAL
• The chirp is linear and shifts by 0.2 nm, like the original grating.
12 Select the Power tab to compare the reflectivitities, one from the imported
complex spectrum and the other from the calculated response of the
reconstructed grating.
87
CHAPTER 3: THE OPTIGRATING TUTORIAL
88
CHAPTER 3: THE OPTIGRATING TUTORIAL
89
CHAPTER 3: THE OPTIGRATING TUTORIAL
6 Set the bandwidth to 0.4 nm and the reflectivity to 0.9 within this band.
7 Click OK.
8 Select the Disp radio button and click the adjacent Define button to define the
dispersion spectrum.
9 In this screen, set the dispersion to -1800 ps/nm for all wavelengths, as seen
above.
10 Click OK.
90
CHAPTER 3: THE OPTIGRATING TUTORIAL
11 Click the Causality button to see the impulse response of the specified
spectrum.
12 Click Close.
91
CHAPTER 3: THE OPTIGRATING TUTORIAL
Step 2
1 Click Start in the Inverse Problem Solver dialog box to start the layer peeling
algorithm..
2 Select the Delay tab.
3 Select the red and light blue curves to show the transmitted and reflected
delays. The dark blue curve shows the target delay.
4 Click in the graph window and go to Tools > Group Delay
• The window displays the reconstructed group delay with a second order fitting.
The dispersion is reported in the Results frame as -1773.79 ps/nm, in close
agreement with the desired response.
92
CHAPTER 3: THE OPTIGRATING TUTORIAL
Step 1
1 Choose File > New > Single Fiber.
2 Then select Calculation > Inverse Scattering Solver, to get Inverse Problem
Solver dialog box.
3 In the Inverse Problem Solver box, make sure the User-Defined checkbox is
checked.
4 Enter the starting and ending wavelengths, and the number of Steps in the
User-Defined frame as shown.
93
CHAPTER 3: THE OPTIGRATING TUTORIAL
5 Click on the Define button next to the Ref/Tran and enter the formula shown
below to define the reflectivity.
6 Click OK.
7 Select the Disp button.
8 Click on the adjacent Define button to define the dispersion.
94
CHAPTER 3: THE OPTIGRATING TUTORIAL
9 Click OK.
95
CHAPTER 3: THE OPTIGRATING TUTORIAL
Step 2
1 Click on Start to reconstruct the grating.
2 Select the Power tab at the bottom of the screen to see the reflected and
transmitted power.
3 Right click the mouse in the graph window to pull down the menu and select
Axis Properties.
4 Select the Left Y axis and uncheck the Show in dB box to show the reflection
in a linear scale.
5 Click OK.
96
CHAPTER 3: THE OPTIGRATING TUTORIAL
Examples
The rest of the Tutorial offers you eight selected examples that you can find in the
\Samples directory. The \Samples directory contains even more examples that are
not described here. You can always have a look at them and read their description by
selecting the Memo tab.
Example 1: FBGApod.ifo
Description
The example demonstrates the effect of apodization on the optical properties of a
fiber grating. A chirpless, sinusoidal Bragg grating has a user-defined average
refractive index and apodization.
97
CHAPTER 3: THE OPTIGRATING TUTORIAL
The main results are the reflection and group delay spectra. Both spectra show a
considerable suppression of sidelobes.
Peaks at the shorter wavelength are caused by the non-uniform DC average index
change.
Example 2: SuperStructure.ifo
Sampled grating
Reference
T. Erdogan, 'Fiber Grating Spectra,' J. Lightwave Technol., vol.15, No.8, pp.1277-
1294, (1997).
Description
The example demonstrates a sampled grating exhibiting periodic superstructure. The
superstructure is a collection of 99 identical gratings and phase shift blocks. The
gratings are uniform and have a uniform average index.
98
CHAPTER 3: THE OPTIGRATING TUTORIAL
The main result is the multi-peak, periodic superstructure of the reflected power
spectrum. If the phase shift blocks were replaced by the gratings, thus producing a
single uniform grating, the resulting spectrum would have a well-known single-lobe
shape (with ripples due to the grating uniformity). That single-lobe spectrum would be
much narrower than the superstructure spectrum.
Example 3: ModeConversion.ifo
Description
The example demonstrates the mode conversion between the LP01 and LP02 mode
in a fiber with Bragg grating. The fiber has four LP core modes. In the example, only
three core modes, LP01, LP02, and LP11, are selected for calculations. The grating
period, 0.21436546 microns, allows the coupling between the forward propagating
LP01 mode and the backward propagating LP02 mode.
The main results are the narrow reflection and transmission spectra showing the
conversion of selected modes.
99
CHAPTER 3: THE OPTIGRATING TUTORIAL
Note: For this example, the file includes all the design data and the calculation
results.
Spectrum
The left-hand side peak is the mode conversion form LP01 mode to backward LP02.
The right hand side peak is the coupling between LP01 mode to its backward mode.
Set the grating tilted angle to 3.0 degrees and click the Calculation button again.
The peak at the middle is the mode conversion from the LP01 mode to the backward
LP11 mode.
Example 4: WBGTransmission.ifo
100
CHAPTER 3: THE OPTIGRATING TUTORIAL
Description
The example demonstrates an InP/InGaAsP planar waveguide filter. The design is
based on five gratings and four phase shifts. The uniform, rectangular-shaped
gratings are placed on the top of the waveguide. The phase shift regions of different
length separate the gratings. The phase shifts, provided by the phase shift regions,
are 0.5, 1.5, 2.5, and 3.5 p, at the central wavelength.
The main result is the transmission spectrum. It shows that the properly chosen
locations and magnitudes of the phase shift regions can tailor the spectrum into a
nearly rectangular shape.
Example 5: LPGGainFlat.ifo
Description
The example demonstrates a fiber grating filter used to equalize the gain of a fiber
amplifier. The LP01 fiber core mode is coupled to the LP08 cladding mode. A two-
grating structure is present in the fiber. The gratings are uniform and have different
period.
The main result is the transmission spectrum of the fiber grating filter. The spectrum
is very close to the inverted gain spectrum of the Erbium doped amplifier.
Consequently, gain flattening can be achieved by introduction of such a filter after the
amplifier section.
101
CHAPTER 3: THE OPTIGRATING TUTORIAL
Example 6: PulseUltrshort1.ifo
Description
The example demonstrates a transform-limited Gaussian pulse reflected from
uniform fiber gratings. The gratings have different index modulation values. You can
change the grating modulation index and compare the calculated results with the
published reference.
1 Index modulation = 4.356e-5. Click the Calculation button and compare the result
(Pict 1) with Fig 1(a) from Reference.
2 Index modulation = 11.616e-5. Click the Calculation button and compare the
result (Pict 2) with Fig 1(b) from Reference.
3 Index modulation = 4.356e-4. Click the Calculation button and compare the result
(Pict 3) with Fig 1(c) from Reference.
4 Index modulation = 1.452e-3. Click the Calculation button and compare the result
(Pict 4) with Fig 1(d) from Reference.
102
CHAPTER 3: THE OPTIGRATING TUTORIAL
The main result is reshaping the reflected pulse. As the grating strength increases,
there is a separation of the reflected pulse into two distinct components.
Pict 1
Pict 2
Pict 3
103
CHAPTER 3: THE OPTIGRATING TUTORIAL
Pict 4
Example 7: PulseUltrshort2.ifo
Description
The example demonstrates a transform-limited Gaussian pulse reflected from
apodized fiber gratings. The gratings are apodized by a Gaussian function and the
same index modulation value of 4.356e-4.
You can change the average index option and compare the results with the published
reference as follows:
2. Uniform Average Index with Index Change 0. Click the Calculation button and
compare the result (Pict 2) with the type B profile of Fig 5(b) from the Reference.
104
CHAPTER 3: THE OPTIGRATING TUTORIAL
The main result is reshaping of the reflected pulse. The structure of the reflected pulse
from the type B grating profile contains considerable regular oscillations, not present
in the type A profile.
Pict 1
Pict 2
105
CHAPTER 3: THE OPTIGRATING TUTORIAL
Example 8: MoireGrating.ifo
Description
The example demonstrates how to simulate the Moiré passband filter with a chirped
and apodized Bragg grating.
The grating has a user defined period chirp defined by the following:
p1=0.53082192
p2=0.5309589
chirp=-1.1e-3/Length
per1=p1+chirp*(x-Length/2)
per2=p2+chirp*(x-Length/2)
2*per1*per2/(per1+per2)
p1=0.53082192
p2=0.5309589
chirp=-1.1e-3/Length
per1=p1+chirp*(x-Length/2)
per2=p2+chirp*(x-Length/2)
2.0*cos(pi*x*(1/per1-1/per2)+pi/2)
106
CHAPTER 3: THE OPTIGRATING TUTORIAL
107
CHAPTER 3: THE OPTIGRATING TUTORIAL
108
CHAPTER 4: USER GUIDE
When you start OptiGrating, you have only three menus to work with: File, View, and
Help. However, when you create a new project or open an existing one, you notice
that there are nine menus that contain all commands you will need to do your work
effectively.
The File menu, shown on the left, allows you to use the following commands:
New
Opens a new project. After selecting the New option, you have the following choices:
Single Fiber, Fiber Coupler, Single Waveguide, Waveguide Coupler, and Other
Waveguide.
Open
Opens an existing project.
Close
Closes the active project. The program prompts you to save changes before closing
the project.
Close All
Closes all open projects.
109
CHAPTER 4: USER GUIDE
Save
Saves the active project under the current name and in the default location.
Save As
Saves the current project with a different name and in a location of your choice.
Save Workspace
Saves all the information in the multiple graph windows, together with the settings and
the size and position of the windows.
Save Template
Saves the active project, with all its settings, as a template and allows you to apply
that template to other projects.
Print
Prints the selected graph.
Print Preview
Gives you a print preview of the selected graph.
Print Setup
Allows you to set up the printer, the page size and orientation, and offers you other
printing options.
Exit
Allows you to exit the program. The program prompts for saving changes to the
projects.
110
CHAPTER 4: USER GUIDE
New
File: New
Using the New Command
The New command gives you access to the five different modules you can work with
in OptiGrating: Single Fiber, Fiber Coupler, Single Waveguide, Waveguide Coupler,
and Other Waveguide. Those five modules have some common parameters, but you
use each module for different purposes.
The Single Fiber module is the most complex one. You use this module when you
want to calculate Material Dispersion and when you want to simulate the coupling
between multiple modes.
When you work with Sensors (Fiber Bragg and Long Period Gratings), you can only
use the Single Fiber modules.
Note: The differences between the five modules are best revealed in the different
options available in the Fiber/Waveguide dialog box.
111
CHAPTER 4: USER GUIDE
Single Fiber
File: New > Single Fiber
You can simulate the grating assisted coupling between forward and backward
propagating modes. There are two mode options available: LP modes or full, vector
modes (HE, EH, TE, or TM) of the fiber. The vector mode option is only available for
step-index fiber. The Single Fiber module finds application in WDM selective and
add/drop filters, dispersion compensators, long period fiber grating filters for EDFA
gain flattening, and sensors.
The Single Fiber Profile dialog box options are described below.
112
CHAPTER 4: USER GUIDE
List of Regions
Shows the index radial regions by their names.
Add
Adds a region to the bottom of the list.
Insert
Adds a region immediately under the highlighted point on the list
Remove
Deletes the selected region from the list
Undo
Left undo arrow deletes previous steps. Right redo arrow replaces deleted steps.
113
CHAPTER 4: USER GUIDE
Up
Moves the selected region one position up the list.
Down
Moves the selected region one position down the list.
Width
Enter the width of the selected region in microns.
Steps
Enter the number of steps for discretization of the index profile function.
Index tab
Real
Select one of the following options for the real index profile within the current region:
Constant - Constant value of the real refractive index
Linear
Parabolic
Gaussian
Exponential
Alpha-peak
Alpha-dip
User Function - Functional dependence of the index, where the function is defined or
programmed using the powerful Script Language environment.
The notation convention for these functions is described in the Technical Background,
section Index Profile of Fibers. Conventionally, the functions' argument is the radial
local distance that is zero at the beginning of the region and is equal to the Width
value at the end of the region.
114
CHAPTER 4: USER GUIDE
Imag.
This option is available when the Real Profile check box is unchecked.
Select one of the following options for the imaginary index profile within the current
region:
Constant - Constant value of the imaginary refractive index
Linear
Parabolic
Gaussian
Exponential
Alpha-peak
Alpha-dip
User Function - Functional dependence of the index, where the function is defined or
programmed using the powerful Script Language environment.
115
CHAPTER 4: USER GUIDE
Type
Select one of the following options for the radial photosensitivity profile within the
current region:
Constant - Constant value of radial photosensitivity
Linear
Parabolic
Gaussian
Exponential
Alpha-peak
Alpha-dip
User Function - Functional dependence of the sensitivity, where the function is
defined or programmed
using the powerful Script Language environment.
Value
Numerical data entry box - Present when the constant radial photosensitivity option is
selected. Enter the radial photosensitivity value for the selected region. See the
definition of photosensitivity in the technical background section.
Define
Present when the Function or User Function option is selected. Press the Define
button to specify the function. For the built-in functions, a dialog box related to one of
the predefined functions appears. For the User Function option, pressing the Define
button launches the User Defined Function script programming environment.
Azimuthal Photosensitivity
Select one of the following options for the azimuthal radial photosensitivity profile
Constant - Constant value of radial photosensitivity
User Function - Functional dependence of the sensitivity, where the function is
defined or programmed using the powerful Script Language environment.
Value - Numerical data entry box - Present when the constant Azimuthal
photosensitivity option is selected. Enter the Azimuthal photosensitivity value for the
fiber.
Steps - Enter the number of steps for discretization of the Azimuthal photosensitivity
profile user function.
116
CHAPTER 4: USER GUIDE
Note: The 'x" variable in the user defined function is the azimuthal angle from 0
to 2p.
Dispersion Enable
Enable the material dispersion model for the current region. The model definition can
be accessed by pressing the Define button in the Dispersion section of the dialog box
(see Material Dispersion dialog box).
Dispersion Global
Assign the global material dispersion model to the current region. The global model
assumes that a fiber is formed by doping the host material with one dopant that raises
the refractive index and another dopant that lowers the index (see Material Dispersion
dialog box ).
Define Dispersion
Opens the Material Dispersion dialog box, where you can assign a material dispersion
model based on the Sellmeier coefficients library. Alternately you can provide a
custom model.
Real Profile
When the index profile is real, check this check box. Otherwise, uncheck it.
Wavelength
Enter the wavelength in microns. This wavelength is considered as the measurement
wavelength. (The wavelength at which the current profile is exact. For other
wavelength values used in the program (for example when scanning over a spectral
range) the profile shape is adjusted accordingly based on the material dispersion
model, if it is enabled.
Mesh
X: Number of points in the transverse cross-section along the X-axis
Y: Number of points in the transverse cross-section along the Y-axis
The modal fields are calculated based on the mesh setting.
Display
Real - When this radio button is selected, the real index profile will be displayed in the
lefthand display window.
λ - When the Enable check box is checked, enter the wavelength, and the real index
profile at this wavelength will be displayed.
Imag. - When this radio button is selected, the imaginary index profile will be displayed
in the left-hand display window.
PS - When this radio button is selected, the radial photosensitivity profile will be
displayed in the left-hand display window.
117
CHAPTER 4: USER GUIDE
Import Profile
Export Profile
Export the real index profile to a text file
The format of the text file is same as the format described in the Import Profile
Apply
Apply the changes made in the dialog box.
118
CHAPTER 4: USER GUIDE
Host
Shows the name of the fiber host material. Press Define to specify the material and
its dispersion model. When the User option is cleared, the Define button activates the
Sellmeier Parameters dialog box. When the User option is checked, the Define button
launches the User Defined Function script programming environment (see the Script
Language section of the documentation).
119
CHAPTER 4: USER GUIDE
Dopant +
Shows the name of the fiber material that has higher index due to an index-raising
dopant. The Define button and the User option work the same way as for the Host
option.
Dopant -
Shows the name of the fiber material that has lower index due to an index-decreasing
dopant. The Define button and the User option work the same way as for the Host
option.
Display From
Enter the minimum wavelength for the dispersion display.
Display To
Enter the maximum wavelength for the dispersion display.
Update
Update the dispersion display after recent changes.
Sellmeier Formula
A1 ⋅ λ 2 A2 ⋅ λ 2 A3 ⋅ λ 2
n ( λ ) – 1 = --------------- + --------------- + ---------------
λ 2 ⋅ λ 12 λ 2 ⋅ λ 22 λ 2 ⋅ λ 32
120
CHAPTER 4: USER GUIDE
Name
Enter the name of the material. If you select the material from the Library list (see Get
below) then the name appears automatically.
A 1, A 2, A 3
Enter the amplitude Sellmeier coefficients.
λ 1, λ 2, λ 3
Enter the wavelength Sellmeier coefficients.
Add
If you entered new material along with its Sellmeier coefficients, you may add it to the
library by pressing the Add button.
Delete
Delete the selected material from the library.
Get
Get the material from the Library list. The library materials are stored in a data base.
Fiber_CAD provides some of the known materials along with the Sellmeier
coefficients.
121
CHAPTER 4: USER GUIDE
With this dialog box, you can specify the following predefined functions of the region’s
local radial coordinate x:
where w is the region width, and n(0), n(w) are the values at x=0 (start) and x=w (end),
respectively. The symbol e denotes the Euler number.
122
CHAPTER 4: USER GUIDE
Start
Enter the start value at the beginning of the region.
End
Enter the end value at the end of the region.
See also the Index Profile of Fibers section in the Technical Background.
Gaussian profile:
2 ⋅ ( x – x0 ) 2
n ( x ) = n max exp – ln 2 ⋅ -------------------------
h⋅w
where nmax is the maximum value, x 0 is the center (peak) position, and h is the
normalized Full Width at Half Maximum (FWHM).
The Gaussian user function dialog box options are described below.
Nmax
Enter the maximum value described by the Gaussian function.
123
CHAPTER 4: USER GUIDE
Norm. FWHM
Enter the normalized Full Width at Half Maximum (FWHM) of the Gaussian function.
Center Position
Enter the peak position of the Gaussian function. The position is measured from the
beginning of the current region.
x α
n ( x ) = n max ⋅ 1 – 2∆ ⋅ ----
w
where, n max is the maximum value and ∆ is the normalized difference. It is defined
as
n max2 – n min2
∆ = -------------------------
-
2n max2
α
n ( x ) = n max ⋅ 1 – 2∆ ⋅ ----
x
w
124
CHAPTER 4: USER GUIDE
The Alpha Power Law dialog box options are described below.
Alpha Value
Enter the alpha power coefficient value.
See also the Index Profile of Fibers section in the Technical Background.
You can find detailed information in the Working With User Defined Options section.
125
CHAPTER 4: USER GUIDE
Settings
In the Single Fiber modes dialog box, you can define the following options under the
Settings tab:
LP Modes
To work with LP modes, click the LPm,n button to enable it and enter the range of the
mode index m (m From to m To) and the maximum value of the mode index n (n Max).
Vectorial modes
To work with vectorial modes, click one of the button (HEm,n EHm,n TE0,n TM0,n) to
enable it and enter the range of the mode index m (m From to m To) and the maximum
value of the mode index n (n Max).
126
CHAPTER 4: USER GUIDE
Recalculate Modes
Press this button to start the mode calculation
Select All
Select all the modes from the mode list
Deselect All
Deselect all the modes from the mode list
Set
Set the current selected mode as input mode
Input amplitude
The amplitude of the selected input mode
Phase
The phase of the selected input mode
View
View and export the modal fields. See 3D Preview of the field dialog box.
Export Index
Export the effective refractive index to a text file.
127
CHAPTER 4: USER GUIDE
Advanced Settings
Under the Advanced Settings tab, you get the following additional choices:
• Choosing Real or Complex will determine which variables you can change.
In the Real option, real solutions will be sought in the interval specified in the Real
From and To fields. The solver will step through this interval in steps of Step Size. In
the Complex option, solutions are sought in a rectangular region of the complex plane
as defined by the From and To fields in both real and imaginary. The Complex option
uses an advanced technique for finding the roots as described in the Technical
Background chapter of the OptiGrating manual.
128
CHAPTER 4: USER GUIDE
Note: You can also access this dialog box from the Fiber Coupler Modes dialog
box.
Component
Enable one of the component buttons: Ex, Ey, Ez, Hx, Hy, Hz. The enabled field
component will be displayed and exported.
Mesh
X - Number of points in the transverse cross-section along X-axis
Y - Number of points in the transverse cross-section along Y-axis
Apply
Apply the changes made in the dialog box.
Export
Export the modal field. The file format is the field *.f3d of BPM_CAD.
The exported 3D Complex Format:
129
CHAPTER 4: USER GUIDE
Propagation
Reflection and transmission along the device.
You can select the number of propagation steps and the signal wavelength. Notice
that the signal wavelength in the Wavelength box can be different from the central
wavelength used in the Single Fiber dialog box. This option allows you to study the
propagation at wavelengths close to the central wavelength. By default, the
wavelength is set equal to the central wavelength.
130
CHAPTER 4: USER GUIDE
Spectrum
Reflection and transmission at the input and output ports of the device within a range
of wavelengths.
Pulse Response
Input pulse intensity spectrum, grating spectrum, output pulse intensity.
131
CHAPTER 4: USER GUIDE
3 In the Input Pulse section, choose either Gaussian or User Defined from the
list box. If Gaussian is selected, you will be able to enter an Intensity FWHM
value in the Intensity box, where FWHM is the Full Width at Half Maximum in
picoseconds.
4 If you want to define the fiber or waveguide Length and Chromatic
Dispersion, enable the Link check box.
5 The Length is measured in kilometers; the Chromatic Dispersion is measured
in picoseconds per nanometer per kilometer.
Note: If you select User Defined from the list box, the Define button is enabled.
When you click it, you will be able to set your preferences in the User Defined
Function dialog box. If you enable the Link check box, you will see two pulses
displayed in the Input tab of the Project window: the input pulse at the beginning
of the fiber link and the input pulse after propagation through the fiber link, but at
the beginning of the grating.
Parameter Scan
The bandwidth, sidelobe, peak value, peak position and dispersion at central
wavelength within the range of the selected grating parameter. OptiGrating allows you
to define the number of calculation steps.
132
CHAPTER 4: USER GUIDE
133
CHAPTER 4: USER GUIDE
7 In the Fiber Bragg Grating Sensor dialog box, define the Strain-optic and the
Thermooptic parameters and the Strain and Temperature options.
8 Click the OK button.
Note: For more details about the parameters available in Fiber Bragg Grating
Sensor dialog box, see the Technical Background section.
In the Long Grating Sensor dialog box, you can define the Strain-optic parameters,
Thermooptic parameters, Cladding, Micro-strain distribution along the grating, and
the temperature distribution along the grating. It is only available for three layer step-
index fibers.
134
CHAPTER 4: USER GUIDE
6 In the Micro-strain section, choose one of the following options from the list
box: Uniform, Linear, Gaussian, or Used Defined.
• Uniform – constant value along the distance
• Linear – linearly-varying with the distance, provides start and end values
• Gaussian – Gaussian-varying along the distance. Gaussian in grating strain and
temperature distributions (See the Technical Background chapter).
• User Defined – when selected enables the Used Function button that opens the
User Defined Function dialog box
7 From the Temperature list, choose one of the following options to define the
temperature distribution along the grating: Uniform, Linear, Gaussian, or User
Defined.
Note: For information about the Strain-optic Parameters, Cladding, and Thermo-
optic Parameters, see the Technical Background chapter.
135
CHAPTER 4: USER GUIDE
You can optimize the coupling between the modes of the two fibers. There are two
mode options available: LP modes or full, vector modes (HE, EH, TE, or TM) of the
fibers. The vector modes option is only available for step-index fiber. The Fiber
Coupler module finds applications in co-directional and contra-directional grating
assisted coupler, direct and exchange fiber Bragg reflectors, and filters.
136
CHAPTER 4: USER GUIDE
The Fiber Coupler Profile dialog box options are described below.
Fiber 1
Select Fiber 1 button to define the profile of fiber 1. The options for fiber 1 are same
as Single Fiber profile (see Single Fiber Profile dialog box).
Fiber 2
Select Fiber 2 button to define the profile of fiber 2. The options for fiber 2 are same
as Single Fiber profile (see Single Fiber Profile dialog box).
Distance
Distance is the width of the shortest common cladding of the coupler.
137
CHAPTER 4: USER GUIDE
Note: To make sure the fiber coupler has common cladding, The outmost regions
of Fiber 1 and Fiber 2 should be defined by constant real index profile with Steps
equal to 1 with same index value.
The options in the Fiber Coupler modes dialog box are similar to the one in the Single
Fiber Modes dialog box.
138
CHAPTER 4: USER GUIDE
139
CHAPTER 4: USER GUIDE
Clicking on either the Fiber 1 or Fiber 2 tabs will bring up the following choices:
• Similar to the Advanced Settings option in Single Fiber Modes, choosing either
the Real or Complex button in the Solver box will determine which variables you
may change.
In the Real option, real solutions will be sought in the interval specified in the Real
From and To fields. The solver will step through this interval in steps of Step Size.
In the Complex option, solutions are sought in a rectangular region of the complex
plane as defined by the From and To fields in both real and imaginary. The Complex
option uses an advanced technique for finding the roots as described in the Technical
Background chapter of the OptiGrating manual.
140
CHAPTER 4: USER GUIDE
Single Waveguide
You can simulate the coupling between forward and backward propagating modes.
There are two mode options available: TE or TM modes of the waveguide. The Single
Waveguide module finds applications in thin-film optical filters, distributed feedback
lasers (DFB), distributed Bragg reflector lasers (DBR), and waveguide Bragg
reflectors.
141
CHAPTER 4: USER GUIDE
Photosensitivity
Type: Select one of the following options for the radial photosensitivity profile within
the current region:
142
CHAPTER 4: USER GUIDE
Value: Numerical data entry box - Present when the constant radial photosensitivity
option was selected. Enter the radial photosensitivity value for the selected region.
Define: Present when the Function or User Function option was selected. Press the
Define button to specify the function. For the built-in functions, a dialog box related to
one of the predefined functions appears. For the User Function option, pressing the
Define button launches the User Defined Function script-programming environment.
Note: The surface-relief grating will be located at the top of the region when the
photosensitivity of this region is not equal to zero. The gratings can only be
located at one waveguide interface. If more than one region is photosensitive, the
grating will be located at the first region (in the region list). The definitions of other
photosensitivity will be ignored.
The definitions of the other Options in this dialog box are same as in the Single fiber
profile dialog box.
In the single Fiber modes dialog box, you can define the following options:
Vectorial modes
TE - Check this option to calculate the Transverse Electric (TE) modes of waveguide
TM - Check this option to calculate the Transverse Magnetic (TM) modes of
waveguide
View
View and export the modal fields. See 2D Preview of the field dialog box.
Recalculate Modes
Press this button to start calculate modes
Select All
Select all the modes from the mode list
Deselect All
Deselect all the modes from the mode list
Set
Set the current selected mode as input mode
Input amplitude
The amplitude of the selected input mode
143
CHAPTER 4: USER GUIDE
Phase
The phase of the selected input mode
Export Index
Export the effective refractive index to a text file.
144
CHAPTER 4: USER GUIDE
145
CHAPTER 4: USER GUIDE
By selecting the Advanced Tab in the Single Waveguide Modes window, you will see
the following choices:
• Similar to the Advanced Settings option in Single Fiber Modes, choosing either
the Real or Complex button in the Solver box will determine which variables you
may change.
In the Real option, real solutions will be sought in the interval specified in the Real
From and To fields. The solver will step through this interval in steps of Step Size.
In the Complex option, solutions are sought in a rectangular region of the complex
plane as defined by the From and To fields in both real and imaginary. The Complex
option uses an advanced technique for finding the roots as described in the Technical
Background chapter of the OptiGrating manual.
146
CHAPTER 4: USER GUIDE
Note: You can also access this dialog box from Waveguide Coupler Modes dialog
box.
Component
Enable one of the component buttons: Ex, Ey, Ez, Hx, Hy, Hz. The enabled field
component will be displayed and exported.
Mesh
Number of points in the transverse cross-section along Y-axis
Apply
Apply the changes made in the dialog box.
Export
Export the modal field. The file format is the field *.f2d of BPM_CAD. The exported 2D
Complex Format:
147
CHAPTER 4: USER GUIDE
2D complex format:
BCF2DCX - File Header
N - Number Of Data Points
W - Mesh Width (µm)
Waveguide Coupler
You can simulate the coupling between modes of the two waveguides. There are two
mode options available: TE or TM modes of the waveguide. The Waveguide Coupler
finds applications in waveguide co-directional and contra-directional couplers, direct
and exchange waveguide Bragg reflectors, and in filters.
148
CHAPTER 4: USER GUIDE
Waveguide 1
Select Waveguide 1 button to define the profile of waveguide 1. The options for
waveguide 1 are same as Single Waveguide profile (see Single Waveguide Profile
dialog box).
Waveguide 2
Select Waveguide 2 button to define the profile of waveguide 2. The options for
waveguide 2 are same as Single Waveguide profile (see Single Waveguide Profile
dialog box).
Distance
Distance is the width of the common cladding of the coupler.
Note: To make sure the waveguide coupler has common cladding, The last
region of Waveguide 1 (Point A) and the first region of Waveguide 2 (Point B)
should be defined by constant real index profile with Steps equal to 1 with same
index value. The width of the last region and the first region of Waveguide 2 are
not important, as the sum of these widths is replaced by Distance.
149
CHAPTER 4: USER GUIDE
The options in the Waveguide Coupler Modes dialog box are similar to the ones in the
Sin-Waveguide Modes dialog box.
150
CHAPTER 4: USER GUIDE
151
CHAPTER 4: USER GUIDE
152
CHAPTER 4: USER GUIDE
• Similar to the Advanced Settings option in Single Fiber Modes, choosing either
the Real or Complex button in the Solver box will determine which variables you
may change.
In the Real option, real solutions will be sought in the interval specified in the Real
From and To fields. The solver will step through this interval in steps of Step Size.
In the Complex option, solutions are sought in a rectangular region of the complex
plane as defined by the From and To fields in both real and imaginary. The Complex
option uses an advanced technique for finding the roots as described in the Technical
Background chapter of the OptiGrating manual.
9 Click OK.
Other Waveguide
153
CHAPTER 4: USER GUIDE
Input Mode
Effective Index Real - The real part of the modal index of the input mode
Effective Index Imaginary - The imaginary part of the modal index of the input mode
Overlap Integral - The overlap integral value of the input mode in the grating region.
The Overlap Integral in the Input Mode panel is the overlap integral of the input field
with itself. This quantity is also called Confinement Factor.
Real - Check this box when the effective index is pure real. Otherwise uncheck this
box.
Add
If only the Input Mode panel contains data, then the simulation will be for a single
mode waveguide that has a single transmission and reflection spectrum. If the
waveguide has more than one mode, and the grating causes coupling among the
forward and backward directions in those other modes, the software will need more
data to define the parameters of the additional modes. This button allows you to add
the information about a new mode by adding an item at the end of the mode list.
Insert
This button allows you to insert a new line for mode information before the current
selected line.
154
CHAPTER 4: USER GUIDE
Edit
This button allows you to edit the selected line.
Delete
This button is used to delete a selected line.
Delete All
This button deletes all the items in the mode list.
Mode Name
Name of the mode in the mode list.
Overlap Integral
In the mode list, the Overlap integral (OLI) is the overlap integral value between the
mode in the mode list and the input mode, where the integral is evaluated over the
grating region.
OLI = ∫ ∫ E x, y )E ( x, y ) dx dy
1 2
Ω
Ω is the region in the transverse (x,y) plane occupied by the grating. E 1 and E 2
are the mode field patterns of the input mode and the higher order mode and both are
normalized to unity i.e
∞ ∞
1 = ∫ ∫ E 1, 2 ( x, y ) 2 d x d y
– ∞ –∞
Note that the Overlap Integral in the Input Mode panel is the overlap integral of the
input field with itself. This quantity is also called Confinement Factor.
155
CHAPTER 4: USER GUIDE
Open
File: Open
.IFO
OptiGrating data files (those from IFO_Gratings 1.0, IFO_Gratings 2.0, IFO_Gratings
3.0, and IFO_Gratings 4.0) have an .ifo extension.
.IWS
All workspace files (see Save Workspace) are saved with this extension. In each
Workspace file, there is also at least one .ifo file. A workspace file has only a link to
an .ifo data file. It does not contain any .ifo data; it contains all the information about
the file you open and the number and the location of the windows. The .ifo data files
are the files containing all the data and without them .iws files are useless.
Note: If you distribute an . iws file, you also need to distribute all .ifo files which
the .iws file uses. If you save an .iws file in the folder the .ifo files use, the .ifo file
names inside the .iws file will be saved without a path.
.TPL
The .tpl files are template files, much like workspace file, but they don’t contain coded
.ifo data files; instead, template files ask you to open any .ifo data file you like.
156
CHAPTER 4: USER GUIDE
To open a file
1 File > Open.
2 In the Open dialog box, choose a type of file from the Files Of Type list box.
3 In the File Name box, write the name of the file you want to open or use the
Browser button to find the file you want to open.
4 Click the Open button.
Save Worksapce
File: New > Module option > File: Save Workspace
The Save Workspace command
OptiGrating allows you to clone views, i.e. to use multiple graph windows. You can set
the size and the position of each window on the screen according to your preferences.
The Save Workspace command allows you to save not only the settings but also all
the information in each window for future use. Therefore, each workspace file
contains at least one .ifo file.
In the Save Workspace dialog box, you have to name the file and save it with an .iws
extension. Then, you may be asked to save changes in your .ifo file. If you haven't
assigned a name to your .ifo file yet, you will be asked to do so.
To save a workspace
1 File > New.
2 In the New dialog box, choose one of the Module options.
3 From the File menu, click Save Workspace.
4 In the Save Workspace dialog box, type the name of the file in the File Name
box.
5 From the Save As Type list box, choose IFO Workspace (.iws).
6 Click the Save button.
Undo
Reverses one or more of your last commands. You can use Undo only when you are
in Memo mode, i.e. only when you are copying text. (View: New > Memo).
157
CHAPTER 4: USER GUIDE
Status Bar
When enabled, displays the Status Bar; when disabled, hides the Status Bar. The
Status Bar is placed at the bottom part of the user interface. It gives you different
prompts and tells you where to find help.
Toolbars
Allows you to display and hide the following toolbars: Graphic, Parameters, Window,
Main. When an option is enabled, the appropriate toolbar is displayed; when an option
is disabled, the toolbar is hidden.
New
Allows you to display and hide eight views which can all be displayed in the Multiple
View window.
158
CHAPTER 4: USER GUIDE
Five of the View windows - Power, Phase, Delay, Dispersion, Scan and Profile - offer
graphic views and give you different graphic results. The Input View allows you to
enter calculation options while the Memo View enables you to write some comments
about the graph or project you are working with.
If you “clone” all views listed in the New submenu shown above (View > New), they
will become separate windows instead of being docked in a multiple window. You will
then be able to size and position them in a workspace.
You can also clone the Multiple View window, and you can have more than one of
each window. To clone all views, i.e. to undock them from the Multiple View window,
click the All Views button.
Note: You can also clone an active view, a view you are currently using, by
clicking the Open Active View but on on the toolbar. When you are cloning a view,
the cloned window is not separated from the document. Since all cloned windows
share the same document, if you change your calculation options, all cloned
windows will be redrawn according to your changes.
You will notice that the window's options change according to the type of calculation
performed: Propagation, Spectrum, and Pulse Response.
Note: You can also open the Input View window in a separate window by clicking
anywhere in this window and pressing the Open Active View button on the
Toolbar.
159
CHAPTER 4: USER GUIDE
Run
To perform your Calculation, Spectrum, and Pulse Response calculations, just click
either Run from the Calculation menu or the Run button on the Toolbar.
In the dialog box that opens, you can see when the calculation is completed.
Scan
To solve the inverse scattering problem of Bragg gratings. The method is based on a
layerpeeling algorithm. See the Technical Background chapter of the OptiGrating
manual for details.
160
CHAPTER 4: USER GUIDE
161
CHAPTER 4: USER GUIDE
From
The starting wavelength.
To
The ending wavelength.
Steps
The Steps field indicates the number of divisions used in the specified wavelength
range.
162
CHAPTER 4: USER GUIDE
Ref/Tran Define
Brings up a dialog box for defining the target reflectivity spectrum as seen below:
• Click on Display to plot the curve shown. The desired impulse response will be
calculated from the Fourier transform of the reflection coefficient.
Length
This is the length of the grating.
From File
Enable this checkbox and define a path to a file which contains a complex reflection
spectrum. The algorithm will try to find a grating that has this spectrum.
Segments
The grating length is divided into this number of segments. Each segment has a
constant coupling coeffiecient
Over Sample
Over Sample is used in the reconstruction ofthe truncated impulse response.
Accuracy is sometimes improved by using finer steps in the spectrum.
163
CHAPTER 4: USER GUIDE
Causality
Clicking on this button will display the impulse response calculated from the spectrum
the user has defined.
• Because of causality, any real impulse response must be zero for negative
arguements.
Note: You can experiment with various delays by entering other numbers in the
Linear Phase Shift field, and clicking the Impulse Response to see the result.
Start
Clicking on start begins the reconstruction. A progress bar indicates the progress of
the layer peeling algorithm. When this process finishes, the reconstructed grating
profile is used to generate the spectrum of the new grating. A second progress bar
displays the progress of the calculation of the spectrum
Fiber/Waveguide
Depending on which module you calculate, the Fiber/Waveguide command gives you
the basic parameters about fiber or waveguide profile, including refractive index
profile, Photosensitivity profile.
164
CHAPTER 4: USER GUIDE
Mode
Shows a list of supported modes for entered Fiber/Waveguide Parameters.
Grating
Opens the Grating Manager. In the Grating Manager dialog box, you add gratings,
phase shifts, and change data.
Dispersion
The material and waveguide dispersion are included for the selected calculation.
Grating Manager
File: New > Module option > Parameters: Grating
Note: You can also open the Grating Manager dialog box by clicking the Grating
button in the Grating Manager dialog box.
165
CHAPTER 4: USER GUIDE
Those buttons allow you to add an item (a grating or a phase shift) that uses the
default values at the end of the list.
When you click the Grating button in the Grating manager dialog box, and then click
the Edit Item button, the Grating Definition dialog box opens.
When you click the Add Phase Shift button, the Phase Shift dialog box opens, and
you can define the phase shift between the gratings. To do so, enable the Phase
button, click the Edit Item button to open the Phase Shift box, type a value in the
Phase box, and click the OK button.
Those buttons allow you to copy and delete multiple items from the list.
The copied objects are added at the end of the list and stay selected so that if you
want to copy the same selection of items again, you just have to press the Copy
button. Thus, you can easily create a fiber/waveguide that consists of hundreds of
grating objects. When copying a grating, you have to specify its parameters in the
Grating Definition dialog box.
Use the Delete Selected Items button to delete multiple grating objects, but remember
that there should be always one object left in the list (so that the structure can exist).
Therefore, if you have selected all objects and try to delete all of them, the first one
will always stay.
Undo Copy/Delete
166
CHAPTER 4: USER GUIDE
Redo Copy/Delete
Those buttons allow you to move an item up and down the list. You can move only
one object at a time.
Those two buttons allow you to select and deselect all objects listed.
Edit Item
Opens the Grating Definition dialog box in which you can set many grating
characteristics.
167
CHAPTER 4: USER GUIDE
3 In the Order box, type an integer value for the order of the grating.
4 In the Tilt Angle box, type a value for the tilt angle.
5 From the period list box, choose a grating period that matches the co-
directional or contradirectional coupling condition.
Surface Grating. Check this checkbox when you want to define a surface relief
waveguide grating.
Tilt Angle. Define the tilt angle of the grating (in degrees).
Note: For a given set of modes the program suggests period values that match
the coupling conditions. If you enable the Auto check box, you won't be able to
enter a period value other than the suggested one. To enter your own value of the
period, disable the Auto check box.
Apply. Press this button to re-calculate the default grating periods based on the
entered Order and Tilt angle values.
Grating Shape. The Grating Shape list box allows you to choose one of the following
options for the modulation of the grating shape: Sine, Rectangle, from file, or User
Defined.
Average Index. The Average Index list box allows you to choose one of the following
options: Uniform, Linear, From File, or User Defined.
Period Chirp. The Period Chirp list box, offers you the following options: Linear,
Quadratic, Square Root, Cubic Root, From File, and User Defined.
168
CHAPTER 4: USER GUIDE
Note: Period chirp is defined as a variation of the grating period along the
distance. The total chirp is defined as the difference between the first and the last
grating period.
Apodization. The Apodization list box allows you to use one of the following options
for varying modulation of the grating: Uniform, Gaussian, Hyperbolic Tangent, From
File, and User Defined.
Length. In the Length box, you define the grating's length. Enable the Autocorrect
check box to ensure that the grating has an integer number of full periods.
Ind. Mod. In the Index Modulation box, you define the amplitude of the index
modulation of the grating.
Height. In the Height box, you define the height of the surface relief grating. The
height modulation, measured in microns, is used for surface relief gratings in the
Single Waveguide and Waveguide Coupler modules.
Shift. In the Shift box, you enter the value that shifts the origin of the grating shape
function forward. The shift is measured in grating periods. For example, a value of
0.25 shifts the origin of the shape for a quarter of a period, i.e. the grating's shape
becomes the cosine function.
Number Of Segments. In the Number Of Segments box, you enter the number of
subdivisions for the Transfer Matrix Method. For example, the non-uniform grating
can be divided in 10 uniform segments.
Sensor. Check this check box to define sensor parameters. You enable the Sensors
check box only when you are working with the Single fiber module.
Note: When you choose the From File option, the program invokes a spreadsheet
utility, and you can define the data table or read an external data file.
From File
The From File option exists in four of the list boxes in the Grating Definition dialog box
(in the Grating shape, the Average Index, the Period Chirp, and the Apodization list
boxes).
When you read From File data concerning average index, chirp or apodization (not
the grating shape), the program opens a table in which you can enter your data
manually or load an external file:
169
CHAPTER 4: USER GUIDE
Note: You can add and remove rows by clicking the Add Row and Remove Last
Row buttons. You can also save your table or open an external file.
To use the From File option to load the grating shape from an external file
1 Parameters > Grating.
2 In the Grating Manager, select a grating object and click the Edit Item button.
3 In the Gratings Definition box, from the Grating Shape list boxes, choose
From File.
4 Press the Define button at the right hand of Grating Shape list.
5 In the Open dialog box, define the file name and the type of file you want to
open and click the Open button.
Two Columns - If the file has two columns, the first column is the position along the
grating length (for Average Index, period chirp, and Apodization) or the position along
a single period (For Grating Shape). The second column is the defined Grating
Shape, Average Index, Period Chirp, or Apodization value.
One Column – In this case, the column is the defined Grating Shape, Average Index,
Period Chirp, or Apodization value. It is assumed that the defined data are uniformly
distributed.
170
CHAPTER 4: USER GUIDE
User Defined
The User Defined option is available in four of the list boxes - Grating Shape, Average
Index, Period Chirp, Apodization - in the Grating Definition dialog box. You can define
functions that determine the shape, chirp, and apodization of the grating. A special
environment provides you with the necessary tools to edit the function.
Let's say that you want to use the User Defined option to define the Apodization
function. Follow step 1 and 2, described in the above procedure, and from the
Apodization list box, choose User Defined to open the User Defined Functions dialog
box. The User Defined Function dialog box is split into two: the editing area and the
display area.
In general, the User Defined function has one independent variable, called x, which
has the following ranges:
The x-variable is called the global variable. Other global variables related to the
grating are the Grating Length and Period. You can use them in your function.
171
CHAPTER 4: USER GUIDE
s=4
tanh(s*(x/Length))*(tanh(s*(1-x/Length)))
172
CHAPTER 4: USER GUIDE
There are three combo boxes. Each of them contains an icon and a list of options, as
shown in the example on the left.
The icon on the left side of any combo box is for inserting a selected item into the text
(at the cursor position). The list of options in the first combo box contains all constants,
in the second one all functions, and in the last one the actual global variables. Usually
x is a variable that varies in the x direction.
The question marks on the right side of the first and the second combo box will give
you a short help about a constant or a function. (Usually a value in constant and
syntax in function.)
You use the Display Steps box for testing. In this box, you type the number of points
you will calculate when you press the Display button in the display area. The number
you type in this box is not the number of points this function will calculate in a real
calculation. To do the calculation, just press the OK button in the display area.
The User Defined Function program editor allows you to Debug and Run (Display) the
program.
Run, the "!" button, has exactly the same function as the Display button. It is put on
the Toolbar for convenience.
Debug. You can not only run your program but also debug it. If the function is not
simple, i.e. it may have an IF - THEN structure for example, and gives you bad results,
you can easily debug your program by pressing the Debug button and following the
prompts.
In that case, you will see two new windows. The first one contains the Source Code
and shows you where you are in debugging; the second one contains a list of all
global (system defined) and local (defined by you) variables.
173
CHAPTER 4: USER GUIDE
Since in most cases, the variable values of x in those boxes are real, it is advisable
that you don't change them. Only in Pulse calculation, when the Input Pulse is User
Defined and the Peak is set to 0, you may want to change the From and To range. To
change the range, just click the desired box (if it is disabled, it will be enabled) and
enter your parameters.
If you enable the Progress check box, you will be able to see the Progress Bar while
the program is running. To perform this, you have to enable the Progress check box
and press the Display button.
You may want to disable the Progress check box if you are using some output
windows or FOR - NEXT loops that will give you many Progress/Message bars.
You can load or save any functions to disk as a separate text so that you can build
your own library of new functions.
Note: After you have explored all the options in the User Defined Function dialog
box, click the OK button to accept the definition and return to the Grating
Definition dialog box. For more information, see the Appendix A.
174
CHAPTER 4: USER GUIDE
FWHM Tools
Automatically calculates the Full Width At Half Maximum (FWHM) of the current.
Group Delay
Automatically calculates the group delay slope, GDD, and ripple.
Phase
Selects the Phase Display mode when you are working with Phase graphs. You can
toggle between the Circular Phase display and the Cumulative Phase display.
Profile
Selects the mode of the Grating Profile display when you are working with Profile
graphs. You can toggle between the display of Shape, Chirp, and Apodization.
Export Curve
Exports a graph curve into one of the following two formats: Text or BPM_CAD View
2D.
View Data
Displays the Data table.
Crossection Monitor
Displays a 2D cut from a 3D Propagation graph.
175
CHAPTER 4: USER GUIDE
Comparison
‘Curve load...’: Reads data from a file and plots the data on the current view
‘Curve clear’: Clears the curve created by the ‘Curve Load’ option.
Note: You can also get access to some of the Tools menu by double clicking a
graph with the left mouse button.
FWHM
File: New > Module option > Tools: FWHM
176
CHAPTER 4: USER GUIDE
Note: The curve to be recalculated is the first visible curve in the graphic window.
If you would like to measure another curve, you have to disable the rest of the
curves by using the color buttons on the Toolbar.
FWHM Tools enables you to measure the width, slope, ripple factor, and sidelobes of
a curve. The tools are most useful to characterize curves in the spectral domain;
however, they can also be used to measure curves in the time domain.
Note: The definitions below refer to a typical reflection curve with a central peak
surrounded by sidelobes and ripples. In characterizing a typical transmission
curve with a pronounced main minimum instead of a main peak, one should re-
interpret the definitions accordingly: maximum becomes minimum, etc.
Bandwidth
By default, when the At option is not selected, the bandwidth is defined as the full
width at half maximum (FWHM). In the selected graph region, the vertical offset from
the bottom is excluded from this default measurement. If the At option is selected, the
bandwidth is defined as the full width at the given height.
177
CHAPTER 4: USER GUIDE
Slope
The slope is defined as the first derivative of the curve at a given position. There are
two default horizontal positions for the slope measurement. They are determined by
the cross-section of the curve and the horizontal line used to measure the bandwidth.
Peak
Peak Position is the horizontal position of the maximum value.
Peak Value is the maximum value of the curve.
Ripple Factor
Ripple Factor is defined by:
Y max – Y min
RippleFactor = -------------------------
-
Y max + Y min
where Y max is the maximum value of the curve, Y min is the minimum value of the
curve in the selected region. The best way to determine the ripple factor is to limit the
selected region to the ripple section only, that is, excluding the main peak.
Sidelobe
Sidelobe is defined as the maximum peak outside the main peak.
Sidelobe L is the left sidelobe
Sidelobe R is the right sidelobe
Sidelobe Position is the horizontal position of the sidelobe maximum
Sidelobe Value is the value of the sidelobe maximum
Group Delay
The Group Delay tool is used for grating dispersion management.
178
CHAPTER 4: USER GUIDE
Spectrum Range
Set the wavelength delay range in the From and To boxes. This allows for more
freedom when determining where the delay begins and where it ends as indicated by
the vertical black lines. Click Recalculate to see changes
Bandwidth Level
To activate, select box to left of Bandwidth Level. This offers a close approximation of
the beginning and end points of the delay. You may enter different bandwidth levels
in right-hand box to further refine selection. Click Recalculate to see changes.
179
CHAPTER 4: USER GUIDE
Export Curve
File: New > Module option > Tools: Export Curve
Using the Export Curve Command
The Export Curve command allows you to export a graph curve into a text format or
a BPM, CAD View 2D format.
0.000000e+000 1.000000e+000
8.313872e+001 9.999998e-001
1.662774e+002 9.999993e-001
2.494162e+002 9.999984e-001
.....
The BPM_CAD native format (*.dat) is almost the same as the Text format, but it
contains additional information, such as the number of points (in the example below,
there are 501 points) in header:
BCF2DPC
501
0.000000e+000 1.000000e+000
8.313872e+001 9.999998e-001
1.662774e+002 9.999993e-001
2.494162e+002 9.999984e-001
180
CHAPTER 4: USER GUIDE
Crossection Monitor
File: New > Module option > Tools: Crossection Monitor
Using the Crossection Monitor command
1 Click the graph you are currently working with.
2 From the Calculation list box, choose Propagation.
3 In the graph window, click the 3D tab.
4 From the Tools menu, click Crossection Monitor to open the Crossection
Monitor dialog box.
5 Click the 3D graph with the left mouse button and holding down the button
drag the mouse in x direction until you see a cutting line and a cross section
appearing in the graph window.
Note: You can resize the Crossection Monitor dialog box to suit your preferences.
If you click the right mouse button at the cross section of the coordinates displayed in
the Crossection Monitor dialog box, a pop-up menu opens which allows you to use
the Normalize To Maximum command or the Print command.
The Normalize To Maximum command will maximize the Crossection Monitor dialog
box, and you will be able to see the graph in detail.
181
CHAPTER 4: USER GUIDE
The Settings menu gives you a fast and easy access to the General and Display
Settings dialog boxes and to the Profile Palette.
General Settings
File: New > Module option > File: Settings > General
Using the General Settings command
The General Settings command allows you to define the general settings you will use
in the selected graph display. It opens the General Settings dialog box in which you
can define the following characteristics: Color, Viewport Border, General Caption, and
Digit Font Size.
General Caption
Gives you options for the horizontal X-axis of the graphical display.
Note: You can save the display data to the *.ifo data file if you enable the
appropriate check box.
182
CHAPTER 4: USER GUIDE
Note: There are numerous symbols supported by the program. They include
Greek symbols, mathematical symbols, and special symbols. To display a
symbol, enter the symbol name preceded by a backslash: \symbol name. For
example, to display the Greek symbol λ , enter \lambda. The backslash affects
only the next symbol name. However, the symbol name must be separated from
the following character by a space. For example, to display µm, enter \mu m.
Display
File: New > Module option > Settings: Display
Using the Display Command
The Display command allows you to define the display settings you will use in
OptiGrating. The Display command opens the Display Properties dialog box in which
you have two options: changing the Y caption and changing the title of your
calculations.
183
CHAPTER 4: USER GUIDE
Note: The X captions are common for all calculations. You can change them in
the General Settings dialog box.
The resampling will speed up your 3D Propagation display, but it won't affect your
calculation. Even if you calculate 500 points in the propagation direction, you will see
that the graph will be re-sampled according to the value specified in the 3D Graph
Properties dialog box.
3 In the 3D Graph Properties dialog box, type the number of points for
resampling in the X direction.
4 Click the OK button.
Note: To access the 3D Graph Properties dialog box, you can also click the graph
with the right mouse button and from the pop-up menu select Display Options.
184
CHAPTER 4: USER GUIDE
Profile Palette
File: New > Module option > Settings: Profile Palette
Using the Profile Palette Command
The Profile Palette command becomes available in the Settings menu when you are
working in the Profile or in the 3D Propagation window. You can choose one of the
following predefined palettes: Rainbow, Gray Scale, Red, Green, and Blue.
3 In the Palette Selection dialog box, click one of the five buttons – Rainbow,
Gray Scale, Red, Green, or Blue – to enable it.
4 Click the OK button.
Note: If you are going to print a 3D graph on a black and white printer, it is
advisable that you select the Gray Shade palette option.
185
CHAPTER 4: USER GUIDE
Cascade
Cascades the existing windows.
Tile
Tiles the existing windows.
Arrange Icons
Arranges icons of existing windows.
Next
Makes the next window active.
186
CHAPTER 4: USER GUIDE
Help Topics
Displays the OptiGrating Help topics.
About OptiGrating
Displays the information about the current version of the program.
System Info
Displays the information of your computer.
187
CHAPTER 4: USER GUIDE
Notes:
188
APPENDIX A: SCRIPT LANGUAGE FOR USERDEFINED FUNCTIONS
The script language OptiGrating 4.2 uses is a programming language based on the
BASIC language syntax. You use the script language to define the shape, chirp, and
apodization of a grating. To enter this definition, you have to choose the User Defined
option.
Examples:
Valid variable names: a, pos, lambda, width1
Invalid variable names: *a, _pi, IF, RETURN
Note: Comment lines in the editing area are preceded by the double slash symbol //.
Arrays
You can use only one-dimensional arrays. You do not have to declare an array before
using it. For the array index, you can use a positive or a negative integer. The usage
format is array_name[index].
Examples:
A[2]
B[-3]
a[x]=x*2
Mathematical Operators
OptiGrating supports the following standard mathematical operators. (listed in
decreasing priority):
^ power
* multiplication
/ division
+ addition
- subtraction
189
APPENDIX A: SCRIPT LANGUAGE FOR USERDEFINED FUNCTIONS
Boolean Operators
OptiGrating supports the following standard Boolean operators.
= equal to
< less than
> more than
& and
| or
Examples:
A=b
A<b
B&c
C|d
Comparison Operators
The Comparison operators can be combined:
a<=b; a<>b; a=>b
Examples:
IF is a command
If or if can be a variable
The script language has a set of commands and control statements. However, not all
of them are needed to define user shape, chirp, and apodization. Therefore, here is a
list of the commands useful in OptiGrating.
Syntax: RETURN[expression]
Example 1:
A program with only one line (you don’t have to specify RETURN)
sin(3)*24+13*(2+6)
RETURN sin(3)*24+13*(2+6)
190
APPENDIX A: SCRIPT LANGUAGE FOR USERDEFINED FUNCTIONS
Example 2:
Consider the program:
cp = 100
a = Length-x
IF x<cp THEN
RETURN x
ELSE
RETURN a
The above program returns x if x is less than 100. Otherwise, it returns Length-x if x
is larger or equal than 100.
Example 3:
Let’s modify the previous example, Example 2, as follows:
cp = 100
a = Length-x
IF x<cp THEN
b=x
ELSE
b=a
RETURN b
This example gives the same result as Example 2. The difference is that another
variable b is used instead of returning the value of a directly.
The IF Statement
The IF statement controls conditional branching. The body of an IF statement is
executed if the value of the expression is nonzero. The syntax for the IF statement
has two forms.
In both forms of the IF statement, the expressions, which can have any value, are
evaluated, including all side effects.
In the first form of the syntax, if expression is nonzero (true), the statement is
executed. If expression is false, statement is ignored. In the second form of syntax,
which uses ELSE, the second statement is executed if expression is false. With both
forms, control then passes from the IF statement to the next statement in the program.
Examples:
The following are examples of the IF statement:
191
APPENDIX A: SCRIPT LANGUAGE FOR USERDEFINED FUNCTIONS
In this example, the statement y = x/i is executed if i is greater than 0. If i is less than
or equal to 0, i is assigned to x.
For nesting IF statements and ELSE clauses, use BEGIN – END to group the
statements and clauses into compound statements that clarify your intent. If no
BEGIN - END are present, the interpreter resolves ambiguities by associating each
ELSE with the closest IF that lacks an ELSE.
The ELSE clause is associated with the inner IF statement in this example. If i is less
than or equal to 0, no value is assigned to x.
IF i > 0 THEN
BEGIN /* With BEGIN - END */
IF j > i THEN
x=j
END
ELSE
x=i
The BEGIN - END enclosing the inner IF statement in this example makes the ELSE
clause part of the outer IF statement. If i is less than or equal to 0, i is assigned to x.
The constant returns the error code (if any) and in cases of mathematical errors
(division by zero, overflow, etc.) resets the error flag. This allows you to detect any
unexpected errors during calculation. The best example is to use the ERROR
command in the IF-THEN-ELSE statement.
Example 1:
The following one-line program
Length /x
Example 2:
Consider the program:
192
APPENDIX A: SCRIPT LANGUAGE FOR USERDEFINED FUNCTIONS
b=Length/x
IF ERROR THEN
b=100;
RETURN b
Now, whenever we have a mathematical error, b is set to 100 and the program will
continue without the error message.
ERROR is a constant, and you cannot assign any other value to it.
Example:
S =7
IF FIRSTTIME THEN
RETURN 100
RETURN x*s
Syntax:
INPUT variable
INPUT “string” variable
INPUT “string” variable = init value
Example INPUT
Usage of INPUT is limited. Because in OptiGrating you use user defined functions
usually in a loop, INPUT will ask you to input data every time you repeat the loop
(usually more than 100 times). To avoid this and to avoid redundant programming (IF
FIRSTTIME THEN ...), use the function GINPUT (general input), which will ask you
for input data only the first time you enter the loop.
INPUT variable
INPUT “string” variable
INPUT “string” variable = init value
193
APPENDIX A: SCRIPT LANGUAGE FOR USERDEFINED FUNCTIONS
Example:
b=1
MAX = 8
INPUT “Factorial of:” MAX
......
b=1
INPUT “Factorial of:” MAX = 8
You will be asked to type a value in the Factorial Of box in the Input window.
Note: The initialization of MAX before INPUT is not necessary. If you delete the
line MAX = 8, the default value in the Input box will be 0.
Example GINPUT
GINPUT variable=init value
GINPUT “string” variable = init value
(general input)
Example:
s=4
tanh(s*(x/Length))*(tanh (s*(1-x/Length)))
Because each grating length is divided into a number of steps (let’s say 25), this
function will be called more than once per grating (25 times).
In the Apodization function, you have one parameter “s” for changing the shape of the
apodization function. If you want to test different shapes, you will need to change the
value for each calculation. Instead of going through all dialog boxes and buttons to
reach the User Function dialog box, whenever you want to change “s”, you can use
the GINPUT function:
194
APPENDIX A: SCRIPT LANGUAGE FOR USERDEFINED FUNCTIONS
You will be asked to input different “s” values each time you press the Calculation
button. Thus, you will be able to try different apodization shapes very quickly and
easily.
Constants
Mathematical Constants
pi 3.14159265358979323846
e 2.71828182845904523536
Physical Constants
_c 2.9979e8 m/s Speed of light in free space
_e 8.8542e-12 F/m Permittivity in free space
_mi 4*pi*10e-7 H/m Permeability in free space
_q 1.60219e-19 C Elementary charge
_me 9.1095e-31 kg Free electron mass
_u 1.660531e-27 kg Atomic mass unit
_mp 1.672614e-27 kg Proton rest mass
_mn 1.674920e-27 kg Neutron rest mass
_eV 1.60219e-19 J Energy unit (electron-volt)
_h 6.626e-34 Js Planck constant
_hr 1.05459 e-34 Js Reduced Planck Constant
_lc 2.4263096e-12 m Compton wavelength of electron
_Ry 13.6058 eV Ryberg energy
_ri 1.09737312e7 1/m Rydberg constant
_kT 25.853 meV Thermal energy
_NA 6.022045e23 Avogadro number
_f 9.648 6e4 C/mol Faraday constant
_a 7.297351e-3 Fine structure constant
_a0 5.2917715e-11 m Bohr radius
_re 2.817939e-15 m Electron radius
_mb 9.274096e-24 J/T Bohr magnetron
_kB 1.3807e-23 J/K Boltzmann constant
_sb 5.66961e-8 Stefan-Boltzmann constant
195
APPENDIX A: SCRIPT LANGUAGE FOR USERDEFINED FUNCTIONS
Functions
Commonly Used Functions
sin(radian) sine
asin({0..1) radian
sinh(x) hyperbolic sine of x
cos(radian) {0..1}
acos({0..1}) radian
cosh(x) hyperbolic cosine of x
tan(radian) {0..inf}
atan({0..1}) radian
exp(x) e^x
ln(x) log in base e
log(x) log in base 10
deg(rad) radians into degrees
rad(deg) degrees into radians
fact(x) x factorial (x!)
sqrt(x) square root of x
pow(x,n) x^n
Other Functions
min(a,b) =a if a<b else b
max(a,b) =a if a>b else b
comb(n, k)= number of combinations for k object , n - total number of objects (n>=m),
return 0
if error
perm(m, n) =permutation mPn (0 if error)
gcd(a, b) = Greatest Common Divisor between a & b
lcm(a, b) = Largest Common Multiple between a & b
frc(x) = fractional part of 'x'
int(x) = integer part of 'x'
angle(x,y) Computes angle from Cartesian position (x,y), angle defined positive if y
>0 and
negative if y < 0
randrand(MaxNum) => Randomize {0..MaxNum}
Fresnel Integral
fresnel_s(x) = Fresnel Integral SIN
fresnel_c(x) = Fresnel Integral COS
196
APPENDIX A: SCRIPT LANGUAGE FOR USERDEFINED FUNCTIONS
x
π
S(x) = ∫ sin --2- t dt
2
x
π
C(x) = ∫ cos --2- t dt
2
Evaluates the functions f(x) and g(x) related to the Fresnel integrals by means of the
formulae
f ( x ) = { 1 ⁄ 2 – S ( x ) } cos ( π, x 2 ⁄ 2 ) – { 1 ⁄ 2 – C ( x ) } sin ( π, x 2 ⁄ 2 )
g ( x ) = { 1 ⁄ 2 – C ( x ) } cos ( π, x 2 ⁄ 2 ) – { 1 ⁄ 2 – S ( x ) } sin ( π, x 2 ⁄ 2 )
Gamma Functions
Computes the value of the gamma function at x
Γ(x) = ∫t x – 1 e – t dt
gamma(x)Gamma Function
lgamma(x)Natural logarithm of Gamma Function, x - must be positive
Error Function
erf(x)Error Function
erfc(x) Complementary Error Function"},
Computes the error function erf(x) and Complementary error function erfc(x)
197
APPENDIX A: SCRIPT LANGUAGE FOR USERDEFINED FUNCTIONS
0 x
∫ ∫
2 2
erf ( x ) = ------- e –t dt erf ( x ) = ------- e –t dt
2 2
π π
x o
y( x)
∫
2 2
x = ------- e – t dt
π
0
minx if |x| <= 0.8 then value minx is not used in the procedure
In the case that |x| is in the neighborhood of 1, cancellation of digits take place in the
calculation of 1-|x|
If the value 1-|x| is known exactly from another source, then minx has to contain this
value, which will give better results.
198
APPENDIX A: SCRIPT LANGUAGE FOR USERDEFINED FUNCTIONS
Bessel Functions
Bessel function J
bessj0(x) - Bessel function J0(x) of the 1st kind of order 0
bessj1(x) - Bessel function J1(x) of the 1st kind of order 1
bessj [k] (x) - Bessel function Jk(x) of the 1st kind in order k
Chebyshev Polynomials
chepol(n,x) - Computes the value of the Chebyshev polynomial Tn(x)
T 0 ( x ) = 1, T 1 ( x ) = x
T i ( x ) = 2.xT i – 2 ( x ), i = 2, …n
199
APPENDIX A: SCRIPT LANGUAGE FOR USERDEFINED FUNCTIONS
Conversions
Length
ft_m ft_m(foot) Foot to meter
yd_m yd_m(yard) Yard to meter
in_m in_m(inch) Inches to meter
Temperature
c_k c_k(celsius) Celsius to Kelvin
fh_k fh_k(farenheit) Farenheit to Kelvin
fh_c fh_c(farenheit) Farenheit to Celsius
k_c k_c(kelvin) Kelvin to Celsius
c_fh c_fh(celsius) Celsius to Farenheit
k_fh k_fh(kelvin) Kelvin to Farenheit
Other Conversions
gal_l gal_l(gallon) Gallon to liter
pt_l pt_l(pint) Pint to liter
oz_l oz_l(oz) Oz to liter
in3_l in3_l(cubInc) Cubic Inch to liter
l_m3 l_m3(liter) Liter to cubic meter
pd_kg pd_kg(pound) Pound to kilogram
phe phe(wavelength[µm]) Calculate Photon energy [eV]
200
APPENDIX B: VIEW PROPERTIES OF 2D GRAPHICS
When a View is displayed, it is in the form of a two-dimensional graph, and there are
a certain number of properties that can be modified for this graph. Right-clicking
anywhere on this Graph View will make a context menu appear with options that can
be performed on the Graph View. These options include Zoom In and Zoom Out,
Trace Curve, Print, Copy Bitmap, Curve Properties, Axis Properties, Grid Properties,
Graph Properties, and Labels.
Zoom In
The Zoom In option zooms into the graph by dragging a rectangle around the graph,
and displays zoomed in values on both axes.
Zoom Out
Zoom Out returns the graph to default scale (no zoom at all).
Trace Curve
Trace Curve offers the unique option of tracing a particular curve on this View. When
selected, a Select Trace Curve dialog box offering a list of all of the curves on the View
appears.
201
APPENDIX B: VIEW PROPERTIES OF 2D GRAPHICS
The user selects a curve. The selected curve is being inspected. Moving the cursor
moves the crosshair that traces along the selected curve and the window displayed
on top of the View will show the X and Y values. This is useful when observing exact
values at particular wavelengths or at particular X values, as opposed to just viewing
the graph.
From the drop-down box, any other curve in this View can be selected and the
crosshair will continue by tracing that particular curve. Selecting the Trace Curve
feature again will disable this feature.
202
APPENDIX B: VIEW PROPERTIES OF 2D GRAPHICS
Table of Points
This option will show a window, which can be used to view the data points of the
curves in the graph.
From the drop down menu, any curve in the view can be selected. The data points of
the curve will be displayed in the table. The display format options can be changed by
choosing the new display format, and/or by changing the number of digits, and then
pressing the Update Format button. The data points of the currently displayed curve
can also be saved into a text file, by pressing the Export Text button. This will open
the Save dialog box, which will ask for the location to save the file.
Copy Bitmap
The option called Copy Bitmap allows copying the graph as a bitmap to the clipboard
and pasting it to any bitmap drawing program for further editing.
Print
Any graph in the system can be printed by right-clicking and selecting Print, which
creates a full-page printout of this graph.
203
APPENDIX B: VIEW PROPERTIES OF 2D GRAPHICS
Curve Properties
Another option from this menu is Curve Properties. Curve Properties offers a list of
curves where the curve color, line style, thickness, and the type of graph points that
it will draw can be modified. If too many curves are displayed at the same time, curves
can also be set to invisible (and not show up on the graph) to reduce the clutter.
204
APPENDIX B: VIEW PROPERTIES OF 2D GRAPHICS
Axis Properties
The next option from the menu is Axis Properties. All the active axes are offered as
choices for property modification.
Other parameters for graphs include the number of digits displayed and orientation
with respect to the axes. Modification of the axis captions, orientation, as well as the
size of the axis (Scale Factor) can be done, as well as the entering of particular
mathematical symbols within the caption by choosing the Symbols button in the
bottom right corner.
On the right-hand side, the Auto Scale option automatically scales the axes to the
graph, as well as the Logarithmic option for logarithmic display of data. The same
options are offered for all the axes.
205
APPENDIX B: VIEW PROPERTIES OF 2D GRAPHICS
Grid Properties
Grid View Properties supports editing of horizontal and vertical grids. In all grid
options, the user can decide whether the grid is visible, where the grids should be
positioned (on major or minor tickmarks), the color of the grid, and the line style of the
grid.
Graph Properties
The properties of the graph can be edited in the Graph Properties option. The Title
box offers the option of editing the caption (title) of a Graph, as well as the position,
size, and scale factor.
The Colors option allows for the selection of the colors of the axes and the
background.
206
APPENDIX B: VIEW PROPERTIES OF 2D GRAPHICS
Labels
Labels in the Graph View can be added by choosing the Label, Add option, and typing
it in. Once created, the label can be moved around the graph, using the click and drag
technique, in order to label any part of the graph. The labels can also be resized by
dragging the corners of a label.
207
APPENDIX B: VIEW PROPERTIES OF 2D GRAPHICS
Notes:
208
Optiwave
7 Capella Court
Ottawa, Ontario, K2E 8A7, Canada
Tel.: 1.613.224.4700
Fax: 1.613.224.4706
E-mail: [email protected]
URL: www.optiwave.com