%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Preamble
\documentclass[12pt]{article}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Packages
\usepackage{amsmath, amssymb}
%\usepackage{units}
%\usepackage{braket}

\usepackage[pdftex]{color}
\usepackage[pdftex]{graphicx}
\usepackage[pdftex,colorlinks=true,linkcolor=black,pdfview=FitH,pdfstartview=FitH]{hyperref}

\usepackage[font=small]{caption}
\usepackage{sidecap}
\usepackage{times}

\hypersetup{citecolor=black}


%\pdfcompresslevel 9


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Input Commands
\input{mevansTex}
\input{abbrev}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% User-defined Commands

%define three element vector for angular section
\newcommand{\threeVec}[3]{\big( {#1}, {#2}, {#3} \big)}
%define vector symbol for angular section
\newcommand{\myVec}[1]{\vec{#1}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Header

\title{Optickle 2}
\author{M.~Evans, Y.~Michimura, J.~Miller, E.~Oelker, N.~Smith-Lefebvre}
%\address{$^1$MIT Kavli Institute (MKI), Massachusetts Institute of Technology %(MIT), Cambridge, USA;}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Document

\begin{document}

\maketitle

\abstract{
Optickle is a general model for the electro-opto-mechanical part of an interferometric GW detector.
It ventures into mechanics only as far as is necessary to include radiation pressure effects, and into electronics only far enough to produce demodulation
signals, and into optics only up to first order.
There are many other tools that do all these things in greater detail.
Optickle is for quick, but essentially complete \ifo\ design studies.}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Introduction}

As a general tool for opto-mechanical modeling Optickle can simulate any \ifo\ in which a
 single wavelength of light (with RF sidebands) is used.
The construction of an Optickle model is discussed in detail in the ``Optickle Function Reference''
 and several example systems are provided in the ``Demo'' area of the Optickle package.
This document discusses the theory and implementation of the functions which
 compute the behavior of an Optickle system in terms of field amplitudes and transfer functions.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Example System}

In the following sections, I will make frequent attempts to clarify by reference to the example optical system presented in this section.
The example is a Fabry-Perot cavity, composed of two mirrors a source (the laser) and a sink (the photo-detector, see figure \fref{optFP}).

%%%%%%%%%%
\MEfig{h}{0.8}{optFP}{The example system: a Fabry-Perot cavity.}
%%%%%%%%%%

The source is responsible for illuminating the system.
Let's assume that it generates a carrier and 2 RF sidebands from RF phase modulation approximated to first order.
Thus, the frequencies of the field components, relative to the carrier field, are $\vFrf = \grp{-f_{mod},0,f_{mod}}$, where $f_{mod}$ is the RF modulation frequency.

The field produced by the source propagates via Link 1 to the back input of Mirror A.
At the end of each link is a "field evaluation point", or FEP.
FEPs are represented by light red balls in figure 1, and are labeled E1, E2, etc.
The field at E1, for example, is clearly just the source field multiplied by the propagation phase determined by the length of Link 1.

The field computation can be described in two parts:  static (DC) fields, and audio frequency (AF) fields.
The DC fields are present in the optical system when none of the optics are driven.
The AF fields are the fields generated by driving the optics.
The following sections describe these computations in detail.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{DC Fields}

The collection of DC fields is relatively small:  one for each RF field component, at each field evaluation point (FEP).
That is, $\Nfld = \Nrf \Nlnk$, where $\Nrf$ is the number of RF components and $\Nlnk$ the number of links, such that for our example system $\Nrf = 3, \Nlnk = 4 \Rightarrow \Nfld = 12$.
Despite this not being a very big number, it is enough to make matrices unwieldy and complicated, so for the next few paragraphs I'll use just one RF component $\vFrf = \grp{f_{mod}}$.
To compute the DC fields in the optical system Optickle assumes the steady state equation
\begin{equation}
\vDC = \mDC \vDC + \vSrc
\end{equation}
where $\mDC$ is the optical propagation matrix between FEPs, $\vDC$ is the vector of fields at each FEP, and $\vSrc$ is the vector of injected fields (e.g., from the source in figure 1).
Solving for $\vecv{DC}$
\begin{equation}
\vDC = (\matI - \mDC)^{-1} \vSrc
\elabel{vDC}
\end{equation}
where $\matI$ is the identity matrix.
The sources are given, so $\vSrc$ is known and the computation boils down to computing the inverse of  $\matI - \mDC$.
The propagation matrix is built from the optics and links in the optical system.
For example, the matrix element which takes E4 to E3 is determined by the reflectivity of Mirror A and the length of Link 3.  Thus, this element\footnote{The indexing used in this document will reflect what is used in the Optickle code.
Indices will start at 1, and the colon operator indicates a series of integers (both standard in Matlab).}
of $\mDC$ is
\begin{equation}
\mDC(3,4) = -r_A e^{i 2 \pi ~ f_{mod} ~ l_3 / c}.
\end{equation}

More generally speaking, $\mDC$ is the sum of all of the input to output transfer matrices of all optics, multiplied by the phase induced by the links,
\begin{equation}
\mDC = \mPhi \mOpt
\end{equation}
with
\begin{equation}
\mOpt = \sum_{n=1}^{\Nopt} {\mOutn{n} \mOptn{n} \mInn{n}}.
\elabel{mOpt}
\end{equation}
As shown in the above equation, the contribution of a given optic to the overall transfer matrix is made up of three parts, a matrix which maps FEPs onto the inputs of the optic, the optic's own transfer matrix, and a matrix which maps the optic's outputs back to FEPs.

Taking Mirror A again from our example system (figure \fref{optFP}), and noting that its index is 3, its front input is from FEP 4 and its back input from FEP 1, the corresponding input matrix is
\begin{equation*}
\mInn{3} =
\matrixBegin{cccc}
 0 & 0 & 0 & 1 \\
 1 & 0 & 0 & 0 \\
\matrixEnd.
\end{equation*}
The output matrix, sending the field from the front of Mirror A to FEP 3 and from the back to FEP 2 is
\begin{equation*}
\mOutn{3} =
\matrixBegin{cc}
 0 & 0 \\
 0 & 1 \\
 1 & 0 \\
 0 & 0 \\
\matrixEnd.
\end{equation*}
Finally, assuming that Mirror A has an amplitude transmission coefficient of $t_A$ and an amplitude reflectivity of $r_A$ (which may be complex),
\beq{mirror_matrix}
\mOptn{3} =
\matrixBegin{cc}
 -r_A & t_A \\
 t_A & r_A \\
\matrixEnd
.
\eeq

The sum is used in equation \eref{mOpt} to combine the matrices of all optics, though it is expected that no element will contain contributions from more than one optic.
That is, the transfer from one FEP to another happens only through the optic that connects them, which Optickle forces to be unique during construction.

Returning to the full set of RF components in our example system $\vFrf = \grp{-f_{mod},0,f_{mod}}$, the matrices for Mirror A are duplicated in block diagonal form with one block for each RF component, becoming
\begin{equation*}
\mInn{3} =
\matrixBegin{cccccccccccc}
 0 & 0 & 0 & 1 & & & & & & & & \\
 1 & 0 & 0 & 0 & & & & & & & & \\
 & & & & 0 & 0 & 0 & 1 & & & & \\
 & & & & 1 & 0 & 0 & 0 & & & & \\
 & & & & & & & & 0 & 0 & 0 & 1 \\
 & & & & & & & & 1 & 0 & 0 & 0 \\
\matrixEnd,
\end{equation*}
\begin{equation*}
\mOutn{3} =
\matrixBegin{cccccc}
 0 & 0 & & & & \\
 0 & 1 & & & & \\
 1 & 0 & & & & \\
 0 & 0 & & & & \\
 & & 0 & 0 & & \\
 & & 0 & 1 & & \\
 & & 1 & 0 & & \\
 & & 0 & 0 & & \\
 & & & & 0 & 0 \\
 & & & & 0 & 1 \\
 & & & & 1 & 0 \\
 & & & & 0 & 0 \\
\matrixEnd,
\end{equation*}
\begin{equation*}
\mOptn{3} =
\matrixBegin{cccccc}
 -r_A & t_A & & & & \\
 t_A & r_A & & & & \\
 & & -r_A & t_A & & \\
 & & t_A & r_A & & \\
 & & & & -r_A & t_A \\
 & & & & t_A & r_A \\
\matrixEnd.
\end{equation*}
Note that the input and output transformations do not change the RF frequency of a field component, and in the case of a mirror, nor does the optic.
However, some optics can convert one RF component to another (e.g., an RF modulator), and this will cause non-zero matrix elements appear in the normally empty off-diagonal areas of the optic's transfer matrix.

Lastly, the propagation phase associated with moving from the input of a link to its output appears in the diagonal matrix
\begin{equation}
\mPhi(k,k) = e^{i ~ \vFrf(m) ~ \vLen(n)}
\elabel{mPhi}
\end{equation}
with $n \in 1:\Nlnk$, $m \in 1:\Nrf$ and $k = n + \Nlnk (m - 1)$.
\begin{equation}
\vLen(n) = 2 \pi ~ l_n / c
\end{equation}

At this point we have constructed $\mDC$ from the parameters of the Optickle model, so we need only put it into equation \eref{vDC} to find the DC field vector $\vDC$.
The result is then used as the seed for computing the response of the system to excitation of one of the optic's internal \dsf, discussed in the following section.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{AC Fields}

The computation of AC fields is similar to that of DC fields, except that the optics now play a more active role.
Moving Mirror A at 100Hz, for example, generates 2 audio frequency sidebands on each RF field component of the reflected fields (from E1 into Link 2 and from E4 to Link 3).
AF sidebands, in turn, beat against static fields to produce forces on optics and signals on sensors.

In the AC case, the number of degrees of freedom to be considered more than doubles relative to the DC computation, and the matrices are no longer relationships just between fields, but are generalized to include the optics in the system.
The AC equation analogous to equation \eref{vDC} is
\begin{equation}
\vAC = (\matI - \mAC)^{-1} \vExc
\elabel{vAC}
\end{equation}
where a given excitation vector produces a vector of audio sideband fields.
A further transformation, determined by the probes place in the system, converts fields to signals
\begin{equation}
\vSig = \mPrb (\matI - \mAC)^{-1} \vExc
\elabel{vSig}
\end{equation}
The transfer matrix, from normalized excitations to signals, is thus just the core of the above equation,
\begin{equation}
\mTF = \mPrb (\matI - \mAC)^{-1}
\elabel{mTF}.
\end{equation}
This matrix is one of the primary results produced by the Optickle compute function.

In Optickle the audio frequency transfer matrix, $\mAC$, is constructed in blocks
\begin{equation}
\mAC =
\matrixBegin{cc}
 \matm{field-field} & \matm{optic-field} \\
 \matm{field-optic} & \matm{optic-optic} \\
\matrixEnd
.
\elabel{mAC}
\end{equation}
where $\matm{field-field}$ is a matrix similar to $\mDC$ which represents transfers among fields, though in this case they are AF sideband fields.
As the names indicate, $\matm{optic-field}$ and $\matm{field-optic}$ represent the relationships between the optics' degrees of freedom and the AF sideband fields.
The $\matm{optic-optic}$ matrix is diagonal, with non-zero terms
 resulting from the radiation reaction force which can be produced
 by static fields on an optic. 
The following sections will describe the construction of each of these matrices in detail.

%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{General AC Considerations}
\sslabel{freq_domain}

In order to describe the audio frequency (a.k.a., ``AC'') calculations done in Optickle,
 we will use both the time and frequency domain.
In this section we setup a framework for making the transition from one domain to
 the other consistent throughout.

For a sinusoidal motion for $x(t)$
\beqa{mirror_x}
x(t) &=& \real{ \tilde{x} } \fcos{\Omega t} - \imag{\tilde{x} } \fsin{\Omega t} \\
  &=& \half \real{ \tilde{x} } \(e^{i \Omega t} + e^{-i \Omega t} \) + \tfrac{i}{2} \imag{\tilde{x} } \(e^{i \Omega t} - e^{-i \Omega t} \) \\
  &=& \half \( \tilde{x} ~ e^{i \Omega t} + \tilde{x}^* ~ e^{-i \Omega t} \) \\
  &=& \real{ \tilde{x} ~ e^{i \Omega t} }
\eeqa
 such that the complex value $\tilde{x}$ describes the amplitude and phase of $x(t)$.
This is, of course, the usual discrete Fourier transform of a real function
 in which we have highlighted one frequency component $\Omega$. 
Interestingly, the minus sign before $\fsin{\Omega t}$ in the first line is necessary to recover
 this standard definition.

%Note an interesting feature of this definition: a delay increases the phase of $\tilde{x}$.
%Consider an $x_2(t)$ defined as a delayed copy of $x_1(t)$: $x_2(t) = x_1(t - \Delta t)$
% such that what happens at time $t$ in $x_2$ happened at time $t - \Delta t$ in $x_1$.
%In the frequency domain, the delayed signal $\tilde{x}_2$ is
%\beqa{}
%\real{ \tilde{x}_2 ~ e^{-i \Omega t} } &=& \real{ \tilde{x}_1 ~ e^{-i \Omega (t - \Delta t)} } \\
%\Rightarrow \tilde{x}_2 &=& \tilde{x}_1 e^{i \Omega \Delta t}
%\eeqa

Similarly, for a power level which is varying at angular frequency $\Omega$
 due to a carrier field $E_{DC}$ with positive and negative audio sidebands $E_{\pm}$,
 \beq{}
 P(t) = P_{DC} + P_{\Omega} + P_{2 \Omega} = \abs{ E_{DC}  + E_{-} e^{+i \Omega t} + E_{+} e^{-i \Omega t} }^2
 \eeq
 the variation at $\Omega$ is
\beqa{power-force_trig}
P_{\Omega}  &=& E_{DC}^* E_{-} e^{+i \Omega t} + E_{DC} E_{-}^* e^{-i \Omega t}  +
    E_{DC}^* E_{+} e^{-i \Omega t} + E_{DC} E_{+}^* e^{+i \Omega t}  \nonumber \\
  &=& (E_{DC}^* E_{-} + E_{DC} E_{+}^* )^* e^{+i \Omega t} + (E_{DC} E_{-}^* + E_{DC}^* E_{+} ) e^{-i \Omega t} \nonumber \\
  &=& 2 \real{ (E_{DC}^* E_{-} + E_{DC} E_{+}^* ) e^{+i \Omega t} } \nonumber \\
&& \Rightarrow \tilde{P}_{\Omega} = 2 \( E_{DC}^* E_{-} + E_{DC} E_{+}^* \) \elabel{tildePX}
\eeqa

An amplitude modulator, for instance, which produces relative intensity modulation as
\beqa{}
P(t)  &=& P_{DC} (1 + A \fcos{\Omega t}) \\
  &=& \abs{E_{DC}}^2 + A E_{DC}^* E_{DC} \fcos{\Omega t} \\
\Rightarrow \tilde{P}_{\Omega} &=& A E_{DC}^* E_{DC}  \\
 &=& \half A \( E_{DC}^* E_{DC} + E_{DC} E_{DC}^* \)  \nonumber \\
 &=& 2 \( E_{DC}^* E_{-} + E_{DC} E_{+}^* \) \nonumber \\
\for && E_+ = E_- = \frac{A}{4} E_{DC} 
\eeqa
 where in the last step we have identified the audio sideband (SB) amplitudes produced by this modulation.
To express this in matrix form, and allow $A$ to be a complex amplitude rather than just a real number,
 we an write
\beq{AMmod_ASB}
\matrixBegin{c}
E_- \\
E_+^*
\matrixEnd
 =
\matrixBegin{c}
 E_{DC} \\
 E_{DC}^*
\matrixEnd
\frac{\tilde{A}}{4}
\eeq
 and the power at $\Omega$ is given by
\beq{AMmod_matrix_example}
\tilde{P}_{\Omega} =
2 \matrixBegin{cc}
 E_{DC}^*, & E_{DC}
\matrixEnd
\matrixBegin{c}
E_- \\
E_+^*
\matrixEnd
 = 
2 \matrixBegin{c}
 E_{DC} \\
 E_{DC}^*
\matrixEnd^\dagger
\matrixBegin{c}
E_- \\
E_+^*
\matrixEnd
\eeq
 where in the last step we have introduced the complex-transpose or adjoint operator $\dagger$.
 
Note that the conjugation of the upper sideband component is necessary to allow the
 conversion from sideband amplitudes to power.
(This is required in the field-optic part of $\mAC$ in equation \eref{mAC},
 and is made more explicit in section \sref{field-optic}.)
Also note that the choice of which sideband to conjugate is not arbitrary:
 conjugating the lower sideband rather than the upper, as in the two-photon formalism,
 would result in an overall conjugation of the results and thus a time reversal with respect
 to the Fourier coefficient as defined in equation \eref{mirror_x}.


%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Field to Field Transfer Matrix}
This part of  is almost identical to $\mDC$, the major differences being that for each RF component 2 AF sidebands must be computed, and that the propagation phase associated with the links must account for the sum of the RF and AF phases.
Restating,
\begin{equation}
\matm{field-field} =
\matrixBegin{cc}
 \mPhin{-} & 0 \\
 0 & \mPhin{+}^*\\
\matrixEnd
\matrixBegin{cc}
 \mOpt & 0 \\
 0 & \mOpt^* \\
\matrixEnd
\end{equation}
where in this case the link phase is
\begin{equation}
\mPhin{\pm}(k,k) = e^{i ~ 2 \pi (\nu_m \pm f_{AF}) ~ l_n / c}
\end{equation}
which is the same as equation \eref{mPhi}, with the addition of the audio frequency component.

%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Optic to Field Transfer Matrix}
The optic to field matrix, much like the field to field matrix, must result in both upper and lower audio sidebands at FEPs, so it is constructed as
\begin{equation}
\matm{optic-field} =
\matrixBegin{c}
 \mPhin{-} \mGen \\
 \mPhin{+}^* \mGen^* \\
\matrixEnd
\elabel{mOF}
\end{equation}
The matrix $\mGen$ is composed of an optic specified matrix and DC fields, and can be written as
\begin{equation}
\mGen = \sum_{n=1}^{\Nopt} {\mOutn{n} \mGenn{n} \mDrvn{n}^{T}}.
\end{equation}
where $\mDrvn{n}$ is the matrix which maps the internal \dsf\ of the $n^{th}$ optic onto the system wide \dsf. The DC fields are present as source fields which the optics modulate to produce audio SBs,
\begin{equation}
\mGenn{n} = \matrixBegin{c}
\mGenn{n,1} , ~~~ \mGenn{n,2} , ~~~ \cdots , ~~~ \mGenn{n,N_{dof_n}}
\matrixEnd \elabel{mGen}
\end{equation}
where
\begin{equation}
\mGenn{n,m} = \mCpln{n,m} \vDCn{n,in}
\end{equation}
Here, $\mCpln{n,m}$ is the modulation produced by driving optic $n$, \dof\ $m$.
The indices are $n \in 1:\Nopt$, $m \in 1:N_{dof_n}$.

The coupling matrix $\mCpln{n,m}$ can be written in terms of $\mOptn{n}$
\begin{equation}
\mCpln{n,m} = \frac{1}{2} \partderiv{\mOptn{n}}{x_{n,m}}
\elabel{mDrv}
\end{equation}
where $x_{n,m}$ the $m^{th}$ \dof\ of the $n^{th}$ optic. The usual input and output transforms are in place to map the source fields in and the generated audio-sidebands out.
After the output mapping, $\mPhi$ appears in equation \eref{mOF} to carry the audio-sidebands from the output of the optics where they are generated, which are inputs of the associated links, to the FEPs at the outputs of the links.

As an example, let's look at audio sideband generation by a mirror at normal incidence.
Given an input field $E_{in}$, the field reflected from the front of the mirror is
\beq{mirror_refl}
E_{out} = -r e^{-2 i k x} ~ E_{in}
\eeq
 since forward motion of the mirror by $x$ causes a shortening the propagation path of the beam by $2 x$.

For small $x$, such that $k x \ll 1$, we can approximate the exponential to first order as
\beqa{mirror_refl}
E_{out} &=& -r (1 - 2 i k x)  E_{in} \\
 &=& -r E_{in} + i k r  ~ E_{in} \( \tilde{x}^* ~ e^{-i \Omega t} + \tilde{x} ~ e^{+i \Omega t} \) \\
 &=& -r E_{in} + E_+ e^{+i \Omega t} + E_- e^{-i \Omega t} \\
\where && E_+ = i k r ~E_{in} ~\tilde{x} ~~ \and ~~ E_- = i k r ~E_{in} ~\tilde{x}^* 
\eeqa
Thus, the production of audio sidebands in reflection from the mirror is given by
\beq{mirror_ASB}
\matrixBegin{c}
E_- \\
E_+^*
\matrixEnd
 =
\matrixBegin{c}
 +i k r E_{in} \\
 -i k r E_{in}^*
\matrixEnd
\tilde{x}
\eeq
 which is just a single element version of equations \eref{mOF}, \eref{mGen} and \eref{mDrv} in which
 $E_{in}$ is one element of $\vDC$, $-r e^{-2 i k x}$ is one element of $\mOpt$,
 and the propagation phase to the next FEP is not yet accounted for.

%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Field to Optic Transfer Matrix}
\sslabel{field-optic}

This matrix is actually the product of the field-to-force matrix, and the force-to-degree of freedom matrix, where ``degree of freedom'' most often means ``position''.
\beq{field-optic}
\matm{field-optic} = \mResp \mRad
\eeq
The response matrix $\mResp$ is typically the mechanical response of the optics to radiation pressure induced force, summed over all optics in the system,
\begin{equation}
\mResp = \sum^{\Nopt}_{n=1} \mDrvn{n} \mRespn{n} \mDrvn{n}^T
\elabel{mResp}
\end{equation}
$\mRad$ converts audio sideband fields to radiation forces on the optics,
 and the computation of this matrix is the topic of rest of this section.\footnote{
 In the following derivation, we will assume the optic in question is a mirror
 with incoming beams from the front and back at normal incidence.
We will also consider only a single RF field component.
The generalization of the result will follow.}

To compute the force available for generating mechanical motion,
 we start by summing up the incoming and outgoing momenta
\beq{field-force}
F = \( P_{back_{in}} + P_{back_{out}} - P_{front_{in}} - P_{front_{out}} \) / c
\eeq
Note that this produces an easily recognized result in the special case of a
 perfect absorber: $F_a = ( P_{back_{in}} - P_{front_{in}} ) / c$,
 since the beam on the back pushes forward and the one on the front pushes back.
And also in the case of a perfect reflector: $F_r = 2 ( P_{back_{in}} - P_{front_{in}} ) / c$,
 since the outgoing beams have the same power as the incoming beams.

The modulation of each incoming and outgoing power by the co-propagating DC field and its audio SBs is given by
\beq{power-force}
 P_X = \abs{ E_{DC_X}  + E_{-_X} e^{+i \Omega t} + E_{+_X} e^{-i \Omega t} }^2
\eeq
 where $X \in \set{\rm back_{in, out} , {front_{in,out}} }$,
  $E_{\pm_X}$ are the upper and lower sideband amplitudes,
 and $\Omega = 2 \pi f_{\rm audio}$ is the audio angular frequency.
Converting this expression to the frequency domain gives
\beqa{power-force_trig}
\tilde{P}_X &=& 2 \( E_{DC_X}^* E_{-_X} + E_{DC_X} E_{+_X}^* \) \elabel{tildePX}
\eeqa
 as discussed in section \sref{freq_domain}.
 
For the $n^{th}$ optic we can compute $E_{DC}$ at the outputs, given the inputs, with the field
 to field matrix $\mOptn{n}$ as
\begin{equation}
\vDCn{n,out} = \mOptn{n} \vDCn{n,in} ~~ \where ~~
\vDCn{n,in} = \mInn{n} \vDC
\end{equation}
For the AF fields, the situation is somewhat more complicated since
 they can be produced by motion of the optic and thus appear at the output
 without coming in the input
\beqa{vAC_out}
\vACn{n,in} &=&
\matrixBegin{cc}
\mInn{n}  & 0 \\
0 & \mInn{n}^*
\matrixEnd
 \vACn{fld} \\
\vACn{n,out} &=& 
\matrixBegin{cc}
\mOptn{n} & 0 \\
0 & \mOptn{n}^*
\matrixEnd
\vACn{n,in} + 
\matrixBegin{c}
\mGenn{n} \\
\mGenn{n}^*
\matrixEnd
\vec{\tilde{x}}_{n}
\eeqa
 where $\mGenn{n}$ is a matrix representing the
 AF fields generated by the $n^{th}$ optic (see equation \eref{mGen}).

To finish the translation to matrix math, we should convert the sum in equation \eref{field-force}
 to a matrix multiplication.
Before continuing with this math, we will, however, drop the optic index $n$;
 all of these matrices and vectors are for a particular optic.
\beqa{force_in}
\tilde{F}_{in} &=& \frac{2}{c} \matrixBegin{c}
\vDCn{in}^\dagger \mDirn{in}, ~~~
\vDCn{in}^T \mDirn{in}
\matrixEnd
 \vACn{in} \\
 &=& \frac{2}{c} \matrixBegin{c}
\mDirn{in} \vDCn{in} \\
\mDirn{in} \vDCn{in}^*
\matrixEnd^\dagger
 \vACn{in}
\eeqa
 where, $\mDirn{in}$ is a diagonal matrix of real coefficients.
For the example of a mirror with the first input on the front and the second on the back
\beq{Mdir_in}
\mDirn{in} = \matrixBegin{cc} -1 & 0 \\  0 & 1 \matrixEnd
\eeq
The output is similar,
\beqa{force_out}
\tilde{F}_{out} &=& \frac{2}{c} \matrixBegin{c}
\vDCn{out}^\dagger \mDirn{out}, ~~~
\vDCn{out}^T \mDirn{out}^*
\matrixEnd
 \vACn{out} \\
 &=& \frac{2}{c} \matrixBegin{c}
\mDirn{out} \mOpt \vDCn{in} \\
\mDirn{out} \mOpt^* \vDCn{in}^*
\matrixEnd^\dagger
 \vACn{out}
\eeqa
 such that the total force is
\beqa{force_total}
\tilde{F} &=& \frac{2}{c}
\matrixBegin{c}
(\mOpt^\dagger \mDirn{out} \mOpt + \mDirn{in}) \vDCn{in} \\
(\mOpt^T \mDirn{out} \mOpt^* + \mDirn{in})  \vDCn{in}^*
\matrixEnd^\dagger
 \vACn{in} \\
&& + \frac{2}{c}
\matrixBegin{c}
\mDirn{out} \mOpt \vDCn{in} \\
\mDirn{out} \mOpt^* \vDCn{in}^*
\matrixEnd^\dagger
\matrixBegin{c}
\mGen \\
\mGen^*
\matrixEnd
\vec{\tilde{x}} \nonumber \\
&=& \frac{2}{c} \matrixBegin{c}
(\mOpt^\dagger \mDirn{out} \mOpt + \mDirn{in}) \vDCn{in} \\
(\mOpt^T \mDirn{out} \mOpt^* + \mDirn{in})  \vDCn{in}^*
\matrixEnd^\dagger
 \vACn{in} \\
&& + \frac{4}{c}
\real{ \vDCn{in}^\dagger  \mOpt^\dagger \mDirn{out} \mGen }
\vec{\tilde{x}} \nonumber
\eeqa

This can be reconnected to our starting point with the
 concrete example of a mirror using $\mOpt$ from equation \eref{mirror_matrix},
 and a single incoming field on the front surface:
\beq{}
\mOpt =
\matrixBegin{cc}
 -r & t \\
 t & r
\matrixEnd
, ~~~ \vDCn{in} = \matrixBegin{cc}
 E_{DC} \\
 0
\matrixEnd
, ~~~ \vACn{in} = \matrixBegin{cc}
 E_+ \\
 0 \\
 E_-^* \\
 0
\matrixEnd
\eeq
Thus,
\beqa{}
\mOpt^\dagger \mDirn{out} \mOpt &=& 
\matrixBegin{cc}
 -r & t \\
 t & r
\matrixEnd^\dagger
\matrixBegin{cc} -1 & 0 \\  0 & 1 \matrixEnd
\matrixBegin{cc}
 -r & t \\
 t & r
\matrixEnd \\
&=& 
\matrixBegin{cc}
 \abs{t}^2 - \abs{r}^2 & t r^* + r t^* \\
 t r^* + r t^*  & \abs{r}^2 - \abs{t}^2
\matrixEnd \\
&=& 
\matrixBegin{cc}
 1 - 2 R - L & t r^* + r t^* \\
 t r^* + r t^*  & 2 R + L - 1
\matrixEnd
\eeqa
where the power reflectivities and losses are $R = \abs{r}^2$, and $L = 1 - \abs{r}^2 - \abs{t}^2$.
This leads us to
\beqa{}
\mOpt^\dagger \mDirn{out} \mOpt + \mDirn{in} &=& 
\matrixBegin{cc}
 -(2 R + L) & t r^* + r t^* \\
 t r^* + r t^*  & 2 R + L
\matrixEnd 
\eeqa
 from which we conclude that the force due to incoming AF fields is
\beqa{}
\tilde{F}_{AC} &=& \frac{2}{c} 
\matrixBegin{cc}
 -(2 R + L)  E_{DC} \\
 (t r^* + r t^*)   E_{DC} \\
 -(2 R + L)  E_{DC}^* \\
 (t r^* + r t^*)   E_{DC}^* \\
\matrixEnd^\dagger
\matrixBegin{cc}
 E_+ \\
 0 \\
 E_-^* \\
 0
\matrixEnd  \\
&=& -\frac{2}{c} (2 R + L)  (E_{DC}^* E_+ + E_{DC} E_-^*) \\
&=& -\frac{1}{c} (2 R + L) \tilde{P}_{front_{in}}
\eeqa
This matches the naive result:
 the radiation force is $P / c$ times the absorption coefficient $L$ and twice the reflectivity $R$.

The radiation force which results from production of AF fields by the optic is given by the second
 term in equation \eref{force_total}.
This term contains $\mCpl$, as shown in equation \eref{mDrv}, and equation \eref{mirror_ASB} for a mirror.
For our simple mirror example,
\beqa{mirror_Mdrv}
\mCpl &=& 
\matrixBegin{cc}
 i k r & 0\\
 0 & i k r
\matrixEnd  \\
\Rightarrow \mOpt^\dagger \mDirn{out} \mCpl &=&  i k r
\matrixBegin{cc}
 r & t \\
 -t & r
\matrixEnd^* \\
\Rightarrow \tilde{F}_{x} &=& \frac{4}{c} \real{ i k \abs{r E_{DC}}^2 } \tilde{x} = 0
\eeqa
 which again matches the naive expectation:
 phase modulation of a beam does not create a radiation reaction force.
Note, however, that if fields were incident on both sides of the mirror
 the radiation reaction would be 
\beqa{mirror_Mdrv2}
  \tilde{F}_{x2} &=& \frac{4}{c} \real{ i k r t^* (E_{DC1}^* E_{DC2} - E_{DC1} E_{DC2}^*) } \tilde{x} \\
     &=& \frac{8}{c} \real{ k r t^* } \imag{E_{DC1} E_{DC2}^*} \tilde{x}
\eeqa
 which may be non-zero if the two incoming beams are not phase matched.

Finally, we can return to the initial problem of finding $\mRadn{n}$ for a given optic in equation \eref{field-optic}.
We can see from equation \eref{force_total} that the force driven by incoming audio fields has
 a transfer matrix given by
\beq{mRad}
\mRadn{n,m} = \frac{2}{c} \matrixBegin{c}
(\mOpt^\dagger \mDirn{out} \mOpt + \mDirn{in})_{n,m} ~ \mInn{n} \vDC \\
(\mOpt^T \mDirn{out} \mOpt^* + \mDirn{in})_{n,m} ~ \mInn{n}^* \vDC^*
\matrixEnd^\dagger
\eeq
 such that the overall radiation reaction matrix is
\beq{}
\mRad = \sum^{\Nopt}_{n = 1} \mDrvn{n}
\mRadn{n}
\matrixBegin{cc}
\mInn{n} & 0 \\
0 & \mInn{n}^*
\matrixEnd
\eeq
 where the $\mRadn{n}$ for all drives of a given optic is a vertical concatenation of the
 radiation pressure applied to each individual drive
 \beq{}
\mRadn{n} = 
\matrixBegin{c}
 \mRadn{n,1} \\
 \vdots \\
 \mRadn{n,N_{drive}}
\matrixEnd 
\eeq

%Expanding our discussion to TEM01 and 10 modes would lead us to
% consider the field-to-torque and torque-to-angle matrices, but we can save that for later.

%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Optic to Optic Transfer Matrix}
Similar to the field-optic matrix, the optic-optic matrix is driven by radiation forces.
\begin{equation}
\matm{optic-optic} = \mResp \mFrc
\end{equation}
 where $\mFrc$ comes from the radiation reaction force $\tilde{F}_x$ derived in the previous section.
 
From equation \eref{force_total}, the force coefficient for a given drive is
\beq{mFrc_nm}
\mFrcn{n,m} = \frac{4}{c} \real{ \vDC^\dagger  \mInn{n}^T \mOpt^\dagger \mDirn{out} \mGenn{n,m} }
\eeq
 and the force matrix for a given optic is diagonal
\beq{mFrc_n}
\mFrcn{n} =
\matrixBegin{cccc}
 \mFrcn{n,1} & 0 & 0 & \cdots \\
 0 & \mFrcn{n,2} & 0 &  \\
 0 & 0 & \ddots &  \\
 \vdots & & & \mFrcn{n,N_{drive}}
\matrixEnd 
\eeq
The system wide matrix is made in the usual way, as a sum over all optics with the
 appropriate mapping matrices:
\beq{mFrc}
\mFrc = \sum^{\Nopt}_{n = 1} \mDrvn{n} \mFrcn{n} \mDrvn{n}^T
\eeq
 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Signal Production}
Converting DC and audio frequency fields to signals is the job of probes placed in the system.
Probe signals result from power measured by the probe and is thus similar to the radiation pressure interaction described in $\matm{field-optic}$.
The major difference is that probes can demodulate signals at RF frequencies, thereby mixing RF components.

As with fields, there are two computations to perform: DC and AC.
DC signals are the signals present given only the DC fields present, and are thus related to the current working point of the Optickle system.
AC signals, on the other hand, are products between DC and audio frequency fields: they tell us about the response of the system around the current working point as seen in equation \eref{vSig}.

%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{DC Signals}
To compute the DC signals, we start with an expression for the intensity present at a given FEP,
\begin{eqnarray}
I_{DC} &=& \left| \sum^{\Nrf}_{n = 1} E_{DC_n} e^{-i \omega_n t}  \right|^2 \\
 &=& \sum^{\Nrf}_{m = 1} \sum^{\Nrf}_{n = 1}
 E^*_{DC_m} E_{DC_n} e^{i (\omega_m - \omega_n) t}
\elabel{intensity}
\end{eqnarray}
where $E_{DC_n}$ is the field amplitude of the $n^{th}$ RF component, at frequency $\omega_n = 2 \pi \nu_n$.

Requiring that the output be at the demodulation frequency $\omega_{dmd} = 2 \pi f_{dmd}$, such that the integral
\beqa{}
S_{DC} &=& \lim_{T \rightarrow \infty} \frac{2}{T} \int^{T}_{-T} I_{DC}
 \fcos{\omega_{dmd} ~ t + \phi_{dmd}} dt \\
 &=& \frac{1}{2} \sum^{\Nrf}_{m, n}
 E^*_{DC_m} E_{DC_n} \cdots \\
&& \lim_{T \rightarrow \infty} \int^{T}_{-T} \!\!\! e^{i (\omega_m - \omega_n) t} 
   \(e^{i (\omega_{dmd} t + \phi_{dmd}) } + e^{-i (\omega_{dmd} t + \phi_{dmd})} \) dt \nonumber
\eeqa
is non-zero removes most of the terms in the sum by introducing a delta function
\begin{equation}
S_{DC} = \sum^{\Nrf}_{m = 1} \sum^{\Nrf}_{n = 1}
 E^*_{DC_m} E_{DC_n} \delta_{mn}
\elabel{sigDC}
\end{equation}
where
\begin{align}
\delta_{mn} =
& \tfrac{1}{2} \fun{\delta}{\nu_m - \nu_n + f_{dmd}} e^{ i \phi_{dmd}} ~ +  \nonumber \\
& \tfrac{1}{2} \fun{\delta}{\nu_m - \nu_n - f_{dmd}} e^{-i \phi_{dmd}}.
\end{align}

Translating this into the language of matrix manipulation, the DC signal from the $k^{th}$ probe is
\begin{equation}
\vecv{sig_{DC}}(k) = \left( \mPrbInn{k} \vDC \right) ^\dagger \mPrbn{k} \mPrbInn{k} \vDC,
\end{equation}
where the probe's matrix expresses the delta function in equation \eref{sigDC} as the matrix
\begin{equation}
\mPrbn{k}(m, n) = \delta_{mn} ,
\end{equation}
and $\mPrbInn{k}$ is the input map for the probe.

%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{AC Signals}
The audio frequency signal, or ``AC signal'',
 computation follows a very similar path to that of the DC signals in the previous section.
Intensity present at a given FEP is
\beq{I_AC}
I = \left| \sum^{\Nrf}_{n = 1} \left( E_{DC_n} e^{-i \omega_n t} + E_{+_n} e^{-i (\omega_n + \Omega) t} 
   + E_{-_n} e^{-i (\omega_n - \Omega) t}  \right) \right|^2
\eeq
 where $\Omega = 2 \pi f_{\rm audio}$ is the audio sideband frequency being considered.
If we remove terms from the sum which are the product of the perturbative amplitudes
 $E_+$ and $E_-$, and those which are the product of 2 DC fields and thus have
 no audio frequency component, we are left with
\begin{align}
I_{AC} = \sum^{\Nrf}_{m = 1} \sum^{\Nrf}_{n = 1} 2 Re & \left[
  E_{DC_m}^{*} E_{-_n} e^{i (\omega_m - \omega_n + \Omega) t} ~~ + \right. \nonumber \\
 & \left. ~~~ E_{DC_m} E_{+_n}^{*} e^{-i (\omega_m - \omega_n - \Omega) t} \right] .
\elabel{intensity}
\end{align}
The audio frequency signal at a FEP, for $\Omega \ll 1/T \ll \omega_{dmd}$, is
\beqa{sac}
S_{AC} &=& \frac{2}{T} \int^{T}_{-T} I_{AC} \fcos{\omega_{dmd} ~ t + \phi_{dmd}} dt \\
&=& 2 \sum^{\Nrf}_{m, n} Re \left[
  E_{DC_m}^{*} E_{-_n} ~ \delta_{mn} ~ e^{+i \Omega t} 
   + E_{DC_m} E_{+_n}^{*} ~ \delta_{mn}^* ~ e^{+i \Omega t} \right] \nonumber \\
\Rightarrow &&\tilde{S}_{AC} = 2 \sum^{\Nrf}_{m,n} (E_{DC_m}^* E_{-_n} \delta_{mn} + E_{DC_m} E_{+_n}^* \delta_{mn}^*)
\eeqa
(see section \sref{freq_domain}).

The overall probe matrix is constructed from the individuals row at a time according to
\begin{equation}
\mPrb(k,:) =
\matrixBegin{c}
\mPrbInn{k} \vDC \\
\mPrbInn{k} \vDC^{*}
\matrixEnd ^\dagger
\matrixBegin{cc}
\mPrbn{k} & 0 \\
0 & \mPrbn{k}^{*}
\matrixEnd
\matrixBegin{c}
\mPrbInn{k} \\
\mPrbInn{k}
\matrixEnd ,
\end{equation}
where $k \in 1:\Nprb$.
Note that the probe matrix $\mPrbn{k}$ for the upper audio sideband is the transpose of that for the lower sideband, as $m$ and $n$ are exchanged for the upper sideband in equation \eref{sac}.
It may seem odd that the input map is used so may times: two instances are for the DC fields in $\vDC$ and $\vDC^*$, other two bring in the correct the upper and lower audio frequency fields from $\vAC$ which is expected to arrive on the right (see equations \eref{vAC} and \eref{vSig}).

%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{AC Matrix Inversion}

While the inversion in equation \eref{mTF} can be performed directly,
 and pervious versions of Optickle did just this,
 the result is somewhat difficult to interpret.
The resulting transfer matrix $\mTF$ is from \emph{drives},
 such as mirror displacements, to AC signals.
The input drive to a mirror is not, however, the actual mirror displacement,
 but rather the displacement that you would get in the absence of radiation pressure effects.
That is, the modification of the drives by the system's opto-mechanics is included in $\mTF$.
It is also true that much of $\vExc$ is not used, since the excitations are generally always drives
 rather than direct audio sideband fiend injections.

To give a more easily interpreted result, and to reduce computation by addressing on the excitations
 which can actually be used, Optickle performs the computation suggested in equation \eref{mTF}
 using the block form of $\mAC$ shown in equation \eref{mAC}.
The inverse of a matrix divided into 4 blocks is:
\beqa{block_matrix}
\matrixBegin{cc}
A & B \\
C & D
\matrixEnd^{-1}
 &=& 
\matrixBegin{cc}
K & L \\
M & N
\matrixEnd \\
\where ~~ K &=& \( A - B D^{-1} C \)^{-1} \\
N &=& \( D - C A^{-1} B \)^{-1} \\
L &=& -A^{-1} B N = K B D^{-1} \\
M &=& -D^{-1} C K = N C A^{-1} 
\eeqa
The part of $\mTF$ which takes drives to signals is $L$ in the above block inversion,
 and the corresponding piece of the inverse of $\matI - \mAC$ is
\beqa{}
 \vSig &=& - \mPrb ~ \mOptTF ~ \matm{of} ~ \mMech ~ \vDrv \\
 \mOptTF &=& \( \matI - \matm{ff} \) ^{-1} \\
 \mMech &=& \( \matI - \matm{oo} - \matm{fo} ~ \mOptTF ~ \matm{of} \)^{-1}
\eeqa
 (we have shortened the subscripts ``optic'' and ``field'' to their first letter).
This has the advantage that the result can be returned to the user in 2 parts,
 one representing the drive-to-signal matrix
\beq{}
\matm{drv-sig} = \mPrb ~ \mOptTF ~ \matm{optic-field}
\eeq
 and the other representing the opto-mechanical modification of the drives, $\mMech$.

\subsection{A note about units}
An oft-asked question is, ``What are the units of sigAC?'' Assuming
the input laser power is in Watts, the laser wavelength is in metres
and that a mirror is being driven, sigAC has dimensions of W/$\mu$,
where $\mu$ denotes \emph{metres that there would have been had there
  been no radiation pressure}.

The reasoning behind this choice is that one is normally interested in
the optical response to the force applied by some mirror actuator
(units of W/N). The conversion factor from applied force to mirror
motion is generally only known in the absence of radiation pressure,
i.e. one has a transfer function with units $\mu$/N. Hence, to find the
desired response, one requires a quantity with dimensions of W/$\mu$.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Quantum Noise}

The computation of quantum noise in Optickle follows the 2-photon formalism
 originally presented by H. Yuen and later by C. Caves.
However, since Optickle was written before the author was aware of this formalism,
 there are some formal and notational differences in the computation.
In particular, Optickle propagates audio SBs separately, but since the conjugate of the upper SB
 is propagated this is equivalent to propagating a linear combination of 2-photon states,
 and thus the quantum noise computation can follow the 2-photon formalism without modification.

Optickle takes a direct approach to quantum noise computation:
 each loss point, unconnected port, and source object is treated as a source of
 uncorrelated vacuum fluctuations.
The output noise spectra are given by the incoherent sum of all of the injected vacuum
 fluctuations as seen by each probe.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Angular Transfer Functions}

Optickle can compute transfer functions for the TEM01 mode produced,
for example, by pitch of a mirror.  This is done in almost complete
analogy with the TEM00 computations described in the previous
sections.  The exceptions are the Gouy phase, and the dependence of
audio sideband injection amplitude on the Hermite-Gaussian beam
parameters.

As the names suggest tickle01 should be used to investigate pitch and
tickle10 for yaw.

\subsection{Coupling to 01/10 modes as a function of angle of
  incidence}

%%%%%%%%%%
\MEfig{h}{0.8}{mirrorAxes}{Definitions of axes and positive pitch/yaw
  angles at a mirror.}
%%%%%%%%%%
There was some confusion in the original version of Optickle as to
whether the coupling to misalignment modes was treated correctly for
non-normal incidence (it was). This section serves to explicity give
the calculations behind this process.

We define the axes at a mirror as shown in
Figure~\ref{fig:mirrorAxes}. The origin is located at the centre of
the HR surface of the mirror. Rotations are defined such that a
positive pitch (yaw) results from a right-handed rotation about the
$x$ ($y$) axis. The zero point of both rotations is taken to be the
positive $z$ axis. The symbol $\theta$ is used for rotations of the
mirror.

In three dimensions, the reflection of a vector (optical axis) from a
plane (mirror) is described by
\begin{equation}
  \label{eq:vectorReflection}
  \myVec{\mathrm{out}} = \myVec{\mathrm{in}}-2\left[(\myVec{\mathrm{in}}\cdot \hat{n}_\mathrm{mirr})\hat{n}_\mathrm{mirr}\right],
\end{equation}
where $\myVec{\mathrm{in}}$ and $\myVec{\mathrm{out}}$ are the vectors
of the incident and reflected beams, $\hat{n}_\mathrm{mirr}$ is the mirror
surface normal (which coincides with $\hat{z}$ for unperturbed
mirrors) and $\cdot$ denotes the standard dot product.

This expression is simply derived by writing the incoming vector in
terms of components parallel and perpendicular to the mirror
\begin{align}
  \myVec{\mathrm{in}}&=\myVec{\mathrm{in}}_\parallel+\myVec{\mathrm{in}}_\perp\\
  &= [\myVec{\mathrm{in}}-\myVec{\mathrm{in}}_\perp]+\myVec{\mathrm{in}}_\perp\\
  &= \left[\myVec{\mathrm{in}}-(\myVec{\mathrm{in}}\cdot \hat{n}_\mathrm{mirr})\hat{n}_\mathrm{mirr}\right]+(\myVec{\mathrm{in}}\cdot \hat{n}_\mathrm{mirr})\hat{n}_\mathrm{mirr}.
\end{align}
Noting that reflection simply reverses the component of the incoming
vector which is perpendicualr to the mirror's surface,
\begin{align}
  \myVec{\mathrm{out}}&= \left[\myVec{\mathrm{in}}-(\myVec{\mathrm{in}}\cdot \hat{n}_\mathrm{mirr})\hat{n}_\mathrm{mirr}\right]-(\myVec{\mathrm{in}}\cdot \hat{n}_\mathrm{mirr})\hat{n}_\mathrm{mirr},
\end{align}
we arrive at our answer.

Input beams and angles of incidence are constrained to be in the x-z
plane. For an angle of incidence $\phi_\mathrm{aoi}$ the input beam vector is
\begin{equation}
  \label{eq:inVec}
  \myVec{\mathrm{in}}=\threeVec{-\sin(\phi_\mathrm{aoi})}{0}{-\cos(\phi_\mathrm{aoi})}.
\end{equation}
Angles of incidence are measured in the same way as mirror yaws. Pitch
and yaw angles of the beam are represented by the symbol $\phi$.


\subsubsection{Mirror yaw}
If the mirror is rotated in yaw by angle $\theta_y$ its surface normal
is given by
\begin{equation}
  \hat{n}_\mathrm{mirr} = \big(\sin(\theta_y),0,\cos(\theta_y)\big)
\end{equation}
and the output beam is given, from (\ref{eq:vectorReflection}) and
(\ref{eq:inVec}), by
\begin{equation}
  \myVec{\mathrm{out}} = \threeVec{\sin(2\theta_y-\phi_\mathrm{aoi})}{0}{\cos(2\theta_y-\phi_\mathrm{aoi})}.
\end{equation}

The yaw angle of an output beam $\phi_y$ as a function of angle of
incidence is then obtained from the dot product of the output beam and
the plane $\hat{n}_{yaw}=\threeVec{1}{0}{0}$,
\begin{align}
  \phi_y &= \frac{\pi}{2} - \arccos\left[\frac{\myVec{\mathrm{out}}\cdot\hat{n}_{yaw}}{|\myVec{\mathrm{out}}||\hat{n}_{yaw}|}\right]\\
  &=\frac{\pi}{2} - \arccos\left[ \sin(2\theta_y-\phi_\mathrm{aoi}) \right]\\
  &=\frac{\pi}{2} - \arccos\left[ \cos\left(\frac{\pi}{2}-(2\theta_y-\phi_\mathrm{aoi})\right) \right]\\
&=2\theta_y-\phi_\mathrm{aoi}.
\end{align}

Similarly, the pitch angle $\phi_p$ is obtained from the dot product
of the output beam and the plane $\hat{n}_{pit}=\threeVec{0}{-1}{0}$,
\begin{align}
  \phi_p &= \frac{\pi}{2} - \arccos\left[\frac{\myVec{\mathrm{out}}\cdot\hat{n}_{pit}}{|\myVec{\mathrm{out}}||\hat{n}_{pit}|}\right]\\
  &=0.
\end{align}

These results are precisely what one would naively expect.

\subsubsection{Mirror pitch}
If the mirror is rotated in pitch by angle $\theta_p$ then its surface
normal is given by
\begin{equation}
  \hat{n}_\mathrm{mirr} = \threeVec{0}{-\sin(\theta_p)}{\cos(\theta_p)}
\end{equation}
and the output beam is given, again from (\ref{eq:vectorReflection})
and (\ref{eq:inVec}), by
\begin{align}
  \myVec{\mathrm{out}} = \big(-\sin(\phi_\mathrm{aoi}),-2\cos(&\phi_\mathrm{aoi})\cos(\theta_p)\sin(\theta_p),\nonumber\\
&-\cos{\phi_\mathrm{aoi}}+2\cos(\phi_\mathrm{aoi})\cos^2(\theta_p)\big).
\end{align}

The yaw angle of an output beam as a function of angle of incidence is
then obtained from the dot product of the output beam and the plane
$\hat{n}_{yaw}=\threeVec{1}{0}{0}$ as
\begin{align}
  \phi_y &= \frac{\pi}{2} - \arccos\left[\frac{\myVec{\mathrm{out}}\cdot\hat{n}_{yaw}}{|\myVec{\mathrm{out}}||\hat{n}_{yaw}|}\right]\\
  &=\frac{\pi}{2} - \arccos\left[ -\sin(\phi_\mathrm{aoi}) \right]\\
  &=\frac{\pi}{2} - \arccos\left[ \cos\left(\frac{\pi}{2}+\phi_\mathrm{aoi})\right) \right]\\
&=-\phi_\mathrm{aoi}.
\end{align}

The pitch angle of an output beam as a function of angle of incidence
is similarly obtained from the dot product of the output beam and the plane
$\hat{n}_{pit}=\threeVec{0}{-1}{0}$
\begin{align}
  \phi_p &= \frac{\pi}{2} - \arccos\left[\frac{\myVec{\mathrm{out}}\cdot\hat{n}_{pit}}{|\myVec{\mathrm{out}}||\hat{n}_{pit}|}\right]\\
  &=\frac{\pi}{2} - \arccos\left[2\cos(\phi_\mathrm{aoi})\cos(\theta_p)\sin(\theta_p)\right]\\
&=\frac{\pi}{2} - \arccos\left[\cos(\phi_\mathrm{aoi})\sin(2\theta_p)\right]\\
&\simeq \frac{\pi}{2} - \arccos\left[\cos(\phi_\mathrm{aoi})2\theta_p\right]\\
&\simeq \frac{\pi}{2} - \left[\frac{\pi}{2}-\cos(\phi_\mathrm{aoi})2\theta_p\right]\\
&=\cos(\phi_\mathrm{aoi})2\theta_p,
\end{align}
where, in the final lines, we have approximated the $\sin$ and $\arccos$
functions to first order as their argument is assumed small (since
$\theta_p$ is assumed small).

\subsection{Linear expansion and derivatives}
Optickle treats mirror misalignments as small perturbations around a
static operating point. In this regime, the important quantities are
the derivatives of the above-derived beam output angles with respect
to pitch and yaw perturbations. These derivatives are presented in
Jacobian-like form below
\begin{equation}
  J_\phi(\theta)=
\matrixBegin{cc}
 \partial \phi_p/\partial \theta_p & \partial \phi_p/\partial \theta_y \\
\partial \phi_y/\partial \theta_p & \partial \phi_y/\partial \theta_y
\matrixEnd
=\matrixBegin{cc}
 2\cos(\phi_\mathrm{aoi}) & 0 \\
0 & 2 
\matrixEnd.
\end{equation}

Alignment perturbations transfer some power from the fundamental mode
to higher-order modes. The coupling to first order modes due to
misalignment $\phi_{p/y}$ of the optical axis is given by
\begin{equation}
  \Psi = \Psi_{00}+i\frac{\phi_{p/y}}{\phi_0}\Psi_{01/10},
\end{equation}
where $\phi_0 = \lambda\pi/w(z)$. Hence the portion of first order
mode created on reflection from a mirror misaligned by angle $\theta_{p/y}$
will be
\begin{equation}
\matrixBegin{c}
\Psi_{01} \\
\Psi_{10}
\matrixEnd=i\frac{ J_\phi(\theta)}{\phi_0}
\matrixBegin{c}
\theta_p \\
\theta_y
\matrixEnd.
\end{equation}



\subsection{What does tickle10/01 do with components which are not
  mirrors/beamsplitters?}

Fill me in.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}
