{'fraction_non_alphanumeric': 0.024450726578386154, 'fraction_numerical': 0.012101373803501464, 'mean_word_length': 4.533479692645445, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Visible extreme adaptive optics for GMagAO-X with the triple-stage AO architecture (TSAO)

The Extremely Large Telescopes will require hundreds of actuators across the pupil for high Strehl in the visible. We envision a triple-stage AO (TSAO) system for GMT/GMagAO-X to achieve this. The first stage is a 4K DM controlled by an IR pyramid wavefront sensor that provides the first order correction. The second stage contains the high-order parallel DM of GMagAO-X that has 21000 actuators and contains an interferometric delay line for phasing of each mirror segment. This stage uses a Zernike wavefront sensor for high-order modes and a Holographic Dispersed Fringe Sensor for segment piston control. Finally, the third stage uses a dedicated 3K dm for non-common path aberration control and the coronagraphic wavefront control by using focal plane wavefront sensing and control. The triple stage architecture has been chosen to create simpler decoupled control loops. This work describes the performance of the proposed triple-stage AO architecture for ExAO with GMagAO-X.


INTRODUCTION
Direct imaging of exoplanets is a challenging endeavor. Especially if we are using ground-based telescopes. However, detecting Earth-like planets, and hopefully even habitable planets, is the primary science driver for the next generation of extremely large telescopes (ELTs). The ELTs will be build on Earth, and will have to image through the Earth's atmosphere. The turbulence in the atmosphere degrades the spatial resolution of the telescopes and limits their resolution to an arcsecond. A second challenge is the large contrast between the exoplanet and its host star. Earth-like planets are easily tens of billions times fainter at separation of a couple times the diffraction limit of the telescopes. Imaging such exoplanets will require extreme high performance adaptive optics systems.
Most of the current direct imaging instruments have been designed to operate at near-infrared wavelengths (Y to L band). This was mainly a technical limitation. Longer wavelengths need less precise correction to achieve similar performance as compared to short wavelengths. Therefore, it was easier to start at longer wavelengths for the first generation of exoplanet imagers such as VLT/NACO. 1,2 This made such instruments suited to hunt for young hot giant gas planets. These planets still retain a large amount of the heat that built up during their formation phase. The heat makes the planets self-luminous in the infrared and therefore bright at infrared wavelengths. Such planets usually are at contrast levels of only 10 −4 to 10 −6 . The first generation of HCI instruments lead to the development of instruments that were finely tuned for exoplanet imaging. The second generation of HCI instruments such as SPHERE, GPI and scexao focused on improving the contrast within the control radius. This was done by adding more advanced coronagraphs and wavefront control. The success of these instruments lead to deeper sensitivities and the discovery of more planets and brown dwarfs.
The Magellan Adaptive Optics system eXtreme (MagAO-X) has been specifically designed to push extreme AO towards optical wavelengths. 3 There is exciting exoplanets science at such short wavelengths: planets in reflected light, 4 detection of bio-signatures in atmospheres 5 and accreting proto-planets. 6 Recent commissioning observations have shown that MagAO-X is close to its designed specification. 3 MagAO-X will start to tackle the Send correspondence to S. Y. Haffert at shaffert@arizona.edu optical science cases. However, only a handful targets are available at the angular resolution and sensitivity of MagAO-X. We need a system with similar specifications to MagAO-X on the ELTs to survey many targets to get a broad understanding of exoplanets.
The Giant Magellan Telescope Adaptive Optics Extreme 7 (GMagAO-X) instrument is a direct imaging instrument under development at the UofA for the 24.5-meter Giant Magellan Telescope (GMT). The University of Arizona Space Institute (UASI) funded a conceptual design study for GMagAO-X beginning in February 2021. A positive Conceptual Design Review (CoDR) on September 14th, 2021, determined that the project could move into a UASI-funded preliminary design phase. GMagAO-X is currently the only direct imaging instrument under development for any of the large ground-based telescopes (GMT, Thirty Meter Telescope (TMT) and the European Extremely Large Telescope (E-ELT)) that can observe exoplanets in the visible spectral range. We will be able to image and characterize several hundred of planets with GMagAO-X. GMagAO-X will use a 21000 actuator deformable mirror (DM) to achieve high sensitivity at visible wavelengths. The 21000-actuator DM will use novel pupil slicing and recombining techniques to implement a parallel DM where each GMT segment will get its own 3K Boston Micromachine DM. 8 A major challenge will be the wavefront sensing and control architecture for such a large actuator DM. Current cameras put strong limitations on the number of available pixels and read-out speeds. A strong driver in the design of GMagAO-X is to use hardware components that are available today to make sure we can build the instrument whenever the instrument gets greenlighted. This proceeding will describe an approach that is being investigated for GMagAO-X that works with current hardware. In Section 2 we will describe the overall architecture. Each of the sub-components of the full loop are described in Sections 3, 4 and 5.

OVERVIEW OF THE ARCHITECTURE
The main challenge for the AO system of GMagAO-X is the large amount of pixels that are required to sample the pupil. The 21000 actuator DM has a projected pitch of 14 cm onto the primary mirrors of the GMT. An equivalent monolithic DM would have 175x175 actuators across the pupil. We follow the same approach as MagAO-X which increased its pupil sampling by 25% to lower aliasing errors. This means we have to sample the GMT pupil with 175 × 1.25 ≈ 220 pixels across the full aperture (over all segments). Most of the new AO system use either the OCAM 2K (240x240 pixels) for wavefront sensing in the visible or the CRED ONE (320 x 256) for wavefront sensing in the near-infrared. These sensors are cameras that have Electron Multiplying (EM) gain capability which reduces the read noise to below 1 electron rms. Low read noise detectors are necessary as this is a major limitation for the low-flux performance of AO systems. While larger sensors are in development, GMagAO-X follows the design philosophy that we will use currently available hardware to make us ready to build the system as soon as possible. This does not mean that new technology will not be considered for GMagAO-X, but that we do not want to be dependent on the development future technology.
If we limit our available pixels to 240 pixels (the lowest denominator of the current high-speed EMCCDs) then that is already close to the required sampling of a single pupil. Any wavefront sensor that needs multiple pupil images can not be used with a single detector. One of the first designs for GMagAO-X was to use either a four-sided or three-sided pyramid wavefront sensor 9, 10 where each pupil is send to its own camera. While this might solve the pixel issue, it comes with a lot of synchronization and software challenges. Single pupil wavefront sensors are interferometric wavefronts sensors. Starlight is generally temporally incoherent because we use broadband light. This precludes the use of heterodyne-like interferometry measurements. The starlight itself has to create its own reference beam. Going even further, the interferometer needs to be a common path interferometer. If the reference beam is created in a separate optical path any differential aberration (most likely vibrations) will lower the performance. From all common path interferometers it is the Zernike wavefront sensor (ZWFS) that is the most efficient in its use of light. 11,12 The major downside of any interferometer is the dynamic range. The dynamic range of a ZWFS is significantly smaller than what is required to sense open-loop atmospheric turbulence. This is also the reason why the ZWFS has only been used as a second stage sensor. 12 We propose to use a multi-stage system where a first stage AO system is used to take care of the large low-order aberrations. The HODM has a stroke requirement of 3.5 um which is not enough to capture the full range of turbulence. GMagAO-X was always envisioned to operate with a Woofer-Tweeter architecture similar to that of MagAO-X. Here we propose to add a separate low-order wavefront sensor to directly control the woofer (e.g. the low-order DM (LODM)) to create the first stage AO loop. This cleans up the wavefront aberrations enough that we can use a ZWFS for the high-order loop that controls the 21-kilo DM. A second part of the high-order loop contains a differential piston sensor. Sensing differential piston is possible with the ZWFS, but because the ZWFS is an interferometric wavefront sensor it is sensitive to phase wrapping effects. Therefore, we include the Holographic dispersed fringe sensor (HDFS) as a piston sensor for the GMT. 13 This sensor has been demonstrated to reach ¡30 nm piston rms for the GMT in a lab environment. 13,14 We assume that the HDFS is tracking and controlling the differential piston for the simulations in this work. This is implemented by removing all differential piston from the input disturbances. Later work will include the HDFS in the end-to-end simulations.
The low-order AO loop will control the monolithic 64x64 actuator woofer DM. We are currently baselining an ALPAO 3228 DM beacuse of its 15 um stroke. The low-order loop will only need 62 × 1.25 ≈ 80 pixels across the full pupil. Such a pupil easily fits multiple times on either the OCAM2K or the CRED ONE. We are considering either a three or four-sided pyramid wavefront sensor to control the LODM. In this proceeding we explore the four-sided PWFS. However, the three-sided PWFS has been shown to have equivalent performance for bright objects 10 and superior performance for faint objects. 15 The LO loop and HO loop together will deliver PSFs with high Strehl which are send to the coronagraph. Any non-common path aberration (NCPA) between the AO loops and the coronagraph optics will create stellar leakage around the coronagraph. These NCPA will have to be controlled and removed. GMagAO-X will contain several focal-plane wavefront sensors (FPWFS) and coronagraphic wavefront sensors (CWS) to measure the NCPA and create dark holes around the PSF. The main problem then comes to control of the aberrations. The NCPA could in principle be off-loaded to the HO loop. However, operating the ZWFS (or even the PWFS for that matter) around a non-zero point will lead to non-linear interactions that are difficult to track and calibrate. It is easier if the responsibilities of the AO system and the coronagraph are separated. This can be achieved by adding a dedicated DM in the coronagraph that is purely used for NCPA correction and dark hole digging. This is the approach that is implemented on MagAO-X. 3 Separating the responsibilities also makes the control loop design much easier. We do not have to take into account any dynamic interaction between the coronagraph and the AO system. All together, GMagAO-X will have three stages in its wavefront control architecture. An overview of the proposed multi-stage AO system can be seen in Figure 1.  Figure 1. An overview of the triple stage AO system that is envisioned for GMagAO-X. It starts with a low-order loop that has a pyramid wavefront sensor driving the 3228 actuator woofer. A second stage with a Zernike wavefront sensor and the high-order 21K DM is used to achieve very high Strehl. The well corrected wavefront is then send into the coronagraph that has multiple wavefront sensors to control non-common path aberrations and create dark holes around the star.

THE LOW-ORDER AO LOOP
The LO loop consists of the 3000 actuator DM and a variant on the pyramid wavefront sensor. One of the major design choices for the low-order loop is to include a dedicated LODM inside GMagAO-X. GMagAO-X will not use the Adaptive Secondary Mirrors (ASM) of the GMT. This is mainly driven by ease of calibration. It is tricky to calibrate the ASM without complicated illumination optics, while it is much easier for an internal DM. One of the main choices we have to consider is the wavelength that will be used to drive the LO loop. MagAO-X uses I-band photons for wavefront sensing with its PWFS. That wavelength band provides the best sensitivity for M stars, 16 which are the prime targets of GMagAO-X. However, the short wavelength of 0.8 µm means that we have to modulate the PWFS to increase its capture ranges. The PWFS at MagAO-X is often modulated by 3 λ/D as this provides a stable system that is robust in most seeing conditions. The modulation lowers the sensitivity of the wavefront sensor significantly. 17 While visible wavefront sensing like I-band is the most common band, more and more systems are considering near-infrared wavefront sensors. 18,19 This is driven by both the amount of targets and the non-linearity effects of the PWFS. The amount of non-linearity is set by the wavelength. Sensing the wavefront at longer wavelengths makes the PWFS more linear. 18 Most importantly, the amount of targets increases substantially. Figure 2 shows the amount of targets that are available for GMagAO-X if we use an I-band wavefront sensor or a K-band wavefront sensor. There are two important science cases: • Exoplanets in reflected light. These companions need to orbit their host star at relatively close orbits to capture and reflect enough light to make them detectable. 16 The sample of targets are all the stars that are in the Solar Neighborhood. We made a selection by looking for all objects within 10 pc within in the GAIA catalogue and all objects within 30 pc in the SIMBAD database.
• Accreting proto-planets. These planets are still young and embedded in a (gapped) circum-stellar disk. Such stars are usually classified as T-Tauri stars. Our second sample contains all T-Tauri stars that are visible from the southern hemisphere.
The amount of available targets increases by a factor 3 if we use a K-band wavefront sensor instead of an I-band wavefront sensor. The loss in sensitivity in K-band is compensated by the additional amount of targets that are observable. All most all T-Tauri stars are significantly brighter in K-band, which will partially compensate for the loss in sensitivity. Another driver for the choice for K-band is that GMagAO-X will support science observations from R-band to H-band. All of the K-band photons can be used for wavefront sensing. This will increase the throughput to the science channels because no photons have to be shared. The K-band LO-loop performance is predicted by end-to-end simulations. The parameters of the LO system can be found in Table 1. The LO loop uses a simple leaky integrator for the controller, where the gain is optimized for each guide star magnitude. We do not expect significant optical gain effects because the sensing happens at K-band. Therefore, we have not applied any optical gain corrections for these simulations. We ran 5 trials of 500 iterations for each combination of guidestar magnitude and gain. The median Strehl across the last 250 iterations of all 5 trials is shown for each magnitude in Figure 3. The band around the curve are the 16% and 84% quantiles of the Strehl. There are not enough photons to control all modes for the faintest targets. We also ran the same gain optimization procedure for magnitudes 10 to 13 with 800 modes and with 1200 modes. We saw a significant increase in performance at 11, 12 and 13th magnitude. The system still delivers 10% Strehl at 12th magnitude in I-band.

THE HIGH-ORDER AO LOOP
The high-order loop uses a ZWFS to control the high-order DM. The phase reconstruction is still a challenge even with the reduced number of pixels that ZWFS uses. The ZWFS can in principle use a linear reconstructor in the small phase regime. 12 Most AO systems would use a straightforward Matrix-Vector Multiplication (MVM) for that. This matrix has a size of 21000 by 35000 elements. Calibrating this matrix with a push-pull approach would take a significant amount of time. Therefore, we are reconstructing the input phase directly. Mathematically the ZWFS can be described as, Here, E o is the output electric field and E i the input electric field. The ZWFS applies a low-pass filter through the phase dot (with step size δ) on the input electric field. This is described by the convolution of E i with the pupil response of the ZWFS mask m. For a well corrected beam the spatially filtered electric field is very close to the diffraction-limited electric field. 12,20 The filtered part can be replaced by its diffraction-limited counterpart with a scalar correction for the Strehl loss. This effectively means we are interfering the aberrated electric field with a spatially filtered version of the diffraction-limited beam. This is a simple two beam interference problem, In this equation, m * (e iδ − 1)E i has been replaced by the modelled reference electric field E r . The intensity of the measurement is, The input intensity, I i , is just the measured pupil intensity and does not depend on the phase. This can be measured and subtracted. Similarly, the reference intensity can also be subtracted. The phase reconstruction is, This reconstructor takes all non-linearities of the ZWFS into account, if the reference field has been corrected for the Strehl loss. The direct phase reconstruction is much quicker than a MVM multiplication. The actuator voltages signals are calculated by projecting the reconstructed phase onto the voltages. This is done through a sparse MVM because the actuators have a very localized influence function. Therefore, it is faster to project the phase onto the actuators with a sparse MVM.
The HO loop is closed after 15 iterations of the LO loop in the end-to-end simulations. In practice this will most likely take longer if human interaction is necessary to close both loops. We use a 0th magnitude guidestar for our first end-to-end simulation of the multi-stage AO system (MSAO). For this guidestar magnitude both the LO and HO loop run at 2 kHz with optimized gains. The ZWFS uses J-band light for these simulations. The PSFs at various stages during the loop are shown in Figure 4. The seeing halo is completely removed up to 90 λ/D after the second stage. The Strehl reaches nearly 95% at 1µm which can be seen in Figure 5. This shows that this system can reach the required performance for high-contrast imaging at short wavelengths.

CONCLUSION AND OUTLOOK
This proceeding describes the current wavefront sensing and control architecture for GMagAO-X. A system with multiple stages is considered because of the design philosophy. The system will use a first stage K-band pyramid wavefront sensor running at 1 or 2 kHz. Followed by a Zernike wavefront sensor at bluer wavelengths to control the high-order loop. This combination of wavefront sensors allows us to control our 21000 actuator DM and achieve a Strehl of 95% at 1µm on the GMT. The current simulations are the first end-to-end simulations of GMagAO-X and do not include all sources of noise and all input disturbances. Therefore, our next step will be to expand the simulations to make them more representative: • The input disturbance will need to include vibrations caused by the telescope and windshake.
• Include differential piston, which we have now neglected.
• More representative detector noise.
• Advanced control algorithms such a predictive control 21   While the figure on the right shows all young T-Tauri stars for science objective 3. Both figures show that a K-band wavefront sensor would enable science on many more targets than a visible wavefront sensor. And, most T-Tauri stars are much brighter in K-band which leads to higher Strehl.