Optimized calibration strategy for high order adaptive optics systems in closed-loop: the slope-oriented Hadamard actuation

The accurate calibration of the interaction matrix affects the performance of an adaptive optics system. In the case of high-order systems, when the number of mirror modes is worth a few thousands, the calibration strategy is critical to reach the maximum interaction matrix quality in the minimum time. This is all the more true for the future European Extremely Large Telescope. Here, we propose a novel calibration scheme, the Slope-Oriented Hadamard strategy. We then build a tractable interaction matrix quality criterion, and show that our method tends to optimize it. We demonstrate that for a given level of quality, the calibration time needed using the Slope-Oriented Hadamard method is seven times less than with a classical Hadamard scheme. These analytic and simulation results are confirmed experimentally on the SPHERE XAO system (SAXO).


Introduction
Ground based telescopes image quality is limited by fast evolving phase distortions induced by the atmospheric turbulence. Adaptive optics (AO) systems aim at compensating in real time these wave-front distortions by actuating a wave-front correction device such as a deformable mirror. To do so, a wave-front sensor (WFS) measures the residual aberrations downstream the deformable mirror (DM), and and a real time computer converts these measurements into commands to be sent to the correction device. This process, looped at a high frame rate (typically several hundred Hertz), relies on a linear model of the interaction between the N act deformable mirror commands u = {u 1 ,...,u N act } and the N slope WFS measurements y = y 1 ,...,y N slope , e.g. the slope measurements in the classical case of Shack-Hartmann WFS. This linear model, embodied by the N slope × N act interaction matrix D stacking the WFS response to each DM mode, is generally identified prior to observation using an internal calibration source.
This calibration process is getting more and more complex due recent evolution of AO for astronomy: the dramatic degree of freedom increase -from 185 actuators and 288 WFS measurements for NACO [1] in 2001 to 1377 actuators and 2480 WFS measurements for SAXO [2,3] in 2013 -demands a fast calibration strategy; the advent of active/adaptive primary or secondary mirrors [4], for which an internal calibration source is not available, has led to considering on-sky calibration schemes. The high number of degrees of freedom reduces the calibration time per mode. Even with powerful calibration sources, new calibration strategies are required to improve the signal to noise ratio. This is all the more true for on-sky measurements where turbulence acts as supplementary zero-mean measurement noise.
For this reason, some teams resolve to using synthetic interaction matrices [5]. An original strategy proposed by Bechet et al. [6] consists in refining the estimation of the interaction matrix during closed loop operation, but the performance of such a method is difficult to assess in the general case as they are dependent on the system used and on the turbulence statistics. Moreover, specific on-sky calibration issues are outside the scope of this paper.
Successful results have been obtained by optimizing the actuation patterns used during the calibration. The standard push-pull "Zonal" method [7] consists in calibrating one actuator at a time, and measuring the WFS response difference between a push and a pull (this procedure enables to cancel out static aberrations). The essential flaw of this method is that the signal is concentrated on one local actuator region on the pupil, while the measurements corresponding to the rest of the pupil convey only noise. New calibration strategies have then been proposed which involve several actuators at a time : multichannel actuation [8], which proposes to calibrate sets of actuators far enough from each other, so that their associated WFS responses can be considered spatially independent and thus disentangled; Hadamard actuation [9], which generalizes this approach by considering mathematically independent actuation patterns made of Hadamard vectors, carrying more "energy" than pushing or pulling a single actuator. These patterns correspond to maximal energy actuation patterns under a maximum voltage constraint u < u max , dictated by the working domain of the DM. The patterns obtained with this method contain only ±u max values.
Although this Hadamard "voltage oriented" actuation method has led to major progress in interaction matrix calibration quality, it is not fully adapted to for closed-loop systems. For instance, the u max value is never set in practice to the maximum voltage admissible by the DM. Indeed, in closed-loop the WFS has a much smaller linearity range (suited to measure the residual turbulence) than the deformable mirror (suited to correct for the total turbulence). In the calibration process, the actuation pattern amplitudes are rather dictated by the wave-front linearity range. More generally, the choice of a set of calibration patterns has to be thought in the measurement space. Let us consider here the case of a Shack-Hartmann wave-front sensor, for which the WFS measurements are slope measurements (although these developments may largely be extended to other WFS technologies). The goal here is then to maximize the energy of the slope signal to overcome the impact of slope measurement noise (due to detector noise or turbulence), under a maximum slope constraint (considering the saturation of the Shack-Hartmann wave-front sensor slopes).
We therefore propose in this paper a "slope-oriented" Hadamard actuation scheme. After recalling the principles of standard "Zonal" and "voltage-oriented" Hadamard methods, we first describe how we achieve such a "slope-oriented" scheme (section 2). Then we compute an interaction matrix calibration error metric, which we use to compare the "Zonal", "voltage-oriented" Hadamard and "slope-oriented" Hadamard strategies in the configuration of SPHERE's extreme AO system SAXO [2,3] (section 3). The results obtained are then confirmed on an end-to-end simulation of SAXO (section 4). Last we report experimental results (section 5) obtained on SAXO during Assembly, Integration and Test (AIT) .

Standard "zonal," "voltage-oriented Hadamard" and "slope oriented Hadamard" schemes
Let M DM be the influence function matrix, giving the modal decomposition of the phase shape of the mirror for a unitary displacement of each actuator. We suppose, with no lack of generality, that the phase modal basis size is very high, so the under-representation issues remain negligible. Let M WFS be the matrix containing the WFS measurements for each phase mode. The interaction matrix D gives the WFS measurements for a unitary displacement of each actuator: The calibration procedure of the interaction matrix consists in sending a set of N cal actuation patterns {u 1 , . . . , u N cal } and to measure the corresponding WFS measurements {y 1 ,...,y N cal }. The measurement y n corresponding to pattern u n is affected by a measurement noise w n , and by the presence of a turbulent phase ϕ n during the calibration: with D the interaction matrix to identify. Denoting U, Y , W , φ the matrices which rows are the u n , y n , w n , ϕ n , we obtain: The estimated interaction matrix is retrieved by multiplying the measurement matrix Y by the pseudo-inverse U † of U: Provided that U is full rank, i.e. that the calibration pattern set used is rich enough to span all the shapes achievable by the DM, we have U ·U † = Id, Id denoting the identity matrix (in this case with a dimension N act ). The calibration error is then given by To minimize this error, one may minimize the perturbationW = M WFS · φ +W by using when possible an internal calibration source: the turbulence φ then reduces to the local turbulence in the bench, and with a bright source, the noise term W can be kept low enough. The dimension of the interaction matrix is N slope × N act , with N act being the number of actuators of the deformable mirror, and N slope the number of measurements provided by the WFS at each frame (for a Shack-Hartmann WFS, it corresponds to twice the number of valid subapertures). This means that N act independent patterns at least have to be applied. When for some systems N act reaches several thousands, this procedure can become very time consuming. The goal is then to make an optimal use of the incoming photons, by generating the most "energetic" WFS response possible.
The standard Zonal method [7] consists in pushing one actuator at a time with a voltage u, which corresponds to a diagonal matrix U: u has then to be set at the maximum value compatible with the system, i.e. without saturating the WFS nor the deformable mirror.
If one considers only the deformable mirror voltage saturation u < u max , the optimal solution (with respect to a quadratic norm on ΔD) is with H a Hadamard matrix, which contains only -1 and 1 values [9]. However, this Hadamard "voltage oriented" actuation scheme is not suited to closed-loop systems for which the WFS has a much smaller linearity range (suited to measure the residual turbulence) than the deformable mirror (suited to correct for the total turbulence). We propose here a Hadamard "slope oriented" actuation scheme obtained by considering the saturation of the Shack-Hartmann WFS slopes. We consider here only the WFS measurement saturation s < s max . The most effective calibration patterns are the one that take all the spots at the limits of the linear range of the WFS, i.e. at slopes s = ±s max . The problem here is then to find a set of actuation patterns U such that DU contains ±s max values. U shall also have a rank superior or equal to the number of actuators, so that the whole deformable mirror shape space is spanned (this ensures UU † = Id). The way we find such a U consists in three steps: 1. obtain a first rough estimate of D 0 (a synthetic matrix can be used); 2. solve for DU = s max H, with H a Hadamard matrix (s max H contains only ±s max values). This is done using D 0 : The set of actuation patterns U obtained with this iterative is probably not optimal. There may exist an algorithm able to identify U with a rank superior or equal to the number of actuators, yielding the lowest interaction matrix calibration error while saturating neither the deformable mirror nor the WFS. However, the process described here provides a decent approximation of this optimal solution. We have used this strategy on the SPHERE's extreme AO system SAXO case [2,3] (1377 actuator CILAS SAM deformable mirror with 25% coupling, 1240 sub-aperture Shack-Hartmann WFS with 6 × 6 pixels per sub-aperture). The theoretical histograms of the slopes DU obtained during the interaction matrix calibration for the zonal, voltage-oriented and slope oriented Hadamard strategies are shown in Fig. 1.  We see that the slope-oriented strategy yields the most energetic slope patterns. Intuitively, the most efficient calibration method is the one yielding the highest signal to noise ratio, i.e. yielding the most energetic WFS signal for a given level of calibration noise. The calibration error propagated in the AO closed loop should therefore be lower. Indeed, the way we eventually assess the quality of an interaction matrix is the performance of a loop closed with this interaction matrix. The question is : how does this compares with the noise level on the interaction matrix, as witnessed when the matrix is graphically displayed? In the next section, we express the part of the residual phase variance due to interaction matrix miscalibration, in a simplified adaptive optics loop configuration. We discuss the difference between this metric and a more intuitive one D −D 2 .We then use this metric to compare the standard "Zonal," "voltage-oriented" Hadamard and "slope-oriented" Hadamard strategies.

A metric for assessing the interaction matrix quality
Let y n the WFS measurements at frame n and w n the corresponding noise. Let u n be the DM actuator voltages at frame n, and ϕ n (or ϕ res n ) the turbulent (or residual) phase at frame n. We describe the AO system with the following model, corresponding to a simplified 1 frame delay loop: ⎧ ⎪ ⎨ ⎪ ⎩ y n = M WFS · ϕ res n−1 + w n ϕ res n = ϕ n − M DM · u n u n = u n−1 + gM cont y n By expressing ϕ res n − ϕ res n−1 with the second line of Eq. (8), we derive: In this expression, g is a gain set to value different from 1 for stability reasons, and M cont can be chosen different from D † in some control strategies (for example requiring the filtering of some specific mode).
The following derivation is only heuristic, and aims only at isolating a tractable expression of the miscalibration error. The system part can be divided as: ϕ res To do so, we need to make the assumption that the deformable mirror unseen modes have been filtered out, or conversely that M DM contains no mode unseen by the WFS. With this assumption, we derive the following expression of the miscalibration error phase variance (see appendix A): with X 2 C slope = X T C slope X and C slope the covariance matrix of the residual slopes M WFS · ϕ res n−1 . Once again, this expression was obtained heuristically (for instance, the three terms in Eq. (10) are not statistically independent), and is by no means a rigorous derivation of the miscalibration contribution to the error budget. But it helps showing that the interaction matrix calibration error ΔD impacts the overall performance depending on the statistics of the residual slopes presented to the WFS (embodied by C slope ). The term M † WFS converts slopes (in arbitrary units such as centroid displacements in pixels) in wave-front error in radians, with a physical meaning.
Therefore, we use the metric E to select the best actuation pattern U for the calibration. To do so, we insert Eq. (5) in the expression of E of Eq. (11). With simplifying assumptions on the calibration noise and slopes statistics, we derive the following expression (see appendix B) The best actuation strategy would then be to minimize the squared norm of (DU) † . The intuitive strategy we followed to produce the slope-oriented Hadamard Actuation method led to maximizing the squared norm of DU, i.e. to obtain the highest slopes values during the calibration (while keeping them within the WFS linearity range) as emphasized in Fig. 1 histograms. Indeed, the values of E (ΔD) obtained with the simplified expression of Eq. (12) for the zonal, voltage-oriented and slope-oriented Hadamard strategies (corresponding to the DU values shown in Fig. 1) are presented in Table 1. This shows that our slope-oriented strategy would yields a 582 gain over the zonal strategy, and nearly a factor 10 gain over the voltage-oriented Hadamard strategy, in terms of miscalibration error. In other words, the same quality could be obtained with the slope-oriented strategy in 12 seconds as with the voltage oriented strategy in 1.5 minutes or with the zonal strategy in 2 hours (assuming a photon noise regime during calibration).
We have therefore derived a heuristic interaction matrix quality metric corresponding to the contribution of the miscalibration error to the residual phase variance. With some simplifying assumptions, we have shown that minimizing this metric leads to choosing the actuation pattern that maximizes the slopes signal, which provides theoretical ground for our "slope-oriented" Hadamard calibration strategy.

Simulations
In order to confirm that our metric accurately conveys the induced error in closed loop, comprehensive simulations on an end-to-end simulator of SAXO [2,3] have been conducted with the interaction matrices obtained for the three strategies, with various levels of noise on the Shack-Hartmann wave-front sensor during the interaction matrix calibration. The simulation Fig. 2. End-to-end SAXO simulator results: residual phase variance obtained as a function of the WFS noise during the interaction matrix calibration. Simulation case: SAXO architecture (1377 SAM DM, 40x40 diffractive filtered Shack-Hartmann with weighted Center of Gravity), 1200Hz 2-frame delay loop, seeing = 0.85" [3]. case corresponded to a 0.85" seeing in the SAXO configuration [3]. Figure 2 plots the residual phase variance obtained as a function of the WFS noise during the interaction matrix calibration. The residual phase variance level in the low calibration noise regime corresponds to the other terms of the error budget (temporal error, aliasing and fitting errors, the noise error is negligible in this case as we simulated a high flux guide star). We see that the gaps between the curves follow exactly the values in Table 1. It confirms that our metric is suited to predict the closed loop residual phase error budget term due to interaction matrix miscalibration, and that the Slope Oriented Hadamard actuation should yield a factor 7 gain in calibration time compared to the Voltage Oriented method, and a factor 580 compared to the zonal method.

Experimental validation
To experimentally prove the applicability of the slope-oriented method, we have acquired three interaction matrices on the SAXO bench at Observatoire de Paris during AIT tests, with the three strategies, and considering a 90 seconds calibration time for each matrix. It corresponds to a flux worth 10 photons per subaperture and per frame (wave-front sensing is performed with EMCCD amplification leading to virtually 0 read-out-noise) , with 8 frames acquired for each pattern (four with the positive pattern and four with the negative pattern, to cancel out static aberrations), at 1200Hz, with local turbulence only. The three interaction matrices obtained are shown in Fig. 3, clipped at 1% of their total range in order to visually assess the noise.
Whereas for the "slope-oriented" Hadamard strategy it is possible to distinguish the diagonal zone from the background, some components still do not stand out of the noise in the "voltageoriented" Hadamard case with this limited calibration time. Compared to the "Zonal" strategy, the noise on the interaction matrices is 52 times lower for the voltage oriented strategy, and 170 times lower for the slope-oriented strategy. These values are not identical to the one in Table 1, which correspond to the gain in calibration time to reach the same performance. Here, we selected a given experimental calibration time and compare the obtained matrices. The level of noise on the matrices does not convey the final residual phase performance, because it does not take into account the system configuration (the amplitude and shape of the mirror modes for instance) nor the turbulence statistics. However, these experimental results already emphasize the major gain to use slope-oriented Hadamard strategy.
We then stored the interaction matrix acquired with the slope-oriented Hadamard strategy in the system, and tried to close the loop on an artificial source at high flux (1000 photons per subaperture and per frame on the wavefront sensor, 1200Hz, turbulent simulator corresponding to 0.62" seeing and 10m.s −1 windspeed [3]). We report that the loop was closed successfully during several minutes, and that we witnessed no performance loss compared to the use of a 1.5 hour acquisition zonal strategy calibration matrix (in both case the estimated Strehl Ratio was worth 92% at 633nm), thus proving that not only the matrix obtained with the slope-oriented Hadamard strategy is less noisy, but also that the matrix is sound, with no missing information or defect that would deteriorate the overall performance.

Conclusion
The aim of an interaction matrix calibration process is to obtain the "best" interaction matrix using the minimum amount of time or photons. Intuitively, this can be accomplished by optimizing the signal to noise ratio during calibration: for a given amount of detection noise, one has to maximize the wavefront sensor signal. We have therefore proposed the slope-oriented Hadamard scheme, which consists in using a particular set of independent deformable mirror patterns: they nearly saturate the WFS, producing wave-front measurements close the the bounds of the linearity range. To evaluate our strategy, we have derived a heuristic quality metric corresponding to the miscalibration term of the residual phase variance error budget, and shown how our method tends to optimize this metric. In the case of the SAXO configuration, the gain predicted with our metric was perfectly reproduced with an end-to-end simulation of the SAXO bench, showing a 7 fold gain for the "slope-oriented" Hadamard strategy over the "voltage-oriented" Hadamard strategy, and a 581 gain over the standard "Zonal" strategy, in terms of calibration time. Finally, we have experimentally demonstrated on the SAXO bench for the noise part W and for turbulent components φ with a high temporal and spatial frequency): W i jW k,l = δ i,k δ j,l σ 2 i (17) With this, we gather: so that W T · M †,T WFS · M † WFS ·W ∝ Id. It then follows that: Considering that U and D are full rank matrices, we have D † D = Id and UU † = Id. With the identity (A † AB) † (ABB † ) † = (AB) † , we get U † D † = (DU) † , so that: This expression can be further simplified considering the approximation C slope Id. This is justified for a system where all the low order modes are perfectly compensated, leaving only high order modes showing no correlation from one sub-aperture to the next. For instance, in the case of SAXO, end-to-end simulations (same simulation case as in Fig. 2: 1200Hz 2-frame delay loop, seeing = 0.85" [3]) lead to a nearly diagonal residual slope covariance matrix (non diagonal coefficients are in average 1000 times less energetic than the diagonal coefficients) We then obtain: E (ΔD) ∝ (DU) † 2 (21)