Differential wavefront sensing and control using radio-frequency optical demodulation

Differential wavefront sensing is an essential technique for optimising the performance of many precision interferometric experiments. Perhaps the most extensive application of this is for alignment sensing using radio-frequency beats measured with quadrant photodiodes. Here we present a new technique that uses optical demodulation to measure such optical beats at significantly higher resolutions using commercial laboratory equipment. We experimentally demonstrate that the images captured can be digitally processed to generate wavefront error signals and use these in a closed loop control system for correct wavefront errors for alignment and mode-matching a beam into an optical cavity to 99.9\%. This experiment paves the way for the correction of even higher order errors when paired with higher order wavefront actuators. Such a sensing scheme could find use in optimizing complex interferometers consisting of coupled cavities, such as those found in gravitational wave detectors, or simply just for sensing higher order wavefront errors in heterodyne interferometric table-top experiments.

whilst the rest is unknown. Sensing of astigmatism and other higher order aberrations will be required to diagnose such issues and reduce their effects, this will be especially the case in third generation detectors that will require up to 10 dB of squeezing.
Simply increasing the number of segments up from quadrant photodiodes can be challenging due to crosstalk between the elements at radio frequencies [25]. CCD cameras have been used for imaging 10kHz heterodyne beats [26] and a prototype CMOS camera with on board per-pixel RF demodulation has been demonstrated at the prototype level by Patel .et.al [27]-although the latter devices do not appear to be commercially available. Time-of-flight cameras [28] may also offer a potential solution as these devices can perform on board demodulate at RF frequencies; although finding one suitable for use in interferometric experiments challenging due to them being highly specialised for depth sensing applications. Mechanical scanning devices [29,30] and digital interferometry techniques [31] have also been developed to image at higher resolutions than simple segmented photodiodes. Another possible technique which we develop further in this work is using optical demodulation. By moving to optical demodulation we can remove mechanical features that limit framerate, resolutions and any potential vibration couplings. Recently an all-optical device operating at kilohertz frequencies was demonstrated by Panigrahi .et.al [32]. As optical demodulation can be achieved using relatively standard commercial equipment, it offers an alternative to specialist and complex camera based sensors with integrated RF electronics which may not be suitable for specific wavelengths, especially at anything longer than 1um.
The optical lock-in camera [33] (OLC) technique demonstrated here performs optical demodulation at megahertz frequencies. High resolution images are digitally processed to mimic physically segmented photodiodes for simple data extraction. They can provide diagnostics of control signals generated from physical segmented photodiodes by quantify deformations and higher order mode content in the signal. Being digital, the segmentation used can be arbitrarily complex and be altered during operation offering far more adaptability over their physical counterparts. Alternatively, with higher resolutions available advanced analysis pipelines-such as a neural networks [34]-could enable more efficient information extraction.
In this paper we demonstrate a technique using OLCs that can match a beam to a cavity in alignment and shape to 99.9% using the same optical frequencies used for PDH locking. In section 2, we briefly review the production of the heterodyne beat when a phase-modulated beam is incident onto a cavity and how to extract information from it. In Section 3 we describe our proof-of-principle experiment that demonstrates the sensing of the misalignment, mode-mismatch and using this to form a closed-loop control system. The results of the experiment are then presented in Section 4.

Using optical lock-in cameras for differential wavefront sensing
Our optical lock-in camera consists of an amplitude modulator and a high-resolution camera, as shown in Fig. 1. The amplitude modulator acts as a fast switch for demodulating an optical beat over the mega-pixel array, the array itself acts as a low-pass filter. This allows us to measure the spatially varying amplitude and phase of the optical beat. In this section we examine how the optical lock-in camera can be used to image wavefront errors after they have interacted with an interferometric system. Such a system could be something as simple as reflection from a Fabry-Perot cavity or more complex systems such as those found in gravitational wave interferometers; in this work we consider the behaviour for the former simple case.
Consider a linearly polarised beam incident on an optical cavity, ( , ). This field can be represented in many bases such as the Hermite-or Laguerre-Gaussian modes-the exact choice of which does not matter here. The incident beam is phase-modulated at a frequency relative to the optical frequency 0 = / by an electro-optic-modulator (EOM). The field reflected from the cavity input coupled mirror, , is then used for Pound-Drever-Hall (PDH) locking and the  Fig. 1. Schematic of the optical lock-in camera scheme. A phase-modulated beam interacts with some interferometric system, be it a simple cavity or more complex system. At an output port the beam is demodulated optically using an amplitude modulator ( /4 waveplate, a pockels cell, and a polarising beamsplitter). The demodulated field is then imaged and processed, the resulting information then used for various actuating inputs.
sensing of differential wavefront errors in the incident field relative to the cavity. We assume, for simplicity, that none of the incident fields at the sideband frequencies 0 ± resonate in the cavity and are promptly reflected. When the cavity length is on resonance for the carrier field the reflected field will be of the form Here 1 is the EOM modulation index and assumed to be small, represents the portion of the resonating cavity field that leaks out, , and is part of the incident light at the carrier frequency that has been rejected from the cavity due to wavefront distortions. On resonance is real-valued, its magnitude and sign depends on whether the cavity is over-, under-, or critically-coupled.
The reflected field is then optically demodulated at by the amplitude modulator. We simplify the polarisation effects here for brevity and reduce the amplitude modulator to a simple modulation function ( ) = 1 2 [1 + 2 cos( + )], where 2 is the modulation index and the demodulation phase. An image of the demodulated beam is capture by a sCMOS camera over an exposure time . This effectively low-passes any intensity fluctuations at a frequency ∝ 1/ . Here we approximate a measured pixel value over a sensor area by considering the time-averaged signal Field intensity terms Optical beat terms d .
There are two sets of terms, those that vary with demodulation phase and those due to the intensities of each part of the optical field. A more complete picture that considers the exposure time is discussed in the accompanying supplemental material.
A more detailed treatment with polarisation effects can be found in [35] Yaw Pitch Size Astigmatism X Astigmatism Y By taking images at four different demodulation phases = {0, /2, , 3 /2} with Eq.3 we can extract the in-phase, I, signal which yields a term proportional to the differential wavefront, ( , ), The cavity field beat term is the PDH signal, this will only be suppressed when the cavity is locked to the incident field with no detuning present. In a more complex optical systems, such as gravitational wave interferometers, the quadrature signal can also be found using Q ≡ /2 − 3 /2 . In simple cases with two balanced sidebands you can always choose an offset for the demodulation phases such that Q = 0. It is important to note that value is not a continuous variable, it is digitised by the camera before we perform the subtraction operations. Depending on the camera this will be represented by an b -bit variable. This digital number (DN) is related to the number of photo-electrons by the conversion factor = ( ) 2 b d , where d is the well depth of the pixel, and ( ) is the linearity of the sensor. The b -bit representation limits the smallest measurable change relative to the large DC intensities, the ratio of the field intensities and the optical beat terms in Eq.3, therefore cameras with high-dynamic range are preferable to maximise performance.

Higher order mode wavefront sensing
Here we present an example case of sensing alignment information using the OLC. Let us consider a beam which is perfectly mode-matched but is misaligned and offset relative to the axis of an optical cavity. In the Hermite-Gaussian basis a small misalignment or offset of a perfect HG 00 beam will have some additional HG 10 or HG 01 mode. The complex valued amplitude of these higher order modes will be ∝ / 0 + /Θ [36], where Θ and 0 are the divergence and waist size of the cavity resonating cavity field. Similar relationships are applicable to second-order modes and mode-matching degrees of freedom.
The optical field incident on the cavity is ∝ + = HG 00 ( , ) + HG 10 ( , ) ignoring some overall power scaling. As the HG 00 mode is the eigenmode of the cavity, = HG 00 ( , ), the difference will be = HG 10 ( , ). From Eq.4, an anti-symmetric image will be generated by the OLC when the cavity is on resonance, I ∝ Re{ HG 10 ( , )HG * 00 ( , )} [36]. The simplest way to extract a signal relative to is to perform and operation similar to how a quadrant-photodiode measures the difference in power between two of its segments. Therefore we can apply an anti-symmetric mask to I and sum all the pixels to generate a single value. In this case the mask weights all pixels to the left of centre by -1 and those to the right by +1. An example of such masks are shown in Fig.2 for some of the lower order spatial modes-this does not just apply to the first order modes so one in-phase image can be masked in multiple ways to extract information on different mode contents. Computationally this is a fast enough operation that it can be used to generate feedback signals.

Gouy phase telescopes
Given that is complex and we only image the real part of the optical beat we are not able to simultaneously extract the two spatial quadratures and (alignment and translation) that a HG 10 or HG 01 mode can represent. Similar to how two measurements at different demodulation phases are required to extract both the in-phase and quadrature components of some oscillating signal, we must also perform two measurements at different Gouy phases; which can be thought of as a spatial demodulation phase. When sensing specific optical modes it is critical to consider the amount of Gouy phase, Ψ, they have accumulated before they observed at a detector [13]. The amount of Gouy phase a non-astigmatic Hermite-Gaussian HG mode accumulates as it propagates is ∝ (1 + + ). Considering our misaligned example previously, our image will evolve depending on the amount of Gouy phase the HG 10 accumulates whilst propagating where here we have explicitly highlighted the Ψ term in the HG functions. Therefore if we take two in-phase measurements at Gouy phases separated by /2 we can optimally extract both and -this is equivalent to measuring the beam in both the near-and far-field. Gouy phase telescopes [13] is name given to the lensing optics that are specifically designed to accumulate a particular amount of Gouy phase when a beam propagates through it. Two or more Gouy phase telescopes are typically required. For the first order modes the amount of accumulated Gouy phase must differ by /2 between them. For higher orders, this would need to be less, i.e. HG 20 would require /4. These values however are for optimal sensing, if we want to sense both HG 10 and HG 20 we can simply design the telescopes for a difference of /3. In Fig.1 we place the telescope between the amplitude modulator and the sensor, however it could be beforehand if required.

Description of the experiment
The aim of our experiment was to demonstrate that the OLC images can be used to for a closed loop control of both the alignment and mode-matching of a laser beam into an optical cavity.
Once these low order wavefront distortions were corrected we were then be able to see any higher spatial errors remaining. A schematic of the setup used is depicted in Fig. 3.
The experiment used an Innolight Memphisto NPRO laser, = 1064nm, which was phasemodulated at 17 MHz. The optical cavity used was a triangular cavity with a finesse of ≈ 400. The 17 MHz optical beat was measured on reflection of the cavity to generate a PDH for length locking. The digital control toolbox PyRPL [37] on Red Pitaya StemLab 125-14 was used to digitally demodulated and filter the PDH signal. This then controlled the length of the cavity with a piezoelectric transducer on one of the cavity mirrors.
A fraction of reflected beam was also sent to the OLCs. A high extinction ratio polariser and a half-waveplate were used for intensity control and ensuring a linearly polarised field enters the OLC. The amplitude modulator was formed using a quarter-waveplate to circularly polarise the light going into a Pockels cell (PC). The Pockels cell was electrically part of a series LC-circuit (resonant tank circuit) that was tuned to resonate at 17MHz, this provided both frequency selectivity and enhance the voltage across the cell. The Pockels cell switched the optical field between S-and P-polarisation when driven with its quarter wave voltage. The polarizing beamsplitter (PBS) then selects only one of the polarisations to complete the amplitude modulator.
A Siglent SDG6022 was used to generate the 17 MHz signal for driving the resonant tank circuit, this signal was amplified by a Mini Circuits LZY-22+ broadband RF amplifier. To set the optical demodulation phase, the phase of the 17 MHz signal was externally shifted using the auxiliary input on the SDG6022. This phase control signal was generated by another StemLab 125-14. This StemLab also generated another signal which is used to trigger the cameras each time the demodulation phase was changed.
The OLC used two sCMOS Andor Zyla 4.2 cameras, which were chosen for their linearity, high-dynamic range, and low noise properties. Given that balanced sidebands are used in this experiment a demodulation phase was chosen so that all the signal appears in the I images. This meant only two images for each camera had to be captured to extract all the information. Exposure times were kept as short as possible, around 10 to 50 us, which helped to reduce the effect of stray light and movements in the lab from being picked up by the camera between the two images. The cameras ran with a cropped region-of-interest (ROI) to accelerate data capture. Camera A captured 1000x1000 images with a 4x4 binning, which camera B 500x500 and 2x2 binning. This ROI was constrained by the size of the beams on the cameras, set by our Gouy phase telescope target of Ψ = /3 for sensing both the first and second order modes; the beam on camera A was larger than that on B. This all resulted in capturing I images at 100 Hz at 250x250 resolution. Higher resolutions at such speeds were limited by the speed of our software-based digital processing.
The alignment of the incident beam into the cavity was controlled electrically using a pair of tip-tilt mirrors (Physik Instrumente S-330 Piezo Tip/Tilt). The waist size and position were adjusted with a liquid lens (Optotune EL-10-30-C NIR with a -1 to +5D focal power range) on a manual translation stage. This resulted in five actuator degrees of freedom that need to be controlled. There are common and differential (COMM and DIFF) pitch and yaw between the two tip-tilts, and the focal length of the liquid lens. The former set the alignment and translation of the beam into the cavity and the latter a mix of waist size and position. The liquid lens translation stage was adjusted by hand when the other loops were closed.
The signal processing of the OLC images was handled by custom Python and C software. The I images from each camera were masked multiple times for each degree of freedom and summed to generate error signals for the control loops. Choosing the basis (spot size and position on the CCD) to generate the masks was important, as it affects the zero-point of the error signals. The cavity was first reasonably well mode-matched and aligned by hand, then steering mirrors in front of each camera were used to center the beam in the images. The masks were then generated For comparison, the cavity mode spectrum of higher-order modes seen by the cavity for both states are shown on the right. The peak is clipped at 1V due to the maximum ADC input to provide more resolution for the scan, the peak voltage of the HG 00 is 1.1V.
using the position and size of the beams. Small changes in the masks or offsets in the error signals themselves were used to fine tune the control loops to maximise the transmitted power. These digital signals were then send to a digital-to-analog converter for driving the tip-tilts and liquid lens. The control loops just consisted of simple integrators. Maximising the bandwidth of these loops was not the primary target of our work, the digital latency limited us to ≈ 20 , which was adequate for our needs here.

Results
A simple method used for measuring a beam's mode content relative to a cavity is by sweeping the cavity's length over a free-spectral-range whilst observing the transmitted power. Peaks in the transmission can then be matched with known higher-order mode resonances inferred from the cavity's geometry-although this is limited by modal degeneracy and sign ambiguities. We can estimate the total magnitude of effects such as misalignment and mismatch by computing the power ratio of different modes relative to HG 00 . For example, the power lost from the HG 00 resonance due to misalignment and offset errors can be determined by | | 2 = 10 / 00 . It is not possible to extract and from such a measurement due to the loss of phase information from measuring just transmitted power.
The OLC images shown in Fig.4 were taken with the cavity locked to the HG 00 mode. Keeping various actuators fixed, the cavity was quickly unlocked and a sawtooth signal applied to the cavity's piezoelectric actuator whilst measuring the transmitted optical power to perform the scan. In the misaligned case, the mode content is a mix of the first and second order modes which can be clearly seen in both the images as well as in the spectrums. The cavity was then re-locked and the control loops were closed. Once settled, the actuators were fixed, and another spectrum taken. The lower order modes are mostly suppressed now, as can be seen in the images and spectrum. Using the power ratios of the HG 01 , HG 10 , and LG 01 =HG 20 +HG 02 to the HG 00 , we see the control loops have improved the alignment and mode-matching to ≈ 99.9%. Careful tuning of the offsets in each of the error signals was crucial to reach this optimised state.
In Fig. 5   mode-matching the incident beam to the cavity using the OLC generated signals. At first there are clearly visible misalignment and mismatch between the two in-phase images. The alignment loops are closed first around 1s in, with differential yaw being the largest source of error. Lastly the mode-matching loops are closed at 7s. As seen in by the error signals there is some cross coupling between each of the degrees of freedom due to the liquid lens affecting the alignment of the beam. After they have settled transmitted power has been increased by ≈ 7%. Our technique improves over simple segmented photodiodes by providing information on any remaining wavefront errors that exist. Shown in the images at = 13 in Fig. 5 is the left over distortions after the HG 10 , HG 01 , and LG 01 have been suppressed by our control system. The remaining field consists mainly of HG 02 mode, or vertical astigmatism for which we have no dedicated actuator to correct with. It was possible to manually alter the alignment of the beam through liquid lens to alter this astigmatism slightly, hence the difference in the controlled images between Fig. 4 and Fig. 5. There is a significant amount of high spatial frequency errors which are present due to the the imperfect optical quality of multiple components in the system. These additional higher order modes contribute to offsets in calculated error signals [38]. Stationary effects can be easily compensated for with simple offsets, however any time vary effects cannot be easily distinguished from a real signal.
To test the ability of the system to an evolving wavefront distortions a 0.1Hz dither signal is injected into the liquid lens driver output. Figure 6 shows a sample of the time series during this time. Starting with all the loops off and no signal applied, the transmitted power is not optimal. Starting the dither we see the transmitted power peaks. Switching on all the controls loops then suppress the focal length changes keeping the transmitted power optimised.
The fundamental noise limit of our OLC should be photo-electron shot noise on each pixel of the frames used to generate I or Q [33]. For many sCMOS cameras, the technical noises such as readout and dark noise should be smaller than the shot noise contributions. The single-sided power spectral density of the shot noise in digital numbers is simply given by 2 √ , where is the total number of photo-electrons contributing to the images 0 and . This is irrespective of how the images are masked.
The noise spectrums for each degree of freedom can be seen in Fig. 7, these were taken over a 100s period. Fig. 7.a shows the noise present when the cavity is locked. To remove the large DC component of the spectrum the control loops were first engaged to reach the correct operating point, then with the integrators fixed, they were switched off. A flat noise spectrum is seen, however this was not limited by our estimate of shot noise. This excess noise along with many of the visible peaks seen between 10-40Hz that are believed to be a result of noise introduced by the liquid lens. Although the device allows for fast focal length control, it is not a low-noise actuator, significant broadband pitch and yaw noise is introduced between 200-500 Hz, and several resonant features near 1 kHz. The excess noise is suspected to be this noise aliasing down. To test this, we fibre-coupled the laser and bypassed both the actuators and cavity and directly injected the beam into the OLC, the noise spectrum of which are seen in Fig. 7.b. The shot noise estimate for this agrees much better, with some deviation expected due to laser intensity noise, which we do not actively control. Fig. 7.c shows the noise levels in the same state just with the laser light blocked going into the OLC, thus showing the readout and dark noise contributions.

Conclusion
In this work, we have introduced a new method for imaging RF optical beats at high resolution for performing differential wavefront sensing compared to segmented photodiodes and optical intensity based measurements [39,40]. Using commercially available optical and electrical components, we have shown experimentally that the OLC technique can extract information on both alignment and mode-matching of a beam incident on an optical cavity to optimise alignment and mode-matching. We achieved an alignment and mode-matching to ≈ 99.9% by comparing cavity mode scans in the controlled and uncontrolled states.
There are two limiting features for the scheme outlined here. For optimal performance, the camera used must have a fast low-noise readout, with a high bit-depth for subtracting the frames. The camera also requires large well-depth pixels, for maximising the shot noise signal-to-noise  (a) The cavity length was locked but the alignment and mode-matching loops are off.
(b) a test beam coupled from the original laser source via some single-mode fibre, bypassing the actuators and cavity. (c) Full system running but with no laser light on the cameras, this is due to readout and dark noise, as well as any fixed pattern noise which appears differently for each mask type. Also shown for (a,b) is what we estimate the shot noise from the measured photo-electrons to be. Excess noise relative to shot noise is present with the cavity. This is expected to be noise at higher frequencies being aliased down, mostly generated by the liquid lens.
ratio. Lastly, we are not able to apply anti-aliasing filters as one would when using a photodiode based readout. This can lead to high frequency noise aliasing and limiting performance. Care must be taken to minimise noise above the sampling frequency of the optical lock-in camera which is discussed in the supplementary materials. We anticipate such a scheme to find use in next-generation active wavefront control systems for enhancing the performance of gravitational wave detectors and other precision interferometers. This could be for tuning of actuators to correct for low-spatial frequency bulk absorption in optics or point absorbers in optical coatings that have been found to induce higher-spatial frequency distortions [41]. A range of low-noise thermal [42][43][44][45][46] and mechanical [47] actuators have been proposed to combat these issues. Some of these provide actuation at a higher resolution than previously possible, therefore an appropriate sensing scheme, such as ours, would be required for determining how these actuators are affecting the interferometer and provide errors signals for closed loop control systems. This project was supported by the Australian Research Council grant CE170100004.

Disclosures
The authors declare no conflicts of interest.