# Upgrading SPHERE with the second stage AO system SAXO+: frequency-based data-driven controller for adaptive optics

Isaac Bernardino Dinis, François Wildi, Damien Ségransan, Vaibhav Gupta, Alireza Karimi, Michel Tallon, Isabelle Bosc Tallon-Bosc, M. Langlois, Magali Loupias, Clémentine Béchet, et al.

<figure><img src="image_1.png" /></figure>

To cite this version:

Isaac Bernardino Dinis, François Wildi, Damien Ségransan, Vaibhav Gupta, Alireza Karimi, et al. "Upgrading SPHERE with the second stage AO system SAXO+: frequency-based data-driven controller for adaptive optics." Instrumentation and Methods for Astrophysics, Jun 2024, Yokohama, Japan. hal-04966221

HAL Id: hal-04966221

https://hal.science/hal-04966221v1

Submitted on 25 Feb 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_2.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Upgrading SPHERE with the second stage AO system SAXO+: frequency-based data-driven controller for adaptive optics

Isaac Dinisª, François Wildiª, Damien Ségransanª, Vaibhav Guptaᵇ, Alireza Karimiᵇ, Michel Tallonᶜ, Isabelle Boscᶜ, Maud Langloisᶜ, Magali Loupiasᶜ, Clémentine Bechetᶜ, Eric Thiébautᶜ, Charles Goulasᵈ, Florian Ferreiraᵈ, Anthony Boccalettiᵈ, Fabrice Vidalᵈ, Caroline Kulcsarᵉ, Henri-François Raynaudᵉ, Nicolas Gallandᵉ, Markus Kasperf, Julien Millig, David Mouilletg, Laura Schreiberh, Emiliano Diolaitih, Raffaele Grattonh, and Gael Chauvin¹

ªObservatoire de l'université de Genève (UNIGE), Geneva, Switzerland

ᵇÉcole Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland

ᶜUniversité Claude Bernard Lyon 1 (univ lyon1), Lyon, France

ᵈObservatoire de Paris (OBSPM), Paris, France

ᵉInstitut d'Optique, Paris, France

fEuropean Southern Observatory (ESO), Garching, Germany

gUniversité Grenoble-Alpes (UGA), Grenoble, France

hItalian National Institute for Astrophysics (INAF), Bologna, Italy

¹Observatoire de la Côte d'Azur (OCA), Nice, France

## ABSTRACT

This study introduces a novel frequency-based data-driven controller for adaptive optics, using power spectral density for optimization while ensuring stability criteria. It addresses disturbance rejection, command amplitude constraints and system transfer functions through convex optimization to obtain an optimal control in an infinite input response filter form. Evaluated within the SAXO+¹ project, it demonstrates efficacy under diverse atmospheric conditions and operational scenarios. The proposed controller is tested in both standard and disentangled adaptive optics schemes,² showcasing its adaptability and performance. Experimental validation is conducted using the COMPASS³ simulation tool, affirming the controller’s promise for enhancing adaptive optics systems in real-world applications.

**Keywords:** adaptive optics, data-driven control, predictive control, SAXO+, SPHERE, VLT

## 1. INTRODUCTION

Adaptive Optics (AO) is a technology aimed at improving direct imaging for ground-based telescopes by correcting the light wavefront distorted due to atmospheric dispersion. Since its inception, Adaptive Optics has continuously improved, with the most advanced iteration being called eXtreme Adaptive Optics (XAO), exemplified by instruments like the SPHERE⁴ instrument at the VLT. As we enter the era of Extremely Large Telescopes (ELTs), SAXO+¹ is proposed as a pathfinder for XAO instrument for ELTs, such as PCS.⁵ SAXO+ aims to enhance SPHERE adaptive optics by adding a second stage AO loop with better hardware:⁶ a faster deformable mirror (DM) capable of running at up to 3 kHz and a more sensitive WaveFront Sensor (WFS) - the Pyramid WFS (PWFS); Advanced control laws are proposed to drive this second loop including LQG,⁷ TAO,⁸ reinforcement learning,⁹ or the focus of this paper, the data-driven controller.¹⁰ The data-driven controller can be viewed as an enhancement of the widely used integrator controller. As a reminder, in a discrete system, the command computed by the integrator is equal to a gain times the measurement plus the previous command. Intuitively, one could imagine that if the controller examines further past measurements and commands, it could

<footnote>Further author information: Send correspondence to Isaac Dinis: isaac.dinis@unige.ch</footnote>
better predict and compute the new command to apply to reject disturbances. This is known as increasing the controller order, but it has a downside: while it is feasible to manually tune an integrator (only one parameter), it would be impractical to manually tune a fifth-order controller by guessing the gains for the four previous commands and five previous measurements. Fortunately, what cannot be computed by a human can often be computed by a machine nowadays. Therefore, the data-driven controller translates into a convex optimization problem for which plenty of solvers already exist. Three objectives are defined for the optimizer: performance, stroke management, and robustness. The controller is frequency-based, i.e., all three objectives are described with their Power Spectral Density (PSD). To compare and evaluate the different controllers, the SAXO+ control and simulation group designed a simulation framework in COMPASS.³ Five science cases were defined to evaluate the performance of the controller for the consolidation phase and are presented here. Additionally, a vibration case, which was not implemented at the time of the consolidation review, is also studied.

## 2. CONTROL THEORY IN ADAPTIVE OPTICS

This section describes the functioning of an AO system using simple block schemes. From the control point of view, an AO system can be resumed with three elements in a closed loop feedback scheme: the WaveFront Sensor (WFS), the Real-Time Computer (RTC) and the Deformable Mirror (DM).

<figure><img src="image_3.png" /><figcaption>Figure 1: Block diagram of an AO system with modal control. With $\vec{\phi}$ the incoming wavefront, $\vec{e}$ the residual wavefront, $\vec{n}$ the noise, $\vec{s}$ the slopes, $\vec{m}$ the modal measurements, $\vec{u}$ the modal commands, $\vec{v}$ the voltages, S2M and M2V the modal projection matrices.</figcaption></figure>

Each of these elements are described with their transfer function. The variable $s$ is used to describe the continuous time behaviour (Laplace Transform) and $z$ the discrete time behaviour (Z transform). For simplicity and better readability, vector notation is avoided, as all AO variables are multidimensional.

### 2.1 Wavefront sensor

The wavefront sensor temporal behaviour is an average of the residual $e$ during the integration time $T$

$$ WFS(t) = \frac{1}{T} \int_{t-T}^{t} e(t) dt \qquad (1) $$

In Laplace transform:

$$ WFS(s) = \frac{1 - e^{-Ts}}{Ts} \qquad (2) $$

The integration time of the WFS usually defines the loop rate, as RTCs nowadays are capable of reaching higher speeds. The integration time is set depending on the photon flux or the detector capability. In the COMPASS simulation framework, the WFS sensor behaves as a simple delay. Therefore,

$$ WFS(z) = z^{-1} \qquad (3) $$

### 2.2 Real-time computer

The real-time computer transfer function is separated in two parts, the inherent computing latency and the control law.

$$ RTC(s, z) = e^{-\tau s} K(z) \qquad (4) $$

with $\tau$ the latency time and $K$ the control law. $\tau < T$ for the bright cases and $\tau \approx T$ for the faint cases defined by the consortium. COMPASS handles fractional delay for the RTC by interpolating the commands. In the simulation framework, the latency term encompasses the read-out time, computation time, communication time with the deformable mirror, and the rise time of the latter.
## 2.3 Deformable mirror

No actuators dynamics (except the rise time encompassed in the loop latency) is considered in the simulation framework. Therefore,

$$DM(s) = 1 \qquad (5)$$

However, the stroke limitation for the deformable mirror is considered.

## 2.4 Modal control

The data-driven controller uses a Karhunen-Loève modal decomposition of the wavefront such that each mode can be controlled independently. This allows to build multiple Single-Input-Single-Output (SISO) controllers (one for each mode) working in parallel instead of a multi-input-multi-output (MIMO) controller. Mathematically, the wavefront error is decomposed as,

$$\phi(r, \theta, t) = \sum_{j=1}^{\infty} m_j(t) M_j(r, \theta, t) \qquad (6)$$

with $M_j(r, \theta, t)$ the modal basis and $m_j(t)$ its corresponding coefficient at time $t$. Then any incident wavefront is described by a vector $\vec{m}(t) = m_1(t), m_2(t), \dots, m_\infty(t)$. In practice a subset of $\vec{m}(t)$ is taken to control a finite number of modes. During calibration the projection matrices from slopes to modes S2M and modes to voltages M2V are computed.

## 2.5 Sensitivity function

The closed loop transfer function between the disturbance input and the residual is called the sensitivity (or rejection) function and is defined as,

$$\begin{aligned} S(s, z) &= \frac{1}{1 + WFS(s)e^{-\tau s}K(z)DM(s)} \\ &= \frac{1}{1 + G(s)K(z)} \end{aligned} \qquad (7)$$

with $G(s)$ the plant. The complementary sensitivity function is defined as,

$$\mathcal{T}(s, z) = \frac{G(s)K(z)}{1 + G(s)K(z)} \qquad (8)$$

# 3. TWO STAGES CASCADED AO SYSTEM

There are several ways of combining two AO stages. For the SAXO+ baseline two options are considered: standalone and standalone+. The two stages work at different wavelengths and different rates.

## 3.1 Standalone

The standalone scheme is the simplest form of combining the two stages. The second stage input is the first stage wavefront residual, and no information is shared between the two stages. Tuning the controllers is not trivial in this configuration, as the optimal controller for each of the stages individually may not be the optimal for the whole system. The system is also prone to noise propagation between the two stages. The pros are that the systems benefits from double rejection e.g. if each RTC runs an integrator the whole system acts a an double integrator.
<figure><img src="image_4.png" /><figcaption>Figure 2: Standalone cascaded system block diagram.</figcaption></figure>

## 3.2 Standalone+

In the standalone+ configuration the second stage retrieves the first stage commands. This allows in particular to do disentangled Cascaded Adaptive Optics (dCAO).² In dCAO mode, the first-stage commands are used to mirror the first-stage DM, ensuring that the correction cancels out and the second stage perceives the full, unaffected disturbance. Compared to the standalone configuration, the system is no longer susceptible to noise propagation, and optimizing each controller individually theoretically maximizes the entire system's performance. However, this approach does not benefit from the double rejection effect.

<figure><img src="image_5.png" /><figcaption>Figure 3: dCAO system block diagram, the matrix **P** denotes the projection matrix used to project the first stage commands to the second stage command space.</figcaption></figure>

## 4. DATA-DRIVEN CONTROLLER

The data-driven controller is a frequency-based data-driven controller using power spectral density (PSD) for optimization while ensuring stability criteria. It addresses disturbance rejection, command amplitude constraints and system transfer functions through convex optimization to obtain an optimal control law in an Infinite Input Response (IIR) filter form. Non-parametric identification is used by the optimizer as the optimization is performed on a set of frequency points. The optimization of the data-driven controller and the command computation is agnostic to the cascaded scheme used (i.e. standalone or dCAO). In the following subsections the discretized transfer function (z transform) is used to describe each of the transfer functions.
## 4.1 Infinite Impulse Response filter

The data-driven controller is designed as an Infinite Impulse Response (IIR) filter. The equation in the z domain is,

$$ 
\begin{aligned}
K(z) &= \frac{b_0 + b_1 z_{-1} + \dots + b_n z_{-n}}{1 + a_1 z_{-1} + \dots + a_n z_{-n}} \\
K(z) &= \frac{\sum_{i=0}^{n} b_i z_{-i}}{1 + \sum_{i=1}^{n} a_i z_{-i}}
\end{aligned}
\qquad (9) $$

where n is the order of the controller. The IIR filter can be implemented as a digital filter in Direct-Form I. The command at time-step k is computed the following way,

$$ u[k] = \sum_{i=0}^{n} b_i m[k-i] - \sum_{i=1}^{n} a_i u[k-i] \qquad (10) $$

2n + 1 filter coefficients are to be computed by the optimizer.

## 4.2 Optimization objective

This section describes the objectives and constraints of the optimization problem. The order of the controller is chosen depending on the disturbance spectrum. As the atmosphere has a smooth spectrum, the order can be small. It is eventually increased in presence of vibrations. Keeping the order as low as possible reduces computation time and overfitting.

### 4.2.1 Objective for performance

The optimizer objective is to minimize the 2-norm of the residual due to the disturbance. The transfer function between the disturbance and the residual is,

$$ 
\begin{aligned}
e_{\phi}(z) &= \frac{1}{1 + G(z)K(z)}\phi(z) \\
&= S(z)\phi(z) \\
&= S(z)\Phi(z)w(z)
\end{aligned}
\qquad (11) $$

where $\Phi(z)$ is the frequency response of the disturbance and $w(z)$ is a white noise signal of magnitude 1. The RMS of the residual induced by the disturbance is,

$$ 
\begin{aligned}
\|e_{\phi}(z)\|_2 &= \|S(z)\Phi(z)w(z)\|_2 \\
&= \|S(z)\Phi(z)\|_2
\end{aligned}
\qquad (12) $$

### 4.2.2 Objective for stroke limitation

As the actuators have limited stroke, it is essential to minimize the overshoot. The relation between the command induced by the residual and the residual itself is,

$$ 
\begin{aligned}
u_e(z) &= \frac{WFS(z)RTC(z)}{1 + RTC(z)WFS(z)DM(z)}e(z) \\
&= \frac{WFS(z)RTC(z)DM(z)}{1 + RTC(z)WFS(z)DM(z)}e(z) \\
&= T(z)e(z)
\end{aligned}
\qquad (13) $$

$$ \frac{u_e(z)}{e(z)} = T(z) $$

The maximum gain across the frequency domain is,

$$ \left\| \frac{u_e(z)}{e(z)} \right\|_{\infty} = \| \mathcal{T}(z) \|_{\infty} \qquad (14) $$
### 4.2.3 Overall objective

The overall optimizer objective is,

$$ 
\begin{aligned}
\min_{K(z)} & \left( \|e_{\phi}(z)\|_{2}^{2} + \alpha \left\| \frac{u_{e}(z)}{\phi(z)} \right\|_{\infty}^{2} \right) \\
\min_{K(z)} & \left( \|\Phi(z)S(z)\|_{2}^{2} + \alpha \|T(z)\|_{\infty}^{2} \right)
\end{aligned}
\quad (15) $$

where $\alpha$ is a scalar weight on the command sensitivity objective. The disturbance PSD is normalised with respect to the closed loop bandwidth $\omega_{bw}$.

Then the overall objective becomes,

$$ \min_{K(z)} \left( \|W_1(z)S(z)\|_2^2 + \|W_2(z)T(z)\|_{\infty}^2 \right) \quad (16) $$

with,

$$ 
\begin{aligned}
W_1(z) &= \frac{\Phi(z)}{\Phi(j\omega_{bw})} \\
W_2(z) &= \alpha
\end{aligned}
\quad (17) $$

## 4.3 $H_2$ and $H_{\infty}$ mixed sensitivity control design

The mixed sensitivity objective is solved in terms of both $H_2$ and $H_{\infty}$ performance. In a data-driven approach the problem is solved for all frequency points. Note that in the following, the argument $z$ is omitted to simplify the notation. Equation 16 is rewritten as,

$$ \min_K \left( \gamma + \int_{-\frac{\pi}{T_s}}^{\frac{\pi}{T_s}} \mathrm{trace}[\Gamma(\omega)] d\omega \right) \quad (18) $$

subject to,

$$ (W_1S)(W_1S)^* \prec \Gamma(\omega) \quad \forall \omega \in \Omega \quad (19) $$

and,

$$ (W_2T)(W_2T)^* \prec \gamma I \quad \forall \omega \in \Omega \quad (20) $$

where $\Omega$ is a set of frequencies between 0 and the Nyquist frequency, $f_s\pi$. $\Gamma(\omega)$ and $\gamma$ are optimization variables, with $\Gamma(\omega)$ changing over the frequencies.

The constraints are transformed into a set of LMIs in order to be solved with a convex optimization solver.

For constraint 19, by replacing $K = XY^{-1}$ and $S = (I + GK)^{-1}$,

$$ W_1Y(Y + GX)^{-1}[(Y + GX)^{-1}]^*(W_1Y)^* \prec \Gamma(\omega) \quad (21) $$

Then taking $P = Y + GX$,

$$ \Gamma(\omega) - W_1Y(P^*P)^{-1}(W_1Y)^* \succ 0 \quad (22) $$

Which is a convex-concave problem and can be convexified using Quadratic Matrix Inequality (QMI) Convexification Lemma, and choosing $P_c = Y_c + GX_c$, where $K_c = X_cY_c^{-1}$ is the initial stabilizing controller,

$$ \begin{bmatrix} \Gamma(\omega) & W_1Y \\ (W_1Y)^* & P^*P_c + P_c^*P - P_c^*P_c \end{bmatrix} \succ 0 \quad (23) $$

Analogously constraint 20 becomes through convexification,

$$ \begin{bmatrix} \gamma I & W_2GX \\ (W_2GX)^* & P^*P_c + P_c^*P - P_c^*P_c \end{bmatrix} \succ 0 \quad (24) $$
To sum up the convex problem is,

$$ \min_{X,Y} \left( \gamma + \int_{-\frac{\pi}{T_s}}^{\frac{\pi}{T_s}} \mathrm{trace}[\Gamma(\omega)]d\omega \right) \qquad (25) $$

subject to,

$$ \begin{bmatrix} \Gamma(\omega) & W_1 Y \\ (W_1 Y)^* & P^* P_c + P_c^* P - P_c^* P_c \end{bmatrix} \succ 0 \quad \text{and} \quad \begin{bmatrix} \gamma I & W_2 GX \\ (W_2 GX)^* & P^* P_c + P_c^* P - P_c^* P_c \end{bmatrix} \succ 0 \quad \forall \omega \in \Omega \quad (26) $$

## 4.4 Robust stability

For robust stability a modulus margin $\mu$ of the closed system is set, which translates as the following constraint for the optimizer,

$$ \|S\|_{\infty} < \mu^{-1} \Rightarrow (\mu S)(\mu S)^* < I \quad \forall \omega \in \Omega \qquad (27) $$

in the linear matrix linearity form,

$$ \begin{bmatrix} I & \mu Y \\ (\mu Y)^* & P^* P_c + P_c^* P - P_c^* P_c \end{bmatrix} \succ 0 \qquad (28) $$

# 5. NOISE AND DISTURBANCES

This section describes noise and disturbances sources considered in the simulations.

## 5.1 Noise

Two noise sources are considered in the simulation framework: the flux noise and the readout noise. The signal-to-noise ratio (SNR) is defined as the ratio of mean to standard deviation of the signal,

$$ \mathrm{SNR} = \frac{N_q}{\sqrt{\sigma_{\phi}^2 + \sigma_{N_r}^2}} \qquad (29) $$

where, $N_q$ is the number of incident photons per timestep, $\sigma_{\phi}^2$ is the variance due to flux noise, and $\sigma_{N_r}^2$ is the variance due to sensor read-out noise.

### 5.1.1 Flux noise

The flux noise can be understood as the number of photons reaching the detecting cell. If we view a photon as a discrete particle, the arrival of photons on the detector surface can be modeled as a Poisson process, as photon arrivals are independent from each other. Consequently, there exists a variation in intensity between two frames. As per the Poisson distribution, the variance equals the expected value of incident photons,

$$ \sigma_{\phi}^2 = N_q \qquad (30) $$

### 5.1.2 Readout noise

The read-out noise arises from electrons that are not generated by an incident photon. This phenomenon is intrinsic to the physical processes within a CCD, and the number of extra electrons depends on the CCD's operating temperature. The variance due to the readout noise is given by,

$$ \sigma_{N_r}^2 = 4N_r^2 \qquad (31) $$

## 5.2 Disturbance

The main disturbance source is the atmospheric turbulence. Changes in temperature and wind speed between different atmospheric layers cause the light to diffract and distorts wavefront. Other sources are the telescope wind shake, instrument vibrations, low-wind effect, etc.
### 5.2.1 Atmospheric turbulence

For the consolidation review, only the atmospheric turbulence is considered as disturbance source. The atmospheric turbulence is simulated in COMPASS as described in F. Assémat and al. 2006.¹¹ A 35 layers wind driven halo profile provided by the ESO¹² is used. The science cases specify the Fried parameter $r_0$, the coherence time $\tau_o$ and the photon flux.

### 5.2.2 Vibration

For an additional scenario, vibrations are also taken into account. Integrator controllers typically do not handle vibrations well, but advanced controllers do. A VLT vibration model is constructed using pseudo open-loop data obtained with the SPHERE instrument. Initially, the atmospheric effects are filtered out, and then the vibration is modeled by fitting a finite impulse response (FIR) filter. This filter enables the generation of vibrations on the fly by convolving with white noise.

<figure><img src="image_6.png" /><figcaption>Figure 4: Tilt vibration power spectral density after filtering out the atmospheric disturbance.</figcaption></figure>

<figure><img src="image_7.png" /><figcaption>Figure 5: Tilt vibration power spectral density obtained by filtering the model with white noise.</figcaption></figure>

## 6. SCIENCE CASES RESULTS

Five science cases are assessed for the consolidation review. For each stage, the frequency is optimized using the analytical tool PAOLA.¹³ The number of controlled modes remains consistent across different control strategies determined empirically using a standard integrator. The reference controller is an integrator with a single modal gain, hand-tuned to achieve the best contrast between 4 and $6 \lambda/D$. This control remains unchanged for the first stage. For the second stage, it is compared against a data-driven controller with an integrator structure, where the gain of the integrator is optimized for each mode, as described in section 4, referred as optimized modal gain integrator in the following. This setup allows for cross-checking with the hand-tuned integrator. The third control strategy employs a fifth-order data-driven controller, simply referred as data-driven in the following. Each science case is evaluated in standalone and dCAO mode. The performance metrics used include the average contrast after a perfect coronagraph between 4 and $6 \lambda/D$, the Strehl ratio evaluated at 1.65 µm and the radial average contrast curve. The simulations exposure time is set to 5 seconds of stationary atmospheric condition.

### 6.1 Bright 1 best

This first case represents the most optimistic observing conditions: high photon flux in both G and J band, low seeing and low wind speed.

<table><caption>Table 1: Bright 1 best, case parameters.</caption><thead><tr><th>seeing</th><th>t<sub>0</sub></th><th>G mag</th><th>J mag</th><th>1<sup>st</sup> st. frequency</th><th>2<sup>nd</sup> st. frequency</th><th>1<sup>st</sup> st. # of modes</th><th>2<sup>nd</sup> st. # of modes</th><th>1<sup>st</sup> st. λ</th><th>2<sup>nd</sup> st. λ</th></tr></thead><tbody><tr><td>0.4"</td><td>9 ms</td><td>5.5</td><td>5.2</td><td>1000 Hz</td><td>3000 Hz</td><td>1200</td><td>400</td><td>0.69 µm</td><td>1.04 µm</td></tr></tbody></table>
<figure><img src="image_8.png" /><figcaption>Figure 6: Radial average contrast comparison between the control strategies for the "bright 1 best" case.</figcaption></figure>

<table><caption>Table 2: Bright 1 best, performance comparison.</caption><thead><tr><th></th><th>standalone reference</th><th>standalone opt. modal gain</th><th>standalone data-driven</th><th>dCAO reference</th><th>dCAO opt. modal gain</th><th>dCAO data-driven</th></tr></thead><tbody><tr><th>Avg contrast 4-6 λ/D</th><td>2.62e-6</td><td>2.62e-6</td><td>2.49e-6</td><td>6.99e-6</td><td>6.28e-6</td><td>2.61e-6</td></tr><tr><th>strehl [%]</th><td>98.19</td><td>98.19</td><td>98.20</td><td>98.09</td><td>98.05</td><td>98.19</td></tr></tbody></table>

## 6.2 Bright 1 worst

This case keeps the same photon flux as previous one, however, with worse seeing and higher wind speed.

<table><caption>Table 3: Bright 1 worst, case parameters.</caption><thead><tr><th>seeing</th><th>t<sub>0</sub></th><th>G mag</th><th>J mag</th><th>1<sup>st</sup> st. frequency</th><th>2<sup>nd</sup> st. frequency</th><th>1<sup>st</sup> st. # of modes</th><th>2<sup>nd</sup> st. # of modes</th><th>1<sup>st</sup> st. λ</th><th>2<sup>nd</sup> st. λ</th></tr></thead><tbody><tr><td>1.0"</td><td>2 ms</td><td>5.5</td><td>5.2</td><td>1000 Hz</td><td>3000 Hz</td><td>1200</td><td>540</td><td>0.69 µm</td><td>1.04 µm</td></tr></tbody></table>
<figure><img src="image_9.png" /><figcaption>Figure 7: Radial average contrast comparison between the control strategies for the "bright 1 worst" case.</figcaption></figure>

<table><caption>Table 4: Bright 1 worst, performance comparison.</caption><thead><tr><th></th><th>standalone reference</th><th>standalone opt. modal gain</th><th>standalone data-driven</th><th>dCAO reference</th><th>dCAO opt. modal gain</th><th>dCAO data-driven</th></tr></thead><tbody><tr><th>Avg contrast 4-6 λ/D</th><td>1.35e-5</td><td>1.35e-5</td><td>1.29e-5</td><td>2.64e-5</td><td>2.39e-5</td><td>1.17e-5</td></tr><tr><th>strehl [%]</th><td>91.82</td><td>91.84</td><td>91.92</td><td>91.54</td><td>91.59</td><td>91.90</td></tr></tbody></table>

## 6.3 Red 1 fast

The "red" cases are fainter and have a higher flux in the J band than in the G one. Therefore, the first stage (SPHERE) receives a very limited number of photons. "Red 1" is the brightest of the "red" cases. It has a median seeing and fast wind speed.

<table><caption>Table 5: Red 1 fast, case parameters.</caption><thead><tr><th>seeing</th><th>t<sub>0</sub></th><th>G mag</th><th>J mag</th><th>1<sup>st</sup> st. frequency</th><th>2<sup>nd</sup> st. frequency</th><th>1<sup>st</sup> st. # of modes</th><th>2<sup>nd</sup> st. # of modes</th><th>1<sup>st</sup> st. λ</th><th>2<sup>nd</sup> st. λ</th></tr></thead><tbody><tr><td>0.7"</td><td>2 ms</td><td>11.9</td><td>8.5</td><td>300 Hz</td><td>3000 Hz</td><td>400</td><td>540</td><td>0.69 µm</td><td>1.04 µm</td></tr></tbody></table>
<figure><img src="image_10.png" /><figcaption>Figure 8: Radial average contrast comparison between the control strategies for the "red 1 fast" case.</figcaption></figure>

<table><caption>Table 6: Red 1 fast, performance comparison.</caption><thead><tr><th></th><th>standalone reference</th><th>standalone opt. modal gain</th><th>standalone data-driven</th><th>dCAO reference</th><th>dCAO opt. modal gain</th><th>dCAO data-driven</th></tr></thead><tbody><tr><th>Avg contrast 4-6 λ/D</th><td>1.00e-4</td><td>9.44e-5</td><td>7.87e-5</td><td>1.00e-4</td><td>9.63e-5</td><td>7.16e-5</td></tr><tr><th>strehl [%]</th><td>88.85</td><td>89.22</td><td>89.54</td><td>88.70</td><td>89.14</td><td>89.85</td></tr></tbody></table>

## 6.4 Red 3 medium

"Red 3" is a fainter "red" case. A median seeing and average wind speed is chosen.

<table><caption>Table 7: Red 3 medium, case parameters.</caption><thead><tr><th>seeing</th><th>t<sub>0</sub></th><th>G mag</th><th>J mag</th><th>1<sup>st</sup> st. frequency</th><th>2<sup>nd</sup> st. frequency</th><th>1<sup>st</sup> st. # of modes</th><th>2<sup>nd</sup> st. # of modes</th><th>1<sup>st</sup> st. λ</th><th>2<sup>nd</sup> st. λ</th></tr></thead><tbody><tr><td>0.7"</td><td>5.5 ms</td><td>14.5</td><td>10.1</td><td>50 Hz</td><td>1250 Hz</td><td>400</td><td>540</td><td>0.69 µm</td><td>1.14 µm</td></tr></tbody></table>
<figure><img src="image_11.png" /><figcaption>Figure 9: Radial average contrast comparison between the control strategies for the "red 3 medium" case.</figcaption></figure>

<table><caption>Table 8: Red 3 medium, performance comparison.</caption><thead><tr><th></th><th>standalone reference</th><th>standalone opt. modal gain</th><th>standalone data-driven</th><th>dCAO reference</th><th>dCAO opt. modal gain</th><th>dCAO data-driven</th></tr></thead><tbody><tr><th>Avg contrast 4-6 λ/D</th><td>1.06e-4</td><td>1.03e-4</td><td>8.35e-5</td><td>1.04e-4</td><td>1.01e-4</td><td>8.15e-5</td></tr><tr><th>strehl [%]</th><td>88.11</td><td>88.77</td><td>89.36</td><td>88.16</td><td>88.78</td><td>89.39</td></tr></tbody></table>

## 6.5 Red 5 best

"Red 5" is the faintest case considered. Best atmospheric conditions are set with a low seeing and low wind speed.

<table><caption>Table 9: Red 5 best, case parameters.</caption><thead><tr><th>seeing</th><th>t<sub>0</sub></th><th>G mag</th><th>J mag</th><th>1<sup>st</sup> st. frequency</th><th>2<sup>nd</sup> st. frequency</th><th>1<sup>st</sup> st. # of modes</th><th>2<sup>nd</sup> st. # of modes</th><th>1<sup>st</sup> st. λ</th><th>2<sup>nd</sup> st. λ</th></tr></thead><tbody><tr><td>0.4"</td><td>9 ms</td><td>16.8</td><td>12.5</td><td>10 Hz</td><td>300 Hz</td><td>400</td><td>400</td><td>0.69 µm</td><td>1.14 µm</td></tr></tbody></table>
<figure><img src="image_12.png" /><figcaption>Figure 10: Radial average contrast comparison between the control strategies for the "red 5 best" case.</figcaption></figure>

<table><caption>Table 10: Red 5 best, performance comparison.</caption><thead><tr><th></th><th>standalone<br>reference</th><th>standalone<br>opt. modal gain</th><th>standalone<br>data-driven</th><th>dCAO<br>reference</th><th>dCAO<br>opt. modal gain</th><th>dCAO<br>data-driven</th></tr></thead><tbody><tr><th>Avg contrast<br>4-6 λ/D</th><td>6.23e-4</td><td>5.58e-4</td><td>5.74e-4</td><td>6.18e-4</td><td>5.65e-4</td><td>5.69e-4</td></tr><tr><th>strehl [%]</th><td>78.01</td><td>81.16</td><td>81.95</td><td>78.07</td><td>80.29</td><td>80.55</td></tr></tbody></table>

# 6.6 Comments on results

## 6.6.1 Crosscheck between single hand-tuned gain and optimized modal gain integrator

The single hand-tuned gain and optimized modal gain integrator exhibit similar performance, thereby cross-validating both strategies. In the "red" cases, the optimized modal gain integrator demonstrates an enhancement in contrast at higher radius (> 6λ/D). In these fainter cases, the optimized modal gain calculates a lower gain for the high order modes.

## 6.6.2 Data-driven controller

The data-driven controller exhibits superior performance compared to the integrator, particularly in the presence of fast wind, where the disturbance spectrum shifts towards higher frequencies. Consequently, a first-order low-pass filter like the integrator becomes sub-optimal. However, the improvement may not be significant enough to be noticeable in the presence of other error sources that are not considered, such as non-common path aberrations (NCPAs).

## 6.6.3 Standalone vs. dCAO

The distinction between standalone and dCAO is more pronounced in the "bright" cases. The performance disparity stemming from the double rejection effect is significant, but it is mitigated when employing a higher-order controller like the data-driven one. In such instances, the performance is comparable between the two strategies. The advantage of using dCAO lies not in performance improvement, but rather in the separation of both stages, which simplifies the tuning of controllers. In the fainter "red" cases, the first stage operates slower with a low gain mitigating its impact on performance. Therefore, disentangling both stages does no show great difference.
## 7. PERFORMANCE UNDER VIBRATIONS

The primary strength of advanced control strategies lies in their ability to adapt and reject disturbance sources such as vibrations. This capability is demonstrated by comparing the sensitivity function of the data-driven controller with that of an integrator in the presence of vibrations. In this experiment, the tilt vibration described in subsection 5.2.2 is added to the atmospheric disturbance of the first science case, "bright 1 best" (6.1). For the first stage, an integrator is used, while for the second stage, the integrator is compared to the data-driven controller. The data-driven optimizer places notches to damp the main vibration peaks, resulting in a flatter residual spectrum and, consequently, a lower residual RMS.

<figure><img src="image_13.png" /><figcaption>Figure 11: Sensitivity function comparison between an integrator and a data-driven controller along with the disturbance at the input of the second stage containing vibrations.</figcaption></figure>

<figure><img src="image_14.png" /><figcaption>Figure 12: Tilt residual power spectral density comparison between the integrator and data-driven controller in presence of vibrations. The data-driven shows a flatter spectrum.</figcaption></figure>

<table><caption>Table 11: Tilt residual RMS comparison in presence of vibrations.</caption><thead><tr><td>integrator</td><td>data-driven</td><td>relative gain</td></tr></thead><tbody><tr><td>9.09 nm</td><td>6.21 nm</td><td>31.7 [%]</td></tr></tbody></table>

## 8. CONCLUSION

In conclusion, the data-driven controller has showcased its proficiency in disturbance rejection within a two-stage AO system. Further work will involve testing it with non-stationary atmospheric conditions to determine the update rate of the filter coefficients. It has been tested and validated on bench and we look forward to test it on sky within the SAXO+ project. As for the dCAO scheme, while it potentially offers advantages, it should not be automatically used with a first-order integrator controller. Further investigations will be undertaken to delve deeper into this matter.

## ACKNOWLEDGMENTS

SAXO+ is an instrument designed and built by a consortium consisting of LESIA, CRAL, INAF, IPAG, La- grange, LCF, University of Geneva, MPIA, and LAM, in collaboration with ESO. The SAXO+ project received funding from The Fondation Charles Defforey-Institut de France, CNRS/INSU, the Programme et Equipements Prioritaires de Recherche "Origins", the Piano Nazionale di Ripresa e Resilienza, PlanetS, and MPIA.
REFERENCES

[1] Boccaletti, A., Chauvin, G., Wildi, F., Milli, J., Stadler, E., Diolaiti, E., Gratton, R., Vidal, F., Loupias, M., Langlois, M., Cantalloube, F., N'Diaye, M., Gratadour, D., Ferreira, F., Tallon, M., Mazoyer, J., Segransan, D., Mouillet, D., Beuzit, J. L., Bonnefoy, M., Galicher, R., Vigan, A., Snellen, I., Feldt, M., Desidera, S., Rousseau, S., Baruffolo, A., Goulas, C., Baudoz, P., Bechet, C., Benisty, M., Bianco, A., Carry, B., Cascone, E., Charnay, B., Choquet, E., Christiaens, V., Cortecchia, F., de Caprio, V., Rosa, A. D., Desgrange, C., D'Orazi, V., Douté, S., Frangiamore, M., Gendron, E., Ginski, C., Huby, E., Keller, C., Kulcsár, C., Landman, R., Lagarde, S., Lagadec, E., Lagrange, A. M., Kasper, M. L. M., Ménard, F., Magnard, Y., Malaguti, G., Maurel, D., Mesa, D., Morgante, G., Pantin, E., Pichon, T., Potier, A., Rabou, P., Rochat, S., Terenzi, L., Thiébaut, E., Tallon-Bosc, I., Raynaud, H. F., Rouan, D., Sevin, A., Schiavone, F., Schreiber, L., and Zanutta, A., “Upgrading the high contrast imaging facility sphere: science drivers and instrument choices,” (2022).

[2] Galland, N., Raynaud, H. F., Kasper, M., Goulas, C., Béchet, C., Ferreira, F., Tallon, M., Vidal, F., Langlois, M., Boccaletti, A., Chauvin, G., Diolaiti, E., Gratton, R., Loupias, M., Milli, J., Wildi, F., and Kulcsar, C., “Disentangled cascade adaptive optics for the sphere instrument forthcoming upgrade,” in [*Adaptive Optics for Extremely Large Telescopes 7th Edition*], (2023).

[3] Ferreira, F., Gratadour, D., Sevin, A., and Doucet, N., “Compass: An efficient gpu-based simulation software for adaptive optics systems,” in [*2018 International Conference on High Performance Computing & Simulation (HPCS)*], 180–187 (2018).

[4] Beuzit, J.-L., Vigan, A., Mouillet, D., Dohlen, K., Gratton, R., Boccaletti, A., Sauvage, J.-F., Schmid, H. M., Langlois, M., Petit, C., Baruffolo, A., Feldt, M., Milli, J., Wahhaj, Z., Abe, L., Anselmi, U., Antichi, J., Barette, R., Baudrand, J., Baudoz, P., Bazzon, A., Bernardi, P., Blanchard, P., Brast, R., Bruno, P., Buey, T., Carbillet, M., Carle, M., Cascone, E., Chapron, F., Charton, J., Chauvin, G., Claudi, R., Costille, A., De Caprio, V., de Boer, J., Delboulbé, A., Desidera, S., Dominik, C., Downing, M., Dupuis, O., Fabron, C., Fantinel, D., Farisato, G., Feautrier, P., Fedrigo, E., Fusco, T., Gigan, P., Ginski, C., Girard, J., Giro, E., Gisler, D., Gluck, L., Gry, C., Henning, T., Hubin, N., Hugot, E., Incorvaia, S., Jaquet, M., Kasper, M., Lagadec, E., Lagrange, A.-M., Le Coroller, H., Le Mignant, D., Le Ruyet, B., Lessio, G., Lizon, J.-L., Llored, M., Lundin, L., Madec, F., Magnard, Y., Marteaud, M., Martinez, P., Maurel, D., Ménard, F., Mesa, D., Möller-Nilsson, O., Moulin, T., Moutou, C., Origné, A., Parisot, J., Pavlov, A., Perret, D., Pragt, J., Puget, P., Rabou, P., Ramos, J., Reess, J.-M., Rigal, F., Rochat, S., Roelfsema, R., Rousset, G., Roux, A., Saisse, M., Salasnich, B., Santambrogio, E., Scuderi, S., Segransan, D., Sevin, A., Siebenmorgen, R., Soenke, C., Stadler, E., Suarez, M., Tiphène, D., Turatto, M., Udry, S., Vakili, F., Waters, L. B. F. M., Weber, L., Wildi, F., Zins, G., and Zurlo, A., “Sphere: the exoplanet imager for the very large telescope,” *Astronomy & Astrophysics* **631**, A155 (Nov. 2019).

[5] Kasper, M., Cerpa Urra, N., Pathak, P., Bonse, M., Nousiainen, J., Engler, B., Heritier, C. T., Kammerer, J., Leveratto, S., Rajani, C., Bristow, P., Le Louarn, M., Madec, P.-Y., Ströbele, S., Verinaud, C., Glauser, A., Quanz, S. P., Helin, T., Keller, C., Snik, F., Boccaletti, A., Chauvin, G., Mouillet, D., Kulcsár, C., and Raynaud, H.-F., “Pcs — a roadmap for exoearth imaging with the elt,” *Published in The Messenger vol. 182 pp. 38-43*, March 2021. (2021).

[6] Stadler, E., Diolaiti, E., Schreiber, L., Cortecchia, F., Lombini, M., Loupias, M., Magnard, Y., de Rosa, A., Malaguti, G., Maurel, D., Morgante, G., Rabou, P., Rochat, S., Schiavone, F., Terenzi, L., Vidal, F., Cantalloube, F., Gendron, É., Gratton, R., Milli, J., Mouillet, D., Chauvin, G., Wildi, F., Beuzit, J.-L., and Boccaletti, A., “SAXO+, a second-stage adaptive optics for SPHERE on VLT: optical and mechanical design concept,” in [*Adaptive Optics Systems VIII*], 165, SPIE, Montréal, France (July 2022).

[7] Petit, C., Sauvage, J.-F., Fusco, T., Sevin, A., Suarez, M., Costille, A., Vigan, A., Soenke, C., Perret, D., Rochat, S., Barruffolo, A., Salasnich, B., Beuzit, J.-L., Dohlen, K., Mouillet, D., Puget, P., Wildi, F., Kasper, M., Conan, J.-M., Kulcsár, C., and Raynaud, H.-F., “SPHERE eXtreme AO control scheme: final performance assessment and on sky validation of the first auto-tuned LQG based operational system,” in [*Adaptive Optics Systems IV*], Marchetti, E., Close, L. M., and Véran, J.-P., eds., **9148**, 91480O, International Society for Optics and Photonics, SPIE (2014).
[8] Béchet, C., Tallon, M., Thiébaut, E., Tallon-Bosc, I., Langlois, M., Loupias, M., Kulcsar, C., Raynaud, H. F., Galland, N., Dinis, I., Goulas, C., Vidal, F., Milli, J., Mazoyer, J., Galicher, R., Schreiber, L., Feldt, M., Boccaletti, A., Diolaiti, E., Chauvin, G., Wildi, F., and Gratton, R., "Inverse problem approach for SPHERE+ adaptive optics control," in [*Adaptive Optics for Extremely Large Telescopes 7th Edition*], ONERA (June 2023).

[9] Nousiainen, J., Rajani, C., Kasper, M., Helin, T., Haffert, S. Y., Vérinaud, C., Males, J. R., Van Gorkom, K., Close, L. M., Long, J. D., Hedglen, A. D., Guyon, O., Schatz, L., Kautz, M., Lumbres, J., Rodack, A., Knight, J. M., and Miller, K., "Toward on-sky adaptive optics control using reinforcement learning - model-based policy optimization for adaptive optics," *A&A* **664**, A71 (2022).

[10] Gupta, V., Karimi, A., Wilde, F., and Véran, J.-P., "Direct data-driven vibration control for adaptive optics," 6, New York, IEEE (2023).

[11] Assémat, F., Wilson, R. W., and Gendron, E., "Method for simulating infinitely long and non stationary phase screens with optimized memory storage," *Opt. Express* **14**, 988-999 (Feb 2006).

[12] Sarazin, M., Louarn, M., Ascenso, J., Lombardi, G., and Navarrete, J., "Defining reference turbulence profiles for e-elt ao performance simulations," 89-12 (2013).

[13] Schreiber, L., Langlois, M., Jolissaint, L., Diolaiti, E., Béchet, C., Cortecchia, F., Feldt, M., Ferreira, F., Raphael, G., Charles, G., Caroline, K., Lombini, M., Magali, L., Johan, M., Mamadou, N., Raynaud, H. F., Stadler, E., Tallon, M., Tallon-Bosc, I., Thiébaut, E., Vidal, F., Boccaletti, A., Chauvin, G., Gratton, R., Milli, J., Mouillet, D., and Wildi, F., "An analytical approach to model the second-stage Adaptive Optics correction for SPHERE," in [*Adaptive Optics for Extremely Large Telescopes 7th Edition*], ONERA (June 2023).