A high-speed, wavelength invariant, single-pixel wavefront sensor with a digital micromirror device

The wavefront measurement of a light beam is a complex task, which often requires a series of spatially resolved intensity measurements. For instance, a detector array may be used to measure the local phase gradient in the transverse plane of the unknown laser beam. In most cases the resolution of the reconstructed wavefront is determined by the resolution of the detector, which in the infrared case is severely limited. Here we employ a Digital Micro-mirror Device (DMD) and a single-pixel detector (i.e. with no spatial resolution) to demonstrate the reconstruction of unknown wavefronts with excellent resolution. Our approach exploits modal decomposition of the incoming field by the DMD, enabling wavefront measurements at 4~kHz of both visible and infrared laser beams.


Introduction
Wavefront sensing, preservation and/or correction is essential in many optical systems, including in astronomy with low intensity point-like sources of rays, tightly focussed medium-intensity laser beams in microscopy and imaging, and for the delivery without aberrations of high-power laser beams for materials processing [1][2][3][4]. Implicit in this is the understanding that most optical processes are phase rather than intensity dominant, thus phase and wavefront knowledge is paramount [5]. It may be useful to point out that unlike object reconstruction by digital holography [6] or computational imaging [7], here there is no object, no structured illumination, and no reference beam -it is the primary beam itself that must be probed and analysed by some in-line and preferably real-time device. Often the outcome of such a wavefront measurement is a means to correct it, perhaps by adaptive optics. Such wavefront sensing techniques rely on the ability to measure the phase of light which can only be indirectly inferred from intensity measurements. Methods to do so include ray tracing schemes, intensity measurements at several positions along the beam path, pyramid sensors, interferometric approaches, computational approaches, the use of non-linear optics, computer generated holograms (CGHs), meta-materials and polarimetry [8][9][10][11][12][13][14][15][16][17][18][19][20][21]. Perhaps the most well-known is the Shack-Hartmann wavefront sensor [22,23]. Its popularity stems from the simplicity of the configuration as well as the fact that the output can easily be used to drive an adaptive optical loop for wavefront correction. More recently a modal approach to beam analysis has been demonstrated [24][25][26][27][28][29][30][31]. Using both hard-coded CGHs and digital holograms on spatial light modulators (SLMs) (see [32] for a review), the technique was shown to be highly versatile and accurate. These approaches to wavefront-sensing and corrections still suffer from slow refresh rates, often limited to 100s of Hz, are usually expensive (especially for non-visible applications), and are limited both in terms of spatial resolution and operational wavelength-range.
In this work we demonstrate a wavefront-sensor that is broadband (spanning over 1000 nm, from the visible to the mid-IR), fast (with a refresh rate in the kHz range), and inexpensive (100s of US dollars). We achieve this by building our wavefront-sensor around a digital micro-mirror device (DMD) and leveraging the advantages of the modal decomposition technique. This enables the rapid production of reconstructed intensity and phase-maps with an "unlimited" resolution, even though the employed detector is a single-pixel "bucket-detector". We demonstrate the technique using both a visible and NIR laser programmatically deteriorated with aberrations typical of moderately distorted beams, e.g., as would be experienced with thermally distorted high-power laser beams, propagation through a moderately turbulent atmosphere, and optically distorted beams due to tight focusing or large apertures. We demonstrated excellent wavefront reconstruction with measurement rates of 4000 Hz, fast enough to be considered real-time for most practical applications.

Background theory
For the aid of the reader we briefly introduce the notion of wavefront and phase, outlining how it may be extracted by a modal decomposition approach.

Wavefront and phase
The wavefront of an optical field is defined as the continuous surface that is normal to the time average direction of energy propagation, i.e., normal to the time average Poynting vector P where z denotes the position of the measurement plane. The ISO standards define the wavefront more generally as the continuous surface that minimizes the power density weighted deviations of the direction of its normal vectors to the direction of energy flow in the measurement plane where P t = [P x , P y , 0] . What remains then is to find the Poynting vector P; this is computable from the knowledge of the optical field by where denotes the real component, for vector fields U, and by for scalar fields U, where ω is the angular frequency, 0 the vacuum permittivity, the permittivity distribution. In the simple case of scalar, i.e. linearly polarized beams, the wavefront is equal to the phase distribution Φ(s) of the beam except for a proportionality factor where λ is the wavelength. It is important to note that this expression is only valid so long as there are no phase jumps or phase singularities, because the wavefront is always considered to be a continuous surface. Nevertheless, this facilitates easy extract of the wavefront by a phase measurement. From these expressions it is clear that if the optical field is completely known then the wavefront may readily be inferred. Here we outline how to do this by a modal expansion into a known basis, commonly referred to as modal decomposition.

Modal decomposition
Any unknown field, U(s), can be written in terms of an orthonormal basis set, Ψ n (s), with complex weights c n = |c n |e iφ n where |c n | 2 is the power in mode Ψ n (s) and φ n is the inter-modal phase, satisfying ∞ n=1 |c n | 2 = 1. Thus, if the complex coefficients can be found then the optical field and its wavefront can be reconstructed, usually requiring only a small number of measurements, especially in the case of common aberrations. Note that the resolution at which the wavefront may be inferred is not determined by the resolution of the detector. In other words, whereas only a few complex numbers are measured, the reconstructed resolution is determined by the resolution of the basis functions, which are purely computational.
The unknown modal coefficients, c n , can be found by the inner product where we have exploited the ortho-normality of the basis, namely This may be achieved experimentally using a lens to execute an optical Fourier transform, F. Accordingly we apply the convolution theorem (9) to the product of the incoming field modulated with a transmission function, T n (s), that is the conjugate of the basis function, namely, to find the new field at the focal plane of the lens as Here where f is the focal length of the lens and λ the wavelength of the light. If we set s = 0, which experimentally is the on-axis (origin) intensity in the Fourier plane, then Eq. (11) becomes which is the desired inner product of Eq. (7). Therefore we can find our modal weightings from an intensity measurement of This is not yet sufficient to reconstruct the wavefront of the field as the inter-modal phases are also needed. The inter-modal phases ∆φ n for the modes Ψ n cannot be measured directly, however, it is possible to calculate them in relation to an arbitrary reference mode Ψ ref . This is achieved with two additional measurements, in which the unknown field is overlapped with the superposition of the basis functions [27,33], effectively extracting the relative phases from the interference of the modes. Thus, in addition to performing a modal decomposition with a set of pure basis functions, Ψ n , we perform an additional modal decomposition with each mode and a reference, described by the transmission functions and It is worth noting that, while in principle one measurement is sufficient for an inter-modal phase, two ensure that the phase value is not ambiguous. If the resulting intensity measurements are I cos n and I sin n , then the inter-modal phase can be found from Importantly, in order to reduce the error in the estimation of the inter-modal phase, the reference mode should return an intensity comparatively high to the average intensity of the other modes in the basis.
In the present context, the transmission functions are implemented as computer generated holograms (CGHs), and displayed on a DMD spatial light modulator. As a note, the amplitudes of the respective transmission functions are normalized to satisfy the condition that the encoded transmission function, T n , is | T n | ∈ [0, 1]. As a result, generated or detected modes are still orthogonal but are no longer orthonormal, with deleterious effects for modal decomposition [24]. It has been shown that it is paramount to re-scale the measured intensities before normalising the measurements for n I n = 1 [24]. This correction must be done for each CGH in the system by simply multiplying in the additional factors, with the equations below for a single CGH: where I meas. is the measured intensity which is re-scaled to result in I n , depending on whether a Complex-Amplitude (CA) or a Phase Only (PO) CGH is used.
In order to encode the phase and amplitude of the desired transmission functions for implementation with a binary amplitude DMD, the following conditioning of the hologram is required [34,35] T n (s) = 1 2 where p(s) = arg(T n (s)) + φ g (s) q(s) = arcsin |T n (s)| |T n (s)| max (21) and T n is the desired function to be encoded (for example Eqs. (14), (15) and (22)) and φ g is a linear phase ramp which defines the period and angle of the resulting grating. The target field will occur in the first order diffraction spot. Due to the nature of a binary amplitude-only hologram, the efficiency is low in comparison to a phase-only hologram on a SLM. Efficiencies on the order of 1.5% are expected, but this issue can be mitigated by using a sensitive detector, or seen as a benefit if higher incoming laser powers are expected [36].
In this work we use the Laguerre-Gaussian (LG) basis as our expansion with basis functions in two indices given as [37] where w 0 is the Gaussian beam waist and L | | p (·) is the generalised Laguerre polynomial with azimuthal index and radial index p. While the choice of basis is arbitrary there is always an optimal basis to minimise the number of modes in the expansion. For example, if the measured mode has a rectangular shape then it is likely that the Hermite-Gaussian basis will be more suitable as it will require fewer terms in Eq. (6) for an accurate reconstruction.

Experimental setup and methodology
A schematic of the experimental setup is shown in Fig. 1. We show a modal decomposition set-up which includes a DMD to display the CGH (the transmission function in Sec. 2), a Fourier lens and a pinhole with a photo-detector to measure the on-axis intensity for the inner product outcome. In order to select the on-axis mode for the modal decomposition, the photodiode can be either fibre-coupled (using a single-mode fibre) or paired with a precision pin-hole (5 µm).
In this work we tested two DMD devices. The first, a DLP6500FYE device (1920 × 1080 mirrors, 6.5 µm pitch, and a refresh rate of 9.5 kHz), whose larger chip is on the one hand useful in displaying high order modes, but on the other hand is more affected by strain-induced curvature of the micromirror chip. Consequently, the results in this paper were primarily produced using the second device, a DLP3000, due to its smaller and thus optically flatter chip. This model has 608 × 684 mirrors (7.6 µm pitch, arranged in a diamond pattern) and a refresh rate of 4 kHz when switching through on-board memory patterns.
We imposed a known primary aberration onto an incoming Gaussian beam and directed it towards the DMD wavefront sensor. For tests in the visible (λ = 635 nm) a camera was used as the detector and the intensity at origin ("single pixel") used, while for the NIR (λ = 1550 nm) a single mode fibre coupled InGaS photodiode was used. A custom trans-impedance amplifier converted the photodiode current into a voltage that was then measured by the 12 bit Analogue-to-Digital Converter (ADC) of an Arduino Due microcontroller, and sent to a computer. In order to operate the DMD at its fastest rate, the holograms were loaded onto its on-board flash memory.

Modal decomposition verification
In order to verify our wavefront sensor, a modal decomposition was performed on prepared Laguerre-Gaussian modes with ∈ [−3, 3] and p ∈ [0, 3]. Each mode was generated and a modal decomposition was performed for modal weights and inter-modal phases, with the results shown in Figs. 2. As expected, the azimuthal modal decomposition (p = 0, ∈ [−5, 5]) at both wavelengths shows limited crosstalk, and thus a relatively linear measured intensity.
The inter-modal phase measurement was verified by generating beam made from a superposition of two LG p=0 =±1 modes with a known phase shift between them, as in Eq. (23). The reference mode was chosen as the = −1 mode where T n is the encoded transmission function and φ is the programmed inter-modal phase between the two modes. As shown in Fig. 2, both the visible and NIR inter-modal phase tests are largely correct within experimental error. Here, the measurements were repeated ten times as the phase reconstruction was found to be sensitive to noise, as indicated by the shaded error regions in the figure. The error for the NIR measurements was found to be negatively affected by the performance of our custom transimpedance amplifier used to sample the intensities from the photodiode. Figure 3 shows the reconstruction results for visible wavelengths with astigmatism and trefoil aberrations as examples. For both cases the measured wavefront is remarkably similar to the programmed aberration. A NIR wavefront measurement is shown the the right of Fig. 3, and is also found to be in excellent agreement with the simulation. The slight difference in "flatness" of the measured wavefront with respect to the simulated one was attributed to errors in the inter-modal phase measurements.

Discussion
For both the visible and NIR tests, the primary cause for inaccuracy is the inter-modal phase measurement. This is consistent with the verification tests in Fig. 2, where the inter-modal phase error was also more prominent than the intensity decomposition error. This is due to noise in the intensity measurements, mainly caused by displacements of the beam during the modal decomposition as a result of air-flow in the laboratory, and to some extent to the compounding of errors in Eq. (16).
A simple error analysis reveals that the percentage error in the phase scales as 4∆I/|I Ψ n − I n |, where I Ψ n is the signal in the cosine or sin modes, I cos n or I sin n , and ∆I is the error due to the detector. Consequently, the phase error will be negligible for modes of reasonable power since ∆I can be made very small while I n is high. On the other hand the phase error can be high for modes of low modal power content (small I n ). Fortuitously, our approach by very definition weights the modes according to modal power, so it is the low power modes that are least important in the reconstruction process. The use of a higher resolution ADC will result in more accurate reconstructions since the systematic error component of ∆I will be reduced. For example, 16 and 24 bit ADCs have dynamic ranges of 96 dB and 145 dB respectively, which corresponds to nano-Watt intensity measurement accuracy for incoming beams in the hundreds of milli-Watt range. Taking this as a typical case we find the percentage error in phase in the order of ≈ 10 −6 . Provided a suitable photodiode is used, these sensitivities are possible for both visible and NIR wavelengths.
In addition, the accuracy of the reconstructed wavefront is dependent on the number of modes used for the decomposition and the complexity of the aberration, as described in Sec. 2. A higher-order Zernike aberration requires more modes to reconstruct than a lower-order aberration. It has been shown that with only a few modes very complex phase structures can be mapped, often requiring fewer than 10 modes [26][27][28][29]. Further, in many practical applications (such as thermal aberrations of high-power laser beams or optical aberration of delivered beams) only a few lower-order aberrations are required to describe the beam. This is true even for the case of low to moderate turbulence, where the first few Zernike terms describe most of the observed wavefront-error. We can understand this by remembering that the rms wavefront error scales with the square of the Zernike coefficients (the sum of the squared coefficients to be precise), so that small coefficients become negligible. However, in very strong scattering media such as tissue or very strong turbulence where scintillation is experienced, we would expect our technique to require many modes for an accurate reconstruction with high error due to low modal powers. Our interest is in real-time analysis for real-time correction, and in such cases correction would be equally problematic.
The resolution of the DMD and the size of the incoming beam sets an upper limit to the number of modes that can be tested and for a SLM with 1920 × 1080 resolution, this is on the order of hundreds of modes [38]. We can expect similar performance from a DMD. The radius of an LG mode is given by w 0 2p + | | + 1 and so for instance, with w 0 = 0.5 mm and a DLP3000 DMD which has a minimum dimension of 608 pixels with pitch 7.6 µm, an LG mode with = 5 and p = 5 will fill the DMD. This is equivalent to more than 60 modes whereas less than 10 modes were needed for accurate wavefront reconstruction in this work.
One of the benefits of our technique is the potential for real-time wavefront reconstruction. A camera was used for the visible measurements and so the decomposition was simply scripted at low speed (≈60 Hz hologram rate) whereas for the NIR tests a photodiode was used which allowed for faster rates. Initial NIR tests were performed in a similar, scripted manner but a test was performed where we loaded the holograms into the DMDs frame buffer and took measurements at the maximum refresh rate of 4 kHz. The results were identical to the "slow" scripted version, proving that wavefront measurements can be done quickly using this method.
Given that multiple modal decomposition measurements are required to reconstruct a single wavefront, it is pertinent to elaborate on the achievable wavefront measurement rates of this technique. Different applications require different wavefront measurement rates, for instance, thermal aberrations typically are slowly evolving over time frames of seconds, while moderate atmospheric turbulence changes at rates of 100s of Hz [39]. Table 1 shows calculated wavefront reconstruction rates (wavefronts per second) for several different mode-sets. The maximum number of measurements required for the approach in this paper is 3N − 2 where N is the total number of modes in the set. We see that even assuming many modes on a low speed device we are able to do wavefront sensing at video frame rates, whereas for realistic mode sets on better devices the rate becomes in the order of 100s to 1000s of Hz, fast enough to be considered real-time in most applications. A possible future improvement to the measurement algorithm could make use of compressive sensing techniques and a more targeted measurement regime, thus requiring fewer measurements and resulting in even faster wavefront sensing. Table 1. Resulting wavefront measurement rate (Hz) for different DMD refresh rates and mode-sets. Larger mode sets will result in higher wavefront reconstruction accuracy.
LG ∈[ −3,3] p ∈[0, 3] LG ∈[ −5,5] p ∈[0, 5] LG ∈[−5,5] Finally we point out that the advantage of the modal approach to wavefront sensing is that it simultaneously provides all the required information to infer numerous physical properties of the laser beam, including the Poynting vector, orbital angular momentum density, laser beam quality factor (M 2 ), modal structure and so on, making our DMD modal decomposition approach highly versatile.

Conclusion
We have demonstrated a fast, broadband and inexpensive wavefront-sensor built around a DMD spatial light modulator. Owning to the employed modal decomposition technique, the resolution of the reconstructed wavefronts is not determined by the resolution of detector, which is a spatially non-resolved photodiode. On the contrary it solely depends on the resolution of the basis functions, which are purely computational. These advantages allow high-resolution wavefront sensing in real-time. We expect that devices based on this novel approach will be invaluable for wavefront sensing of NIR wavelengths where other approaches are either too challenging or too expensive.