Manual
Manual
Jerome Degallaix
OSCAR
The Non-Definitive Guide
First edition July 2008
Second edition October 2008
Third edition April 2009
Fourth edition January 2010
Fifth edition January 2012
Sixth edition June 2012
Seventh edition January 2013
Eight edition September 2013
Ninth edition December 2013
Tenth edition July 2014
Eleventh edition December 2014
Twelfth edition September 2016
Thirteenth edition August 2019
Fourteenth edition June 2020
Fifteenth edition March 2022
OSCAR, the Matlab code, this documentation as well as the examples were written by:
Jerome Degallaix
Laboratoire des Matériaux Avancés (LMA)
Université Claude Bernard Lyon I
7, Avenue Pierre de Coubertin
69622 Villeurbanne
France
If you find a bug when using OSCAR, please feel free to contact the author.
Do not hesitate also to report any unclear part from this manual or from
the code itself. Of course, I am also open to suggestions for any possible
improvement.
Contents
Contents iv
iv
2.3.3 Code implementation . . . . . . . . . . . . . . . . . . . 28
2.3.4 Some comments . . . . . . . . . . . . . . . . . . . . . . 28
2.4 Calculating the circulating field . . . . . . . . . . . . . . . . . . 30
2.5 Displaying the results . . . . . . . . . . . . . . . . . . . . . . . 32
2.6 Calculating the cavity eigenmodes and diffraction loss . . . . . 34
2.7 A typical OSCAR run . . . . . . . . . . . . . . . . . . . . . . . 35
2.8 Script and function list . . . . . . . . . . . . . . . . . . . . . . . 36
3 Applications 39
3.1 Distortion of the optical field due to thermal lensing . . . . . . 39
3.2 Calculating diffraction losses . . . . . . . . . . . . . . . . . . . 44
3.3 Using flat beams . . . . . . . . . . . . . . . . . . . . . . . . . . 46
3.4 Deriving a Pound-Drever-Hall locking signal . . . . . . . . . . . 49
3.5 Simulation of a three-mirror ring cavity . . . . . . . . . . . . . 54
IIIAppendix 91
B Finesse script 97
Acknowledgements 109
Chapter 1
In this chapter, we detail the two main steps used to propagate an electric
field in a Fabry-Perot cavity. Firstly we will understand how the propagation
of an arbitrary electric field can be simulated using a Fourier transform. And
secondly, we will see how any wavefront distortion encountered by the electric
field can be included in the numerical simulations. Whenever possible, some
simple Matlab codes are presented to show the numerical implementation of
the algorithm. For clarity, the snippets of code are not optimized.
1
2 CHAPTER 1. PRINCIPLE OF THE FFT CODE
distortions induced by the optical absorption have seldom pure spherical pro-
files, which means it is delicate to quantify thermal lensing effects with modal
expansion code (but still possible). To simulate the effects of the optical
absorption on the mirror, I was using the FEM package Ansys which can cal-
culate the temperature distribution inside the mirror substrate or the surface
deformations due to the absorption of a Gaussian beam. From the Ansys
results, it is straightforward to calculate the wavefront distortion induced by
thermal lensing. However, at this stage, I was faced with a problem : how
can I estimate the effects of the thermal lens if it has to be inserted in a
Fabry-Perot cavity ? How much will the circulating power decrease ? Will
the cavity optical modes keep their Gaussian profiles ? I needed an optical
simulation tool which can be used with any arbitrary mirror profile. OSCAR
was born. For the inquisitive reader, the name OSCAR is the acronym of
Optical Simulation Containing Ansys Results.
The first version of OSCAR was written with the software IGOR. This code
was then translated in Matlab and used to calculate diffraction losses by my
UWA colleague Pablo Barriga. Finally, I re-wrote and optimized the Matlab
code to substantially decrease the OSCAR computational time. During the
year 2011, OSCAR was totally revamped using the Oriented Object capability
of Matlab giving rise to the Version 3.0.
calculate the Gouy phase shift between higher order optical modes. It
may be useful for flat beams for example, where no analytical calcula-
tions of the Gouy phase shift has been derived yet (as far as I know)
calculate the coupling loss between the input beam and the cavity eigen-
modes in case of mode mismatching
calculate the circulating beam (intensity and profile) inside the cavity,
which may be different from the eigenmodes if the cavity has a low
finesse
The FFT optical propagation code follows exactly the principle described
in the previous paragraph. In this case the elementary functions are plane
waves of different spatial frequencies.
4 CHAPTER 1. PRINCIPLE OF THE FFT CODE
with kx/y the propagation constant along the x/y axis. Equation (1.2) can
also be written:
1 (kx2 + ky2 )
kz = (k 2 − kx2 − ky2 ) 2 ' k− (1.5)
2k
' k − λπ(νx2 + νy2 ) (1.6)
Z ∞ Z ∞
E(x, y) = E(ν
e x , νy ) exp(−j2π(νx x + νy y))dνx dνy (1.8)
−∞ −∞
3
The angle θx between the direction of propagation and the x axis is θx = sin−1 (kx /k).
In the case of small angles, it is simply θx = λνx
6 CHAPTER 1. PRINCIPLE OF THE FFT CODE
Z ∞ Z ∞
E(ν
e x , νy , 0) = E(x, y, 0) exp(j2π(νx x + νy y))dxdy (1.10)
−∞ −∞
Z ∞ Z ∞
E(x, y, d) = E(ν
e x , νy , d) exp(−j2π(νx x + νy y))dνx dνy (1.12)
−∞ −∞
by a square matrix (called also grid later), each point of the matrix (called
also pixel for convenience) will represent the amplitude of the Gaussian beam
at a defined location. A 2D plot of such a matrix is shown in the top left
corner of the figure 1.2.
Practically, the discretization process is governed by the choice of 2 param-
eters: the physical size represented by the matrix and the number of points
in the matrix. For example, to discretize a laser beam with a beam radius of
1 cm we can use a matrix of size 128 × 128 representing an area of 10 cm by
10 cm. This example can be implemented in Matlab in a straightforward way
as shown in the listing 1.1.
If the scale of the matrix (called Grid.axis in the listing 1.1) representing
the amplitude distribution is easy to understand, a more delicate point is
the scaling of the Fourier transform of the input beam. This scaling of the
spatial frequency is required since we need to know the spatial frequency
represented by each pixel of the discrete Fourier transform of the Gaussian
beam. Concretely we need to know the discrete values of νx , νy from equation
1.10.
First thing to understand is that the discrete Fourier transform of a 2D
complex matrix is also a 2D complex matrix with the same dimensions [3].
The low spatial frequencies are located in the middle of the matrix and the
high spatial frequencies on the edge. Typically if the original matrix has for
8 CHAPTER 1. PRINCIPLE OF THE FFT CODE
One natural question we could ask is : what is the good size of the grid ?
The size of the grid must be large enough to represent faithfully the Gaussian
beam, no substantial energy from the beam must lay outside the grid. So the
dimension of the grid must be at least 3-4 times bigger than the biggest beam
diameter encountered. A large grid size is also important to sample properly
the low special frequency as shown at the bottom of figure 1.2. Remarkably,
even if the laser beam radius increases as the beam propagates from its waist,
the amplitude of the Fourier transform is constant along the propagation. In-
deed the propagation as shown in equation 1.11 is simply represented by a
phase shift in the Fourier domain.
After the physical size of the grid has been chosen, the second impor-
tant parameter to be decided is the number of points in the grid. Because of
the way the discrete Fourier transform is calculated in the FFT algorithm, it
is strongly recommended to choose the number of points for the side of the
matrix to be a power of 2. Usually a good compromise between speed and
accuracy is given for N =64,128 or 256. The influence of the number of points
5
In fact the FFT algorithm returns the Fourier transform of the input matrix with
the low spatial frequency spread at the four corners of the matrix. However for a better
readability, the low frequencies are then shifted back to the center of the matrix.
1.2. PROPAGATION OF AN OPTICAL FIELD 9
x axis (m)
Figure 1.2: Example of the influence of the physical size of the grid and
the number of points used for the representation of a Gaussian beam (left
column) and its Fourier transform (right column). As expected intuitively, to
have a proper representation of both the Gaussian beam and its Fourier trans-
form, it is essential to have simultaneously a large space window (parameter:
Grid.Length) and a large number of points (parameter: Grid.Num point). For
this example the waist of the laser beam is 4 cm.
10 CHAPTER 1. PRINCIPLE OF THE FFT CODE
on the accuracy of the results can (and should) always be checked by doing
the same simulations with different meshings of the grid.
The size of the grid divided by the number of pixels is the dimension
represented by one pixel, in other word the resolution of the grid (variable
Grid.step). Of course, the resolution of the grid must match the size of the
physical feature we would like to simulate. For example it is useless to try to
simulate the effect of features having a size 1 mm in a mirror map with a grid
resolution of 1 cm.
We just saw how a square matrix can be used to represent a discrete elec-
tric field, so now we can try to simulate its propagation using the 3 consecutive
steps described by equations (1.10), (1.11) and (1.12). During the second step,
the Fourier transform of the electric field is multiplied by a complex number
depending of the distance of propagation and also the spatial frequency. Prac-
tically, this multiplication is achieved by multiplying pixel by pixel 2 matrices
: the Fourier transform matrix and a propagation matrix. The propagation
matrix is usually defined beforehand and only once, since it will be used re-
peatedly as we will see later in section 1.4. The Matlab code at the core of
the FFT code is presented in the listing 1.2, it is the direct sequel from the
previous listing where we defined the matrix used to represent the electric field.
end
end
Field .Fourier = fftshift ( fft2 (Field . Start )); % Do the Fourier transform of the input field
Field .Fourier = Field.Fourier .* Mat propagation; % Do the propagation in the frequency domain
Field .End = ifft2( ifftshift (Field .Fourier )); % Do the inverse Fourier transform
tem with mirrors, apertures and imperfect optics. How to include optics in
the code is the subject of the next section.
12 CHAPTER 1. PRINCIPLE OF THE FFT CODE
Figure 1.3: Propagation of an uniform square of light using our FFT prop-
agation code. The initial square light field is presented on the left plot. The
field resulting from the propagation of the initial field over 100 m is shown
on the right plot. Structures similar to the Hermite-Gaussian modes begin to
emerge when the square field propagates in free space.
1.3. ADDING REALISTIC OPTICS 13
1.3.2 Mirrors
One of the most useful wavefront distortions is the one induced by mirrors. A
mirror is a reflective spherical surface which is used to steer (flat mirror) or
focus the beam (convergent or divergent mirrors). From simple geometrical
14 CHAPTER 1. PRINCIPLE OF THE FFT CODE
considerations (see the top left plot in figure 1.4) we can calculate the change
in sagitta ∆s as a function of ∆r the distance from the mirror center:
p
∆s = Rof C − Rof C 2 − ∆r2 (1.17)
With Rof C the radius of curvature of the mirror. The optical path differ-
ence is simply twice the sagitta:
p
∆OP L(x, y) = 2 Rof C − Rof C 2 − (x2 + y 2 ) (1.18)
Of course since we are using a numerical simulation, the optical path dif-
ference representing the mirror has also to be discretized using the same grid
1.3. ADDING REALISTIC OPTICS 15
as the one used for the laser beam. A discretized optical path difference for a
mirror is represented on the right part in the figure 1.4.
There is no difficulty in creating with Matlab the matrix used to represent
the optical path difference induced by a mirror. The value of the optical path
as a function of the coordinate (x, y) has previously been shown in equation
1.18. The direct Matlab implementation is presented in the listing 1.3. By
definition, in OSCAR a concave mirror has a positive radius of curvature,
which means the optical path difference is negative.
end
end
1.3.3 Lenses
In OSCAR, we use the exact same procedure as for mirrors to simulate lenses.
The optical path difference induced by the lens is the same as that induced
by a mirror whose radius of curvature is twice the focal length of the lens we
wish to simulate. The fact that the lens is used in transmission and a mirror
in reflection is not relevant in OSCAR. Indeed the evolution of the laser beam
confined between two mirrors can always be simulated by the propagation of
a laser beam passing through a periodic system of lenses[4].
16 CHAPTER 1. PRINCIPLE OF THE FFT CODE
1.3.4 Aperture
Apertures can be represented by two complementary physical areas: one area
transmits integrally the light falling on it whereas the other area blocks inte-
grally the light. Apertures are useful to simulate correctly finite size optics.
In OSCAR, the optical path difference representing a mirror is defined over
the whole calculation grid independently of the real size of the mirror. To
simulate a finite size mirror, we multiply the reflected field by an aperture
which has the same diameter as that of the mirror. The aperture simulates
the fact that any light falling outside the mirror is lost.
Radius = sqrt(Grid.axis(m)ˆ2+Grid.axis(n)ˆ2);
if (Radius < Aperture diameter/2)
Mirror.mask(m,n) = 1;
end
end
end
1.3. ADDING REALISTIC OPTICS 17
6
The function can easily be modified if the mirrors have different sizes.
18 CHAPTER 1. PRINCIPLE OF THE FFT CODE
mirror can also be defined as a matrix if the reflective coating is not perfectly
uniform.
Listing 1.5: The function used to simulate the reflection of an electric field by
a mirror
global Mirror;
global Laser;
1. Define the cavity parameters as well as the mirror profiles and the input
beam.
1.4. SIMULATING A FABRY-PEROT CAVITY 19
2. Propagate the input beam Ein through the input mirror . For this
purpose the input mirror can be assimilated to a lens, so the listing 1.5
can be used. As a result, we obtain the field E1 .
3. After one round-trip in the cavity, the field E1 becomes E2 . One round-
trip in the cavity consists specifically of one propagation through the
cavity length using the FFT code, one reflection on the end mirror,
another propagation back to the input mirror and then finally a reflection
on the input mirror.
5. Then sum all the field Ei to have the cavity circulating power Ecirc .
The number of light field Ei to be considered to have an accurate result
depends on the finesse of the cavity.
Andrew Trigdell wrote also a FFT code in the ANU group. His master
thesis may be hard to find but a following article[7] gives some good
insights of the procedures involved in the code.
One of the first articles describing how to use a FFT to calculate the
eigenmodes of a cavity by Gordon and Li[9]. Although the article is 40
years old, all the modern FFT programs are still based on the funda-
mental method explained in this paper.
Part I
21
Chapter 2
This chapter is a step by step guide to run OSCAR prior to version 3. Us-
ing the simple example of a Fabry-Perot cavity, we will describe the essential
procedures and give some hints in order to obtain valid results. The different
scripts for this example can be found in the folder entitled Calculate Pcirc.
To run the full simulation, execute the Matlab script called Run OSCAR.m.
To be able to run all the examples quoted in this chapter, an older version
of OSCAR must be used: the version 1. However, this chapter is still there
for legacy reason since all the principles described here are the basis for the
current version 3. For completeness and to follow rigorously the examples,
OSCAR V1.3 could be downloaded here [10].
23
24 CHAPTER 2. THE OSCAR CODE IN DETAILS
Table 2.1: Parameters of the input beam and the Fabry-Perot cavity we wish
to simulate. The variable name is the name of the variable in the OSCAR
program and so also in the Matlab workspace.
Parameters Variable name Value
Cavity length (m) Length cav 1000
Substrate refractive index Refrac index 1.5
Mirror diameter (mm) Mirror.Diam 250
Input laser
Wavelength (nm) Laser.lambda 1064
Beam radius (mm) Laser.size 20
Wavefront curvature (m) Laser.radius -2000
Optical power (W) Laser.power 1
Input mirror
Radius of curvature (m) ITM.RofC 2500
Transmission ITM.T 0.005
Loss (ppm) ITM.L 50
Reflectivity ITM.R 1 - (Transmission + Loss)
End mirror
Radius of curvature (m) ETM.RofC 2500
Transmission (ppm) ETM.T 50
Loss (ppm) ETM.L 50
Reflectivity ITM.R 1 - (Transmission + Loss)
scribing the input laser beam. For coherence, all the variables must be defined
in the International System of Units (SI), which means that all the variables
representing a length are in meters.
The script CreateField.m is most of the time self-explainatory and does not
require extensive thinking. First the variables Grid.Length and Grid.Num point
are defined and then all the variables listed in the table 2.1 are given. From
the given parameters, the mirror aperture matrix is created (according to
the listing 1.4), following by the propagation matrix (listing 1.2), the mirror
∆OP L(x, y) maps (listing 1.3) and finally the matrix of the input beam.
For convenience, two matrices extensively used in intermediate calcula-
tions are also defined: Grid.D2 is a matrix where the value p of each pixel
is the distance between the pixel and the origin, i.e value = x2 + y 2 and
Grid.D2 square is the previous matrix but with every pixel squared, i.e Grid.D2 square =
Grid.D2.2
micrometer1 .
Another solution to set the cavity on resonance, is to add after each light
round-trip in the cavity a constant phase shift. This is this solution that we
use in OSCAR. So to simulate a cavity length shift of δL, a phase shift of k2δl
is added after each round-trip of the field Ei . Practically, when calculating
the circulating field, the matrix of the field Ei is multiplied by a scalar factor
exp (jk2δl) just before the field is reaching back the input mirror. To be
consistent with the previous chapter it must have been exp (−jk2δl) however
in the OSCAR code, it is implemented as exp (jk2δl), the sign convention can
be arbitrary (as soon as it is kept constant for all the procedures).
In OSCAR, the variable which represents the shift in the cavity length
necessary to be on the desired resonance is called Length.reso zoom. To deter-
mine the right value for Length.reso zoom, the script Find resonance length.m
has to be run first. By convention, Length.reso zoom is in fact δl/2 which
means that the variable Length.reso zoom represents the shift in the round-
trip length to make the cavity resonant. With this convention if Length.reso zoom
is shifted by one wavelength, the resonance frequency is shifted by one free
spectral range.
Figure 2.1: Circulating power in the cavity as the function of the macroscopic
round-trip length de-tuning, scanned over one wavelength. The highest peak
indicates the resonance position of the fundamental mode TEM00 . We can
also notice two smaller peak revealing the presence of higher order optical
modes ; this is a strong proof that the input beam is not matched with the
cavity eigenmode. The figure has been plotted for two values of Length.nb iter,
this variable determines the number of fields Ei to include in the sum when
calculating the circulating power. On resonance, the build up circulating
power is of course higher when we use 1600 fields instead of 800 (even if it is
not obvious in the figure due to the large vertical scale).
1. First all the fields Ei are calculated and stored for an arbitrary position
of the cavity tuning (so for an arbitrary resonance length). This step is
only done once.
3. Repeat the previous step over all the de-tuning length δl we wish to try.
The advantage of this technique is that the FFT code is just called once
to calculate the field Ei , then the reconstruction of the power buildup for the
28 CHAPTER 2. THE OSCAR CODE IN DETAILS
Find resonance length.m is the main procedure. At the end of the pro-
cedure, the variable Length.reso zoom which maximizes the cavity cir-
culating power, is returned. This script is divided into two similar parts:
the cavity de-tuning is first scanned over one wavelength, then we scan
around the maximum position (found after the first scan) with a much
greater de-tuning resolution (we zoom around the maxima found in the
first part). At the beginning of the script, two important variables are
defined: Length.nb iter determines the number of steps used to scan the
cavity over one wavelength (usually 2000) and Length.nb propa field is
the number of light round-trip taken into account when calculating the
circulating power (i.e. number of fields Ei we used).
faster, however I prefer to keep the method described above. Why ? Because
the plot of the circulating power as a function of the wavelength (figure 2.1)
contains much essential information which help debugging the simulation or
understanding the optical system. Here are some examples :
Finally, since we also know the position de-tuning for the higher order
modes, we can also set the cavity on the resonance of the higher order
modes if necessary. The knowledge of the relative de-tuning position
of the resonance for the higher order modes allows also the calculation
of the Gouy phase shift between higher order modes (which maybe un-
known if the beam is not Gaussian).
Figure 2.2: 2D amplitude of the circulating field responsible for the 3 peaks
in the plot of the cavity circulating as a function of the de-tuning (figure
2.1). We can recognize from left to right the mode LG10 , LG20 and finally
the fundamental mode LG00 . The presence of the 3 first LGm0 optical modes
indicates that the input beam is properly aligned with the cavity axis but that
we have a slight mode-mismatching.
the first left peak in the figure 2.1, we just have to write the following command
in Matlab:
With such a command, we can check which optical modes can build up in the
cavity. The 2D amplitude of the three optical modes corresponding to the
three peaks in figure 2.1 are presented in figure 2.2 in the order of increasing
de-tuning.
After we have calculated the resonance length, the script Get results.m
can be called. This script calculates the static fields in the Fabry-Perot cavity
2.4. CALCULATING THE CIRCULATING FIELD 31
The procedure to calculate the circulating field was explained in the section
1.4 and is briefly reminded here. First the input laser field (variable Field.Start
in OSCAR) crosses the input test mass substrate, creating the intermediate
circulating field (variable Field.Circ and also called E1 in figure 1.6). Then the
intermediate circulating field is propagated back and forth between the cavity
mirrors with the number of round-trips determined by the variable Iter.final.
The total circulating field (variable Field.Total ) is derived by summing all the
intermediate fields at a defined position in the cavity, in OSCAR it is done
after the reflection from the input mirror. Everything described above can be
simply achieved in Matlab as shown in the listing 2.1.
Listing 2.1: The core of the OSCAR program to calculate the circulating field
in a cavity
end
After the calculation of the total circulating field in the cavity Field.Total,
the transmitted beam Field.Transmit and the reflected beam Field.Reflect can
be easily derived. The transmitted beam is simply the total circulating field
after a transmission through the end mirror. The reflected beam is the sum of
the input field directly reflected by the input mirror and the field leaking from
the cavity (which is the total circulating field transmitted by the input mirror).
32 CHAPTER 2. THE OSCAR CODE IN DETAILS
To feel confident in the results from OSCAR, it is always good to test the
results with different choices of number of light round-trip or size of the grid.
If the results are very sensitive to one parameters, it usually means that there
is a problem somewhere, and further checks are required.
For example, the results as a function of number of light round-trip are
presented in the table 2.2. As expected, on resonance, the circulating power
(defined by the power of the sum of all the fields Ei ) increases when the num-
ber of field Ei computed increases. The right number of iterations to consider
for a simulation depends on the finesse of the cavity. For a low finesse cavity,
with a high round-trip loss, the power contained in the field Ei will quickly
decrease and rapidly becomes negligible after few round-trips. In table 2.2,
the FFT results are compared with the results from the software Finesse [11],
which is based on mode expansion. The Finesse script used to simulate the
Fabry-Perot cavity is presented in appendix B.
Figure 2.3: Amplitude profile of the different steady state optical fields in
the Fabry-Perot cavity.
Table 2.2: Influence of the total number of light round-trip considered (vari-
able Iter.final ) on the results. The size of the grid is set to 128 × 128.
Number of Circulating Cavity waist Cavity waist
iteration power (W) size (mm) position from IM (m)
1000 640.712 18.403 -499.835
2500 747.546 18.403 -499.852
5000 749.903 18.403 -499.853
10000 749.906 18.403 -499.835
Finesse 749.906 18.403 -500
34 CHAPTER 2. THE OSCAR CODE IN DETAILS
Table 2.3: Influence of the size of the grid (variable Grid.Num point) on the
results. The number of iteration is 5000. The computation time is normalized
by the computation time required for a grid of size 128 × 128 (which is less
than 2 minutes on a modern computer).
Size of Circulating Cavity waist Cavity waist Normalized
the grid power (W) size (mm) position from IM (m) computation time
32 × 32 749.902 18.403 -499.854 0.09
64 × 64 749.903 18.403 -499.853 0.31
128 × 128 749.903 18.403 -499.853 1.00
256 × 256 749.902 18.403 -499.844 7.32
Finesse 749.906 18.403 -500 -
2
Quantitatively (and approximately), we could say that a cavity has a high finesse when
the the circulating power is much higher than the input power
2.7. A TYPICAL OSCAR RUN 35
the cavity is nearly degenerate and the input beam is composed of several
resonant or near resonant modes. In this case we can think of two solutions :
2. Take the cavity circulating field as a new input field and start a new
calculation. This step can be done several times and could be understood
as cascading optical cavities to increase the mode-cleaning effect.
1. CreateField.m is the script used to initialize the variables and define the
optical cavity parameters, the mirror maps as well as the input beam.
36 CHAPTER 2. THE OSCAR CODE IN DETAILS
Listing 2.2: Piece of code used to calculate the diffraction loss. We suppose
that we have already calculated the circulating field Field.Total.
% Normalise the circulating field (=the eigenmode)
Field . loss = Field.Total;
Field . loss = Field. loss /sqrt(Calculate power(Field. loss ));
The calls for the three previous script are usually reunited into one single
scrip called Run OSCAR.m.
Plot Field.m is a function which takes a 2D field and plots the amplitude
of the field in 2D (or 3D if desired).
Applications
In this chapter, we provide examples of some typical results that can be ob-
tained with OSCAR. These examples could be taken as a starting point to
build more complex simulations. The OSCAR scripts associated with each ex-
ample are provided in the OSCAR package. The example described here are
using the classic version of OSCAR (version 1.X) which can be downloaded
here [10]. For new users, it is recommended to use OSCAR V3.x and
so jump directly to the section 5
Since the temperature is no longer uniform in the test mass, the curva-
ture of the optic surface will change as a result of thermal expansion. In
39
40 CHAPTER 3. APPLICATIONS
this case we can expect the eigenmode of the cavity to change as well.
Z L Z L
trans
∆OP Nsub (r) = n(r, z)dz − n(0, z)dz + (n − 1)δs(r)
0 0
Z L Z L
= βT (r, z)dz − βT (0, z) + (n − 1)δs(r)dz(3.1)
0 0
With β the thermo-optic coefficient and n the refractive index of the sub-
ref
strate. Similarly, we can calculate the wavefront distortion ∆OP Nsub (r) for
the input beam reflected directly reflected on the input mirror:
Z L Z L
ref
∆OP Nsub (r) =2 βT (r, z)dz − βT (0, z) + nδs(r) (3.2)
0 0
And finally, the wavefront distortion of the beam reflected on the mirrors
inside the cavity is:
ref
∆OP Ncav (r) = 2δs(r) (3.3)
1
We assume uniform absorption in the test mass, so we can take advantage of the
cylindrical symmetry.
3.1. DISTORTION OF THE OPTICAL FIELD DUE TO THERMAL
LENSING 41
Figure 3.1: Schematics of the hot cavity. The mirror diameter is 250 mm
and the thickness is 100 mm. We can notice that the temperature profile is
dominated by the coating absorption. The optical parameters are detailed in
the text. For clarity, we did not represent the curvature of the cold optics
and we suppose the same distortion in the input and end mirrors. T (r, z)
represents the temperature distribution inside the test mass and δs(r) the
change in sagitta due to the optical absorption.
Figure 3.2: Optical path length difference induced by the mirror substrates
in transmission when only the thermo optics effect is considered (left) and
change in the sagitta of the reflective side of the mirrors (right). It interesting
to note the difference between the two vertical scales, the left plot represents
an optical path in micrometers, whereas the right plot is in tens of nanometers.
These plots are derived from the results of ANSYS simulations and will then
be integrated into OSCAR.
The file can found in the OSCAR distribution under the name From ANSYS.txt
in the folder Calculate TL effect. A graphical representation of the data file
from ANSYS is shown in figure 3.2.
Most of the time, the resolution used in the results file from ANSYS is
different from the grid resolution used in OSCAR, so we have to resample the
results using an interpolation method. How the results file is integrated into
OSCAR is presented into the listing 3.1
After implementing the distorted mirrors, we can calculate the resonance
length for the fundamental mode and then calculate the total circulating field.
This is done by running successively the scripts Find resonance length.m and
Get results.m. The comparison between the cold cavity is presented in table
3.1.
3.1. DISTORTION OF THE OPTICAL FIELD DUE TO THERMAL
LENSING 43
Listing 3.1: Commands used to read thermal lensing results from ANSYS.
% Load the results file
load( ’From ANSYS.txt’)
loaded.radius = From ANSYS(:,1);
loaded.TL = interp1(From ANSYS(:,1),From ANSYS(:,2),Grid.D2,’spline’)*0.2;
loaded.sag = interp1(From ANSYS(:,1),From ANSYS(:,3),Grid.D2,’spline’)*0;
Table 3.1: Comparison of the cavity gain and size of the beam on the input
mirror for a cavity with and without thermal lensing.
Cold cavity Hot cavity
Cavity gain 749.3 444.8
Beam radius on IM (mm) 20.6 20.8
The decrease in the optical gain is quite important, since the optical gain
is almost divided by a factor 2 between the cold and hot cases. It means
in the hot cavity case, we have a strong mode mismatching between
the input beam and the cavity fundamental mode. Since the latter
has almost not changed, we can deduce that the mode mismatching is
induced by the thermal lens in the substrate of the input mirror.
44 CHAPTER 3. APPLICATIONS
This simple example shows that in our fused silica mirrors, the main
thermal lensing effect is due to the thermal lens in the substrate of the
input mirror generated by the optical absorption in the high reflective
coating. The conclusion may be different for different substrates such as
sapphire or calcium fluoride.
1. Find the resonance length of the cavity for the mode HG10 . To do
this, we could inject a mode HG10 and maximize the circulating power.
This approach is however not so easy : instead we will inject a uniform
pattern of light and excite all the optical modes HGm0 . Then we will
select manually the resonance length of the mode HG10 in the spectrum
of the cavity.
2. Find the HG10 eigenmode of the cavity. The shape of this mode can be
different from the theory if the mode undergoes some serious clipping.
3. Calculate the diffraction loss as the power lost during one light round-
trip with perfectly reflective mirrors.
We decide to not inject directly a mode HG10 (right plot on figure 3.3) but
instead inject a simpler light pattern which will excite all the optical modes
along the horizontal axis. This pattern is one vertical strip with positive am-
plitude and one vertical strip with negative amplitude as shown in the left
plot figure 3.3.
3.2. CALCULATING DIFFRACTION LOSSES 45
Figure 3.3: In the left plot, is the profile of the input electric field that we inject
in the cavity to excite the HG10 shown on the right. Both optical pattern are
normalized in amplitude.
Table 3.2: Influence of the size of the grid on the diffraction loss).
Size of the grid Diffraction loss (ppm)
128 × 128 618
256 × 256 620
512 × 512 621
By using the procedure Find resonance length.m, we can calculate all the
cavity modes excited due to our particular input beam. The circulating power
as the cavity is scanned over one FSR is shown in figure 3.4. Each peak in
this plot represents the resonance of one of the cavity mode. We can display
different cavity eigenmodes for the first four highest peaks and we found that
the mode HG10 resonates for a de-tuning of 3.181 × 10−7 m.
Since we have found the resonance length for the mode HG10 , we can
now use the procedure Get results.m to calculate the diffraction loss using the
method described in section 2.6. As a result, we found the diffraction loss
equal to 618 ppm per round-trip. Important beam clipping can also change
the shape of the eigenmode of the cavity, as can be easily demonstrated using
a FFT code[15].
We can now check how the diffraction loss depends of the size of the grid.
The results are shown in 3.2. As we can see the results do not change as we
increase the size of the grid (which is a good sign). Below a grid size of 128
× 128, no realistic eigenmodes can be found in the cavity.
46 CHAPTER 3. APPLICATIONS
Figure 3.4: Cavity spectrum showing the different resonance lengths of the
optical modes. The power profile of the main optical modes is presented
above their respective resonance peaks.
To create the mirror profiles, we will not use directly the analytical formula
which is relatively complicated, but instead we will use the wavefront curvature
of the flat beam at the mirror position. Since the flat beam is an eigenmode
of the cavity, the curvature of the mirrors must match the wavefront of the
incoming beam. So the three steps to calculate will be:
1. Use the simple analytical formula to define the flat beam at the waist of
the cavity. Since both mirror will have identical profile, we know that
the waist position is in the middle of the cavity.
3.3. USING FLAT BEAMS 47
Listing 3.2: Script to create the mirror profiles used to support a given light
field
%−−−−−−−−−−−−−−−−−−−−−− Create nearly concentric flat beam −−−−−−−−−−−−−−−−−−−
% Create the profile at the cavity waist
x temp = Grid.D2/waist 0;
Field .mesa tmp = (1./x temp).*exp(−x temp.ˆ2).*besselj(1,2*x temp*p/waist 0);
clear ( ’x temp’)
% Take the phase of the beam at the mirror and calculate the equivalent
% change in sagitta
Mirror.ETM cav = (2/Laser.k prop)*angle(Field.On mirror);
Mirror.ITM cav = Mirror.ETM cav;
2. Propagate the beam along half the cavity length, so that the flat beam
is now at the mirror position.
3. Calculate the wavefront curvature of the beam at the mirror and then
set the mirror profile to be identical to the wavefront.
The method described in the three points above can be directly imple-
mented in OSCAR as shown in the listing 3.2.
Since we are just interested in the frequency difference between 2 eigen-
modes of the cavity (and not in the cavity circulating power), the input laser
beam only needs to be slightly matched to the cavity eigenmodes (and we
must have a high finesse to achieve a good mode selection). The important
point is that the input beam couples to (or excites) at least the two cavity
eigenmodes of interest.
As for the input light field, we decided to use a classic fundamental Gaus-
sian beam. By this way we will couple to most the cavity eigenmodes which
are circularly symmetric, e.g. the equivalent of the LGm0 modes. For example
the spectrum of the cavity as we scan over one wavelength is shown in figure
3.5. As expected we managed to excite the fundamental mode and also some
other higher order modes.
48 CHAPTER 3. APPLICATIONS
Figure 3.5: Cavity spectrum of the cavity supporting flat beams. It is impor-
tant to note the fundamental for a de-tuning of 0. This is not a coincidence,
but a direct consequence of the way we defined the mirror profiles (by propa-
gating a beam from the cavity waist).
Figure 3.6: Comparison of the profile of the fundamental flat beam with the
equivalent LG10 . Both beam contains the same optical power.
Just to have a look, we can display a cross section of the fundamental flat
beams and the equivalent LG10 to compare the energy distribution. Such a
comparison is shown in figure 3.6.
3.4. DERIVING A POUND-DREVER-HALL LOCKING SIGNAL 49
We can thus go back to our initial question : what is the frequency sep-
aration between the fundamental mesa beam and the mode LG10 ? From
the spectrum plot, we know the difference of de-tuning in length between the
fundamental mode and the equivalent LG10 is ∆l = 2.7664 × 10−7 m. Since
the displacement of one wavelength λ is equivalent to one free spectral range
(c/2L) , the frequency difference ∆f between the 2 modes is simply:
∆f = (c/2L) ∗ (∆l/λ)
= (3 × 108 /4000) ∗ (2.7664 × 10−7 /1.064 × 10−6 ) (3.4)
= 19.5kHz
Using a similar calculation, we could also deduce the Gouy phase shift
between the two cavity eigenmodes.
Table 3.3: Values of the first Bessel functions for different modulating in-
dexes m. Conveniently, the Bessel functions follow the property J−k (m) =
(−1)k Jk (m)
m m
Em = E0 exp(iω0 t)(1 + exp(iωm t) − exp(−iωm t)) (3.6)
2 2
So the electric field after the phase modulator can be expanded as the
superposition of three electric fields of angular frequency ω0 (the carrier) and
ω0 + ωm and ω0 − ωm (respectively the upper and lower sidebands). Since each
field has different frequencies, they will also have different resonant conditions
in the cavity.
Consider the sideband with the frequency ω0 +ωm . Propagating over a dis-
tance L the sideband undergoes the phase shift exp(i ω0 +ω c
m
L). That means,
the sideband phase shift is the phase shift of the carrier plus an additional
phase shift. Since before entering the cavity, the carrier and the sidebands
have the same spatial profile, we can simulate the sidebands in the cavity by
taking the simulated carrier and by adding an extra phase shift.
As a reminder Length cav is the length of the cavity and Length.reso zoom
is the microscopic tuning used to set the resonance condition for the carrier.
Since we know how to calculate the carrier and the sideband fields circulat-
ing in the cavity, we can also calculate the reflected fields from the cavity. The
reflected light is also the superposition of three fields, the reflected carrier, the
reflected lower sidebands and the reflected upper sidebands with respective
amplitude E0ref , E− ref
and E+ref
. The power Pdet detected by a photodiode
placed in reflection will then be :
Pdet = |E0ref + E−
ref −iωm t
e ref iωm t 2
+ E+ e |
ref 2
= |E0ref |2 + |E− ref 2
| + |E+ |
ref ∗
+ cos(ωm t)<(E0ref E− + E0ref ∗ E+
ref
) (3.8)
ref ∗
+ sin(ωm t)=(E0ref E− + E0ref ∗ E+
ref
)
ref ∗ ref −i2ωm t
+ 2<(E+ E− e )
With < and = the real and imaginary part and ∗ designates the complex
conjugate. The PDH error signal eP DH is derived by demodulating in phase
Pdet and the resulting signal is then low-pass filtered. As a result eP DH can
simply be written:
ref ∗
eP DH = =(E0ref E− + E0ref ∗ E+
ref
) (3.9)
The Matlab implementation of the method described above is straightfor-
ward. We first define three electric fields: the carrier and then the lower and
upper sidebands. Then we propagate each field in the cavity, calculate the
reflected field and then plot the error signal using the formula 3.9. To make
the result more pertinent, we fact scan the cavity over one free spectral range,
so we can see the evolution of the error signal across the resonance.
Then we can calculate the three circulating fields in the cavity called
Field.Total Field.Total sidebands plus and Field.Total sidebands minus using
the usual method introduced in section 2.4. The only difference in the algo-
rithm between the propagation of the carrier and the sidebands is the addition
of an extra phase shift per round-trip for the sidebands as shown in equation
3.7.
52 CHAPTER 3. APPLICATIONS
Listing 3.3: New variables to define the sidebands frequency and amplitude
% Frequency of the sidebands in Hertz and modulation index
Sidebands.frequency = 10E6;
Sidebands.modulation = 0.4;
% To add the additional phase shift undergone by the sidebands during the propagation
Sidebands.k prop = 2*pi*Sidebands.frequency/3E8;
Listing 3.4: Calculating the PDH error signals from the fields reflected by the
cavity
Field .PDH = imag(Field.Reflect carrier.*conj(Field.Reflect sidebands plus )+...
conj(Field . Reflect carrier ).* Field .Reflect sidebands minus);
% Normalised PDH signal
Power.PDH(r) = sum(sum(Field.PDH))/(Laser.amplitude*Sidebands.amplitude);
After calculating the three reflected fields from the cavity named Field.Reflect carrier
Field.Reflect sidebands plus and Field.Reflect sidebands minus, we can derive
the PDH error signal using the formula shown by equation 3.9, the equivalent
Matlab listing is shown in 3.4.
The plot of the power circulating in the cavity as a function of the mi-
croscopic de-tuning is presented in figure 3.7. The central peak is due to the
resonance of the carrier and the two smaller peaks indicates the resonance
position for the sidebands. Finally the usual PDH error signal as calculated
by OSCAR is shown in figure 3.8. Around the resonance of the carrier, we
have an error signal to lock the cavity. In theory, we have also an error signal
to lock the cavity on the sideband resonance (less useful).
3.4. DERIVING A POUND-DREVER-HALL LOCKING SIGNAL 53
Figure 3.7: Circulating power inside the cavity as the cavity is scanned over
one FSR. The two small peaks around the main resonance indicate the reso-
nance of the sidebands.
The reflected beam will present astigmatism directly related to the angle
of incidence. That can be understood by imagining that the incident
beam will be stretched in the horizontal direction as it is projected to
the mirror surface upon reflection.
The beam on reflection will get flipped in the horizontal direction, this
is purely a geometrical effect and the reader can easily be convinced by
looking at the figure 3.10.
The two items described above are implemented in OSCAR in the new
function Propa mirror shown in the listing 3.5. Compared to the function
Propa mirror seen in the first chapter (section 1.3.5), we have added one
new input parameter: Grid angle X. Grid angle X is a new distorted 2D grid
representing the projection of the grid used for propagation (called Grid.D2)
to the mirror surface.
The function used to simulate the reflection on a mirror can be decomposed
in the following steps:
1. Project the incident beam on the mirror surface, so that the incident
beam will look astigmatic
2. Reflect the projected incident beam in the same way as a incoming beam
normal to the mirror surface
So the mode-cleaner was able to separate the mode TEM10 and TEM01 .
We have slightly more power reflected than transmitted by the cavity, this is
3.5. SIMULATION OF A THREE-MIRROR RING CAVITY 57
Figure 3.11: Scan of the mode-cleaner over one free spectral range. The two
main peaks are due to the resonance of the TEM01 and TEM10 . Additional
peaks in the spectrum indicates a slight mode-mismatching.
a direct consequence of the fact that the input beam is not perfectly matched
to the cavity.
1.5 1.5
1 1
0.5 0.5
0 0
-0.5 -0.5
-1 -1
-1.5 -1.5
-2 -2
-2 -1 0 1 2 -2 -1 0 1 2
-3 -3
x 10 x 10
1.5 1.5
1 1
0.5 0.5
0 0
-0.5 -0.5
-1 -1
-1.5 -1.5
-2 -2
-2 -1 0 1 2 -2 -1 0 1 2
-3 -3
x 10 x 10
Figure 3.12: Output screen from OSCAR. The input field, a sum of TEM10
and TEM01 is shown on the top left corner. The reflected and the transmitted
field are shown respectively in the bottom left and right picture.
Part II
59
Chapter 4
Since the version 3.0, the code has been totally rewritten using the Object-
Oriented capability of Matlab. The code is now user-friendlier and less error-
prone. Moreover, some new functions have been added and the higher order
optical modes are supported from the start.
The principle of the FFT code and the method to derive the results are
still unchanged, so for people not familiar with the inner working of FFT code,
it is strongly recommended to read the first part of this manual.
61
62 CHAPTER 4. THE BIG CHANGES
Writing a new version allowed some radical changes: no more global vari-
ables, possible change of refractive index, sideband field managed automat-
ically at the same time as the carrier, higher order modes and much more.
In the long term, OSCAR should be able to simulate Advanced gravitational
wave detectors with realistic optics, and that in a (relatively) very simple
script.
The new code should also take into account the computing progress made
in recent years. For example, the version 3.0 has been written with parallel
processing in mind, for example the North and West arms could be computed
in parallel on different cores of the CPU (the Parallel Processing Toolbox is
then required) or a cavity scan can take advantage of multicore CPU. Since
version 3.30, calculations on the GPU are enabled.
The new code can also use separate grid sizes in the same simulation. That
could be used to simulate non-degenerate recycling cavities, where the laser
beam has to be strongly focused and could change size by a factor 10.
The class Grid is used to represent the discretization of space and all the
associated variables (see C.1 for the details). It was formerly known as the
global variable Grid in OSCAR classic. One Grid object is the first object
to be defined in a OSCAR script. To define an instance of the class Grid, 2
4.2. THE NEW OBJECTS AND HOW TO USE THEM 63
parameters are necessary: the number of pixels used (typically 128 or 256)
and the size of the grid in meters. For example:
G1 = Grid(128,0.40);
Defines the object G1 of the class Grid, then later all the objects for the
simulations will be defined on a grid of 128 × 128 with a side length of 40 cm.
Only two functions are associated with the class Grid : What is possible
and Do Virtual Map.
What Is Possible(G1) returns for the grid G1 what is the approximate
maximum curvature or tilt for a mirror. By default the mirror diameter is
80% of the size of the grid and the wavelength is set to 1064 nm.
It is possible to change manually the diameter of the mirror and the wave-
length of the laser by using the optional arguments ’Diam’ and ’Wavelength’ :
What_is_possible(G1,’Diam’,0.2,’Wavelength’,633E-9)
map2D = Do Virtual Map(G, Power law)
Creates a synthetic map from a given PSD. The PSD is param-
eterized as a (or several) power law. The function return a 2D
height map of the surface which can then after be applied to a In-
terface object. See the example Example Display Create maps.m
for a practical implementation.
the optical mode can also be specified, for example for a helicoidal mode
LG 3 3: E_input = E_Field(G1,’w0’,0.02,’mode’,’LG_HELI 3 3’) To
define the mode basis, 3 options are possible: ’HG n m’, ’LG HELI n
m’ or ’LG SIN n m’
the overlap integral) between the field E1 and E2. If only one
E field is given, it will calculate the overlap between the carrier
and of the sideband pair. The sideband number is selected with
the argument ’SB num’.
E2 = Change E n(E1,n)
Changes the refractive index where the laser beam is. Could be
used to pass through a flat interface from a vacuum to a mirror
substrate for example.
E Plot(E1)
Displays a 2D plot of the field amplitude in a new Matlab figure
window. Function can also be used as E1.E plot(). We can also
display the amplitude in log scale E_plot(E1,’space’,’log’) or
the propagation angle of the beam E_plot(E1,’angle’). To cre-
ate illustrative picture of the beam without all the axis, one can
use the option ’no_axis’,true.
The same function could be used to display the 2 sidebands with
E Plot(E1,’display’,’SB’,’SB num’,1). The same options as for the
carrier are also possible.
output all the power content in the different higher order modes up to
the order 10
Expand_HOM(E1,10,’display’,’pyramid’)
define a different basis for the calculation given as beam radius and
complex wavefront curvature in meters
Expand_HOM(E1,10,’basis’,[0.05 -1400])
E2 = Normalise E(E1,power)
Normalizes the E field E1 to 1 W if no power argument is specified.
Only the carrier is affected by this function and not the sidebands.
E2 = Propagate E(E1,dist)
4.2. THE NEW OBJECTS AND HOW TO USE THEM 67
E2 = Reflect Mirror(E1,I1)
Returns the field after reflection on a mirror. I1 is an Interface
object which must have been previously defined. An alternative
syntax could be Reflect mirror(E1,R1), with R1 the radius of cur-
vature of the mirror to be reflected on. A concave mirror is repre-
sented by a positive R1.
Reflections inside the substrates are allowed since the index of
refraction is taken into account for the reflection.
E3 = Remove 00 Part(E1,E2)
Removes the fundamental Gaussian part from a field E1. That is
useful to see which higher order modes are superposed with the
fundamental mode following some cavities simulations. Can also
be used to subtract 2 fields E1 and E2 as in the case of destructive
interference.
For convenience, the operators +,- and * have also been overloaded to
work with any object E field.
68 CHAPTER 4. THE BIG CHANGES
To propagate a laser beam (and its sidebands) one can simply use:
E2 = Propagate_E(E1, Prop)
The optional parameters can be defined in any order. To define flat mirrors,
a ’RoC’ of 0 or Inf can be used. Check the file @Interface/Interface.m
to see the default parameters such as refractive indexes.
The list of methods associated with the objects of the class Interface is
given below:
I2 = Add Astigmatism(I1, Zernike amplitude, Diameter)
Adds to the surface of the interface I1 the Zernike polynomial 2,2
(which represents the astigmatism) with an amplitude of Zernike
amplitude and over a diameter Diameter.
I2 = Expand Zernike(I1,options)
Expands in Zernike polynomials the interface I1. Two options
are available: ’Z order’, an integer which represents the maximum
order of the Zernike polynomials to take into account in the cal-
culations and ’diam’, the diameter where the Zernike polynomi-
als are defined. This function returns the interface I2, which is
the interface reconstructed by the Zernike polynomials. Example:
I2 = Expand_Zernike(I1,’Z_order’,10,’diam’,0.2)
I Plot(I1)
4.2. THE NEW OBJECTS AND HOW TO USE THEM 71
Plots the surface of the interface I1. The color scale is in meters.
I_plot(I1,’diam’,0.160) will only plot the surface over a di-
ameter of 160mm. With optional arguments, one can change the
scale of the vertical axis and also zoom in the central part.
Calculates the round-trip kernel of the cavity for the electrical field.
This is later use to calculate the cavity eigenmodes and eigenvalues.
The kernel itself is a 2D complex matrix of size Nb points 2 ×
Nb points 2 , so the kernel can really occupy a lot of memory. On
a desktop, one might want to limit Nb points to 64, while on a
powerful desktop one can go up to 128.
To calculate the kernel, the digital integration technique has to
be used for the beam propagation. To be valid, this technique
requires a minimum propagation distance which depends on the
size of the grid. If this is a problem, the kernel can be calculated
on a different grid (contact the author for more details on this
topic).
Check stability(Cin)
Calculates the radius of curvature of the input and end mirrors
and then check the stability and gain of the cavity. It is a use-
ful function when mirror maps with curvature are used. An op-
tional second argument could be given to specify the diameter
on which the mirror radius of curvature is calculated. For ex-
ample to calculate the stability of the cavity only taking into
account the central 6 cm diameter of the mirror, one can use:
Check_stability(C1,’diam’,0.06) The function also returns
the input beam parameters of the fundamental mode for a perfect
mode-matching.
Get Info(Cin)
Get info calculates the fields on resonance inside the cavity. The
function is also used to calculate the diffraction loss due to the
mirror finite size. Legacy function, it is recommended to use the
function Calculate Fields AC.
If new functions are needed urgently and cannot wait for future versions,
you can contact directly the author.
Chapter 5
After the formal previous chapter, here is the most interesting part: the con-
crete examples. In this part we will see how easy it is to create simulations
with the new OSCAR, few lines of code are usually enough to get a result.
The examples are in the folder Examples.
79
80 CHAPTER 5. NEW EXAMPLES OF SIMULATIONS
L1 = Interface(G1 ,−1000,0.10,1,0,1,1.45);
L2 = Interface(G1 ,2000,0.10,1,0,1.45,1);
E3 = Propagate E(E2,200);
Fit TEM00(E3);
At the end, the beam radius is measured to be 1.76283 cm and the wave-
front curvature -1765.36 m. To be compared with the result found using the
ABCD matrix for the same setup: Beam radius of 1.76283 cm and wavefront
curvature of -1763.79 m. So both results are in good agreement.
Since OSCAR 3.10, the thick lens can be made with an instance of the
class Mirror. This example has been updated accordingly.
The 7 lines of the script to define the cavity and do the calculations can
be found in the listing 5.2. This script with additional commented lines can
be found in the OSCAR3.0 folder under the name Example Pcirc.m.
The script takes less than 10s to run on a modern laptop. After the
calculation, the script Display Results(C1) will return in the Matlab console:
5.3. SCAN OF A MISALIGNED CAVITY 81
IM = Interface(G1,’RoC’,2500,’CA’,0.1,’T’,0.02);
EM = Interface(G1,’RoC’,2500,’CA’,0.1,’T’,0.02);
C1 = Cavity1(IM,EM,1000,E input);
C1 = Cavity Resonance Phase(C1);
C1 = Calculate Fields AC(C1);
Display Results(C1);
IM = Interface(G1,’RoC’,2500,’CA’,0.1,’T’,0.02);
EM = Interface(G1,’RoC’,2500,’CA’,0.1,’T’,0.02);
EM = Add Tilt(EM,1E−6,’y’);
C1 = Cavity1(IM,EM,1000,E input);
C1 = Cavity Scan(C1);
Display Scan(C1);
The script takes around 2 minutes to run. The output is the Matlab figure
82 CHAPTER 5. NEW EXAMPLES OF SIMULATIONS
3
10
2
10
Position: 5.6605e−007
Power: 13.5972
1
10
0
10
1 2 3 4 5 6 7 8 9 10
Cavity detuning [m] x 10
−7
−0.1 −0.1
−0.05 −0.05
0 0
0.05 0.05
0.1 0.1
0.15 0.15
−0.1 −0.05 0 0.05 0.1 0.15 −0.1 −0.05 0 0.05 0.1 0.15
Figure 5.1: Output window of the function Display scan(C1) with the cavity
scan over one FSR on top.
shown in the figure 5.1. The top plot is a cavity scan over one free spectral
range. We can notice 3 peaks : from left to right the first peak is a LG10 due
to imperfect mode-matching, the second is the mode HG10 and the third and
highest one is the fundamental mode. It is possible to move the cursor to see
the shape of the circulating field for a particular detuning.
large mirrors.
The laser beam is now defined outside the cavity, so the cavity reflected
field can also be calculated. The script for this example is called Exam-
ple HOM with maps.m and is shown in the listing 5.4 without any comments.
Listing 5.4: Example of OSCAR script to calculate the reflected field from a
cavity with maps
G1 = Grid(512,0.4);
E input = E Field(G1,’w’,0.043,’R’,−1034,’mode’,’LG 3 3’);
IM = Interface(G1,’RoC’,1500,’CA’,0.4,’T’,0.02);
EM = Interface(G1,’RoC’,1700,’CA’,0.4,’T’,2E−6);
C1 = Cavity1(IM,EM,3000,E input);
C1.Propagation mat.Use DI = true;
After the definition of the cavity and the calculation of the resonance
length, the command C1 = Calculate_Fields_AC(C1) is used to calculate
the circulating, reflected and transmitted fields from the cavity. The fields are
then stored in the instance C1 where they could be accessed later. To display
the result graphically the command Display_Results(C1) is then used. An
example of the output screen is shown in figure 5.2
84 CHAPTER 5. NEW EXAMPLES OF SIMULATIONS
0.1 0.1
0 0
−0.1 −0.1
−0.2 −0.2
−0.2 −0.1 0 0.1 0.2 −0.2 −0.1 0 0.1 0.2
0.1 0.1
0 0
−0.1 −0.1
−0.2 −0.2
−0.2 −0.1 0 0.1 0.2 −0.2 −0.1 0 0.1 0.2
Figure 5.2: Output window of the function Display results(C1) when a LG33
mode is expected to circulate in a cavity with realistic mirrors.
5.5. PLOTTING A POUND-DREVER-HALL ERROR SIGNAL 85
Power of the fields circulating inside the cavity Demodulated PDH signal in reflection
0.25
Carrier Signal in phase
Lower sideband Signal in quadrature
1
0.2
10 Upper sideband
0.15
0
10 0.1
0.05
Signal [a.u.]
Power [W]
−1
10 0
−0.05
−2
10
−0.1
−3
−0.15
10
−0.2
−4
10 −0.25
1 2 3 4 5 6 1 2 3 4 5 6
Cavity round trip phase shift Cavity round trip phase shift
Figure 5.3: Circulating power inside the cavity (left) and error signals in
reflection (right).
To draw the PDH error signals, the reflected field from the cavity is de-
modulated to get the in phase and in quadrature signals. The simulation
is relatively long since for the cavity scan 200 points are taken. That takes
around 12 minutes on my laptop. A plot of the circulating power and the
reflected PDH error signal is shown in figure 5.3.
0.7 −0.01
0.6 0
0.01
0.5
0.02
0.4
0.03
0.3 0.04
0.2 0.05
−4 −3 −2 −1 0 1 2 3 4 −0.05 0 0.05
Cavity detuning [rad]
87
88 BIBLIOGRAPHY
[10] http://www.sr.bham.ac.uk/dokuwiki/doku.php?id=geosim:oscar.
GEO600 Simulation Group.
[14] A. E. Siegman, Lasers. University Science Books, 1986. THE laser Bible,
does it still need an introduction ?
[17] M. Bondarescu1 and K. S. Thorne, “New family of light beams and mirror
shapes for future LIGO interferometers,” Phys. Rev. D, vol. 74, p. 082003,
2006.
[24] R. Day, “A new FFT code: FOG Fast Fourier Transform Optical Simu-
lation of Gravitational Wave Interferometers.” LIGO G1200629-v1, 2012.
Appendix
91
Appendix A
In this appendix, we will see how it is possible to rediscover all the formulae
related to the laser beam propagation just by using the Fourier technique
explained in chapter 1. Basically, we will do by hand the three steps which
are numerically done in Matlab to propagate a Gaussian beam: first, do a 2D
Fourier transform of the laser beam, then add the phase shift in the frequency
domain and finally, take the inverse Fourier transform.
To facilitate the mathematical calculation, we will extensively use the fol-
lowing formula:
+∞
−b2
Z r
2
π
exp −ax + ibx dx = exp (A.1)
∞ a 4a
Let us consider a Gaussian beam E(x, y, z) of amplitude A. For simplifi-
cation we suppose the waist w0 of the beam to be located at z = 0. The beam
can be written:
2
x + y2
E(x, y, 0) = A exp − (A.2)
w02
We will now propagate the Gaussian beam along the z axis over a distance
d. To not complicate the calculation, we will just consider one transverse
dimension at first, for example the dimension along x since all the following
equations can be decoupled in the x/y dimensions.
93
APPENDIX A. ANALYTICAL FORMULATION OF THE GAUSSIAN
94 BEAM PROPAGATION USING FOURIER TRANSFORM
The first step is then to calculate the Fourier transform E(ν
e x , 0) of the
field E(x, 0):
Z +∞
x2
E(νx , 0) =
e A exp − 2 exp(j2πνx x)dx (A.3)
∞ w0
Using the formula A.1, the above equation becomes:
q
e x , 0) = A πw2 exp −(πνx w0 )2
E(ν 0 (A.4)
To simulate the propagation the electric field over a distance d, the proper
phase shift is added to Fourrier transform:
q
πw02 exp −(πνx w0 )2 exp(−jkd + jλπνx2 d)
E(ν
e x , d) = A (A.5)
Z +∞q
A πw02 exp −(πνx w0 )2 exp(−jkd + jλπνx2 d) exp(−j2πνx x)dνx
E(x, d) =
∞
q Z +∞
= A πw02 exp(−jkd) exp −(π 2 w02 − jλπd)νx2 − j2πxνx dνx
∞
−4π 2 x2
π
q r
= A πw0 2 exp(−jkd) exp
π 2 w02 − jπλd 4(π 2 w02 − jλπd)
2
s
1 x
=A λd
exp(−jkd) exp −
1 − j πw2 w 1 − j λd2
2
0 0 πw0
(A.6)
πw02
zr = (A.7)
λ
By inserting the Raleigh range zr into A.6 and by adding the similar result
on the other y transverse dimension, we obtain:
1
− x2 + y 2
E(x, y, d) = A exp(−jkd) exp (A.8)
1 − j zdr
1
w02 1−j zd
r
95
Let us analyze now the two main constituents of equation A.8, the ex-
ponential and the complex factor in front of it. The complex number in the
exponential can be separated in its real and imaginary parts:
2 + y2) d
x2 + y2 x2
+ y2 (x zr
−
exp = exp −
−j
2 d2 2 d2
w02 1 w0 1 + z 2 w0 1 + z 2
1−j zd r r
r
x 2 + y2 (x 2 + y2)
= exp − 2
−j
w02 1 + dz 2 w02 zdr + zdr (A.9)
r
2
x +y 2 2 2
(x + y )
= exp − −j
2 d2 2zr zr d
w0 1 + z 2 k d + zr
r
2
x +y 2 2 2
(x + y )
= exp − − jk 2
2d 1 + dzr2
d 2
w02 1 + z 2
r
Finesse script
The Finesse script [11] used to simulate a Fabry Perot cavity equivalent to the
one described in the table 2.1 is presented below. It is often extremely useful to
create some simple Finesse model to check the exactitude of OSCAR results
whenever possible. The script is also included in the OSCAR distribution
under the name P circ.kat in the folder Calculate Pcirc.
l i1 1 0 n0 # laser P=1W
gauss G1 i1 n0 0.017221 -517.112239 # Parameters for a beam radius 2cm
# and a wavefront RofC of -2000m
s s0 1n 1 n0 n1
m1 SITM1 1 0 0 n1 n2
s sITM2 1n 1.45 n2 nITM
m1 ITM2 0.005 50E-6 0 nITM ncav1 # IM transmission and loss
attr ITM2 Rc -2000
maxtem 8
trace 10
phase 0
startnode n0
97
98 APPENDIX B. FINESSE SCRIPT
gnuterm NO
retrace off
Appendix C
99
100 APPENDIX C. DETAILS OF OSCAR 3.0 CLASSES
... and they mention it. A list of publications where OSCAR is quoted:
D.1 Thesis
1. Degallaix, J. (2006). Compensation of strong thermal lensing in ad-
vanced interferometric gravitational waves detectors, University of West-
ern Australia). Editor note: Of course, when it all started.
105
106 APPENDIX D. THEY HAVE FOUND OSCAR USEFUL...
D.2 Articles
1. Barriga, P., Bhawal, B., Ju, L., & Blair, D. G. (2007). Numerical cal-
culations of diffraction losses in advanced interferometric gravitational
wave detectors. JOSA A, 24(6), 1731-1741. Editor note: at that time
the code has no name.
3. Gatto, A., Tacca, M., Kéfélian, F., Buy, C., & Barsuglia, M. (2014).
Fabry-Pérot-Michelson interferometer using higher-order Laguerre-Gauss
modes. Physical Review D, 90(12), 122011.
4. Zhao, C., Ju, L., Fang, Q., Blair, C., Qin, J., Blair, D., ... & Yamamoto,
H. (2015). Parametric instability in long optical cavities and suppression
by dynamic transverse mode frequency modulation. Physical Review D,
91(9), 092001.
5. Straniero, N., Degallaix, J., Flaminio, R., Pinard, L., & Cagnoli, G.
(2015). Realistic loss estimation due to the mirror surfaces in a 10
meters-long high finesse Fabry-Perot filter-cavity. Optics express, 23(16),
21455-21476.
6. Allocca, A., Gatto, A., Tacca, M., Day, R. A., Barsuglia, M., Pillant, G.,
... & Vajente, G. (2015). Higher-order Laguerre-Gauss interferometry
for gravitational-wave detectors with in situ mirror defects compensa-
tion. Physical Review D, 92(10), 102002.
D.2. ARTICLES 107
7. Ott, K., Garcia, S., Kohlhaas, R., Schüppert, K., Rosenbusch, P., Long,
R., & Reichel, J. (2016). Millimeter-long fiber Fabry-Perot cavities.
Optics express, 24(9), 9839-9853.
8. Capocasa, E., Barsuglia, M., Degallaix, J., Pinard, L., Straniero, N.,
Schnabel, R., ... & Flaminio, R. (2016). Estimation of losses in a 300 m
filter cavity and quantum noise reduction in the KAGRA gravitational-
wave detector. Physical Review D, 93(8), 082004.
9. Blair, C., Gras, S., Abbott, R., Aston, S., Betzwieser, J., Blair, D.,
... & Grote, H. (2017). First demonstration of electrostatic damping
of parametric instability at Advanced LIGO. Physical review letters,
118(15), 151102.
10. Wittmuess, P., Piehler, S., Dietrich, T., Ahmed, M. A., Graf, T., &
Sawodny, O. (2016). Numerical modeling of multimode laser resonators.
JOSA B, 33(11), 2278-2287.
11. Ma, Y., Liu, J., Ma, Y. Q., Zhao, C., Ju, L., Blair, D. G., & Zhu, Z. H.
(2017). Thermal modulation for suppression of parametric instability in
advanced gravitational wave detectors. Classical and Quantum Gravity,
34(13), 135001.
12. Capocasa, E., Guo, Y., Eisenmann, M., Zhao, Y., Tomura, A., Arai,
K., ... & Somiya, K. (2018). Measurement of optical losses in a high-
finesse 300 m filter cavity for broadband quantum noise reduction in
gravitational-wave detectors. Physical Review D, 98(2), 022010.
13. Jia, Y., Huang, R., Lan, Y., Ren, Y., Jiang, H., & Lee, D. (2019).
Reversible Aggregation and Dispersion of Particles at a Liquid–Liquid
Interface Using Space Charge Injection. Advanced Materials Interfaces,
6(5), 1801920.
14. Hardwick, T., Hamedan, V. J., Blair, C., Green, A. C., & Vander-Hyde,
D. (2020). Demonstration of dynamic thermal compensation for para-
metric instability suppression in Advanced LIGO. Classical and Quan-
tum Gravity.
15. Wu, B., Blair, C., Ju, L., Zhao, C,. (2020) Contoured thermal deforma-
tion of mirror surface for detuning parametric instability in an optical
cavity. Classical and Quantum Gravity, 37(12):125003.
108 APPENDIX D. THEY HAVE FOUND OSCAR USEFUL...
16. Wang, H., Amoudry, L., Cassou, K., Chiche, R., Degallaix, J., Dupraz,
K., Huang, W., Martens, A., Michel, C., Monard, H., Nutarelli, D.
(2020) Prior-damage dynamics in a high-finesse optical enhancement
cavity. Applied Optics, 59(35):10995-1002.
Acknowledgements
I would like to thank all the users of the code and especially all the people who
have helped in the development, in particular : Massimo Galimberti (impres-
sive work for the Zernike implementation and the ZYGO .dat file interpreter),
Francois Bondu (for generating maps from a 1D PSD), Luc Di Gallo, Francois
Labaye and Richard Day for all the interesting discussions.
The GPU coding was initiated, pushed and later optimised by Nils Melchert.
Aline Cahuzac corrected the mistakes in this manual, the remaining ones
were added later by me.
109