# Beam shaping for laser-based adaptive optics in astronomy

Clementine Bechet, Andres Guesalaga, Benoit Neichel, Vincent Fesquet, Hector Gonzalez-Nunez, Sebastian Zuniga, Pedro Escarate, Dani Guzman

► To cite this version:

Clementine Bechet, Andres Guesalaga, Benoit Neichel, Vincent Fesquet, Hector Gonzalez-Nunez, et al.. Beam shaping for laser-based adaptive optics in astronomy. Optics Express, 2014, 22 (11), pp.12994-13013. 10.1364/OE.22.012994 . hal-01439421

HAL Id: hal-01439421

https://hal.science/hal-01439421

Submitted on 22 Dec 2023

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_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Beam shaping for laser-based adaptive optics in astronomy

Clémentine Béchet,<fnref n="1" />,* Andrés Guesalaga,<fnref n="1" /> Benoit Neichel,<fnref n="2" />,<fnref n="3" />

Vincent Fesquet,<fnref n="2" /> Héctor González-Núñez,<fnref n="1" /> Sebastián Zúñiga,<fnref n="4" />

Pedro Escarate,<fnref n="4" /> and Dani Guzman<fnref n="1" />

**Abstract:** The availability and performance of laser-based adaptive optics (AO) systems are strongly dependent on the power and quality of the laser beam before being projected to the sky. Frequent and time-consuming alignment procedures are usually required in the laser systems with free-space optics to optimize the beam. Despite these procedures, significant distortions of the laser beam have been observed during the first two years of operation of the Gemini South multi-conjugate adaptive optics system (GeMS). A beam shaping concept with two deformable mirrors is investigated in order to provide automated optimization of the laser quality for astronomical AO. This study aims at demonstrating the correction of quasi-static aberrations of the laser, in both amplitude and phase, testing a prototype of this two-deformable mirror concept on GeMS. The paper presents the results of the preparatory study before the experimental phase. An algorithm to control amplitude and phase correction, based on phase retrieval techniques, is presented with a novel unwrapping method. Its performance is assessed via numerical simulations, using aberrations measured at GeMS as reference. The results predict effective amplitude and phase correction of the laser distortions with about 120 actuators per mirror and a separation of 1.4 m between the mirrors. The spot size is estimated to be reduced by up to 15% thanks to the correction. In terms of AO noise level, this has the same benefit as increasing the photon flux by 40%.

© 2014 Optical Society of America

OCIS codes: (140.3300) Laser beam shaping; (110.1080) Active or adaptive optics; (100.3190) Inverse problems; (100.5070) Phase retrieval; (100.5088) Phase unwrapping.

## References and links

1. G. Rousset, "Wave-front Sensors," in *Adaptive Optics in Astronomy*, F. Roddier, ed. (Cambridge University, 1999), pp. 91–130.

2. F. Rigaut, B. Neichel, M. Boccas, C. d'Orgeville, F. Vidal, M. A. van Dam, G. Arriagada, V. Fesquet, R. L. Galvez, G. Gausachs, C. Cavedoni, A. W. Ebbers, S. Karewicz, E. James, J. Lührs, V. Montes, G. Perez, W. N. Rambold, R. Rojas, S. Walker, M. Bec, G. Trancho, M. Sheehan, B. Irarrazaval, C. Boyer, B. L. Ellerbroek, R. Flicker, D. Gratadour, A. Garcia-Rissmann, F. Daruich, "Gemini multiconjugate adaptive optics system review - I. Design, trade-offs and integration," Mon. Not. R. Astron. Soc. **437**, 2361–2375 (2014).

3. B. Neichel, F. Rigaut, F. Vidal, M. A. van Dam, V. Garrel, E. Rodrigo Carrasco, P. Pessev, C. Winge, M. Boccas, C. d'Orgeville, G. Arriagada, A. Serio, V. Fesquet, W. N. Rambold, J. Lührs, C. Moreno, G. Gausachs,

<footnote n="1">¹Pontificia Universidad Católica de Chile, 4860 Vicuña Mackenna, Santiago, Chile</footnote>

<footnote n="2">²Gemini Observatory, c/o AURA, Casilla 603, La Serena, Chile</footnote>

<footnote n="3">³Aix Marseille Université, CNRS LAM, UMR 7326, 13388 Marseille, France</footnote>

<footnote n="4">⁴Universidad Técnica Federico Santa María, Avenida España 1680, Valparaíso, Chile</footnote>

<footnote>*CBechetP@ing.puc.cl</footnote>
R. L. Galvez, V. Montes, T. B. Vucina, E. Marin, C. Urrutia, A. Lopez, S. J. Diggs, C. Marchant, A. W. Ebbers, C. Trujillo, M. Bec, G. Trancho, P. McGregor, P. J. Young, F. Colazo, M. L. Edwards, "Gemini multi-conjugate adaptive optics system review II: Commissioning, operation and overall performance," Mon. Not. R. Astron. Soc., in press (2014).

4. C. d'Orgeville, S. Diggs, V. Fesquet, B. Neichel, W. Rambold, F. Rigaut, A. Serio, C. Araya, G. Arriagada, R. Balladares, M. Bec, M. Boccas, C. Duran, A. Ebbers, A. Lopez, C. Marchant, E. Marin, V. Montes, C. Moreno, E. Petit Vega, C. Segura, G. Trancho, C. Trujillo, C. Urrutia, P. Veliz and T. Vucina, "Gemini South multi-conjugate adaptive optics (GeMS) laser guide star facility on-sky performance results," Proc. SPIE **8447**, 84471Q (2012).

5. A. E. Siegman, "New developments in laser resonators," Proc. SPIE **1224**, 2-14 (1990).

6. D. R. Neal, W. J. Alford, J. K. Gruetzner and M. E. Warren, "Amplitude and phase beam characterization using a two-dimensional wavefront sensor," Proc. SPIE **2870**, 72-82 (1996).

7. C. Béchet, A. Guesalaga, B. Neichel, V. Fesquet and D. Guzman, "A two deformable-mirror concept to improve the laser efficiency of Gemini South MCAO," in *Proceedings of the Third AO4ELT Conference*, S. Esposito, L. Fini, eds. (INAF - Osservatorio Astrofisico di Arcetri, Firenze, Italy, 2013), 13344.

8. C. d'Orgeville, F. Daruich, G. Arriagada, M. Bec, M. Boccas, S. Bombino, C. Carter, C. Cavedoni, F. Collao, P. Collins, E. James, S. Karewicz, M. Lazo, D. Maltes, R. Mouser, G. Perez, F. Rigaut, R. Rojas, M. Sheehan, G. Trancho, V. Vergara, and T. Vucina, "The Gemini South MCAO laser guide star facility: getting ready for first light," Proc. SPIE **7015**, 70152P (2008).

9. R. Holzlöhner and D. Bonaccini Calia and W. Hackenberg, "Physical optics modeling and optimization of laser guide star propagation," Proc. SPIE **7015**, 701521 (2008).

10. B. L. Ellerbroek, "Adaptive Optics for the Thirty Meter Telescope," in *Proceedings of the Third AO4ELT Conference*, S. Esposito, L. Fini, eds. (INAF - Osservatorio Astrofisico di Arcetri, Firenze, Italy, 2013), 13199.

11. Y. Feng, L. R. Taylor and D. B. Calia, "25 W Raman-fiber-amplifier-based 589 nm laser for laser guide star," Opt. Express **17**(21), 19021-19026 (2009).

12. A. Guesalaga, B. Neichel, M. Boccas, C. d'Orgeville, F. Rigaut, D. Guzman, and J. Anguita, "Improving stability, robustness, and performance of laser systems," Proc. SPIE **8447**, 84474M (2012).

13. F. Y. Kanev and V. P. Lukin, "Amplitude phase beam control with the help of a two-mirror adaptive system," Atmos. Opt. **4**, 878-881 (1991).

14. B. R. Frieden, "Lossless conversion of a plane laser wave to a plane wave of uniform irradiance," Appl. Opt. **4**, 1400-1403 (1965).

15. J. W. Ogland, "Mirror system for uniform beam transformation in high-power annular lasers," Appl. Opt. **17**, 2917-2923 (1978).

16. D. Shafer, "Gaussian to flat-top intensity distributing lens," Optics & Laser Technology **14**, 159-160 (1982).

17. P. W. Rhodes and D. L. Shealy, "Refractive optical systems for irradiance redistribution of collimated radiation: their design and analysis," Appl. Opt. **19**, 3545-3553 (1980).

18. M. T. Eismann, A. M. Tai, and J. N. Cederquist, "Iterative design of a holographic beamformer," Appl. Opt. **28**, 2641-2650 (1989).

19. K. L. Baker, E. A. Stappaerts, D. Gavel, S. C. Wilks, J. Tucker, D. A. Silva, J. Olsen, S. S. Olivier, P. E. Young, M. W. Kartz, L. M. Flath, P. Kruelevitch, J. Crawford and O. Azucena, "High-speed horizontal-path atmospheric turbulence correction with a large-actuator-number microelectromechanical system spatial light modulator in an interferometric phase-conjugation engine," Opt. Lett. **29**(15), 1781-1783 (2004).

20. M. C. Roggemann and D. J. Lee, "Two-Deformable-Mirror Concept for Correcting Scintillation Effects in Laser Beam Projection Through the Turbulent Atmosphere," Appl. Opt. **37**(21), 4577-4585 (1998).

21. J. D. Barchers and D. L. Fried, "Optimal control of laser beams for propagation through a turbulent medium," J. Opt. Soc. Am. A **19**, 1779-1793 (2002).

22. M. A. Vorontsov and V. Kolosov, "Target-in-the-loop beam control: basic considerations for analysis and wave-front sensing," J. Opt. Soc. Am. A **22**(1), 126-141 (2005).

23. Z. Zhao, S. D. Lyke and M. C. Roggemann, "Adaptive Optical Communication through Turbulent Atmospheric Channels," in *Proceedings of IEEE Conference on Communications, 2008. ICC '08* (Institute of Electrical and Electronics Engineers, New York, 2008), 5432-5436.

24. R. Kizito, M. C. Roggemann, T. J. Schulz and Y. Zhang, "Image sharpness metric-based deformable mirror control for beam projection systems operating in strong scintillation," Proc. SPIE **5160**, 406-416 (2004).

25. M. C. Roggemann and S. Deng, "Scintillation compensation for laser beam projection using segmented deformable mirrors," Proc. SPIE **3763**, 29-40 (1999).

26. M. C. Roggemann and A. C. Koivunen, "Wavefront sensing and deformable mirror control in strong scintillation," J. Opt. Soc. Am. A **17**, 911-919 (2000).

27. J. D. Barchers and B. L. Ellerbroek, "Improved compensation of turbulence-induced amplitude and phase distortions by means of multiple near-field phase adjustments," J. Opt. Soc. Am. A **18**(2), 399-411 (2001).

28. J. D. Barchers, "Evaluation of the impact of finite-resolution effects on scintillation compensation using two deformable mirrors," J. Opt. Soc. Am. A **18**, 3098-3109 (2001).

29. J. D. Barchers, "Closed-loop stable control of two deformable mirrors for compensation of amplitude and phase fluctuations," J. Opt. Soc. Am. A **19**, 926-945 (2002).
30. F. Roddier, *Adaptive Optics in Astronomy* (Cambridge University, 1999).

31. R. A. Gonsalves, "Compensation of scintillation with a phase-only adaptive optic," Opt. Lett. 22, 588-590 (1997).

32. O. Guyon, "Phase-induced amplitude apodization of telescope pupils for extrasolar terrestrial planet imaging," Astron. Astrophys. 404, 379-387 (2003).

33. L. Pueyo and N. Kasdin, "Polychromatic compensation of propagated aberrations for high-contrast imaging," Astrophys. J. 666, 609-625 (2007).

34. L. Pueyo, J. Kay, N. J. Kasdin, T. Groff, M. McElwain, A. Give'on, and R. Belikov, "Optimal dark hole generation via two deformable mirrors with stroke minimization," Appl. Opt. 48, 6296-6312 (2009).

35. D. Gavel, M. Ammons, B. Bauman, D. Dillon, E. Gates, B. Grigsby, J. Johnson, C. Lockwood, K. Morzinski, D. Palmer, M. Reinig, and S. Severson, "Visible light laser guidestar experimental system (Villages): on-sky tests of new technologies for visible wavelength all-sky coverage adaptive optics systems," Proc. SPIE 7015, 70150G (2008).

36. A. P. Norton, D. Gavel, M. Helmbrecht, C. J. Kempf, E. L. Gates, K. Chloros, D. Redel, and D. Dillon, "Laser guidestar uplink correction using a MEMS deformable mirror: on-sky test results and implications for future AO systems," accepted for Proc. SPIE (2014).

37. X. Lei, S. Wang, H. Yan, W. Liu, L. Dong, P. Yang, and B. Xu, "Double-deformable-mirror adaptive optics system for laser beam cleanup using blind optimization," Opt. Express 20, 22143-22157 (2012).

38. V. Fesquet, C. Araujo, V. Garrel, A. Serio, F. Vidal, G. Arriagada, M. Boccas, F. Collao, S. Diggs, J. Donahue, C. D'Orgeville, G. Gausachs, C. Marchant, V. Montes, C. Moreno, B. Neichel, R. Oram, P. Pessev, W. Rambold, C. Urrutia, T. Vucina, "Review of Gemini South Laser Guide Star Facility performance and upgrades," in Proceedings of the Third AO4ELT Conference, S. Esposito, L. Fini, eds. (INAF - Osservatorio Astrofisico di Arcetri, Firenze, Italy, 2013), 16120.

39. J. R. Fienup, "Phase retrieval algorithms: a comparison," Appl. Opt. 21, 2758-2769 (1982).

40. R. W. Gerchberg and W. O. Saxton, "A practical algorithm for the determination of the phase from image and diffraction plane pictures," Optik 35, 237-246 (1972).

41. R. A. Gonsalves, "Phase retrieval from modulus data," J. Opt. Soc. Am. 66, 961-964 (1976).

42. J. R. Fienup, "Reconstruction of an object from the modulus of its fourier transform," Opt. Lett. 3, 27-29 (1978).

43. H. Stark and Y. Yang, *Vector Space Projections, a Numerical Approach to Signal and Image Processing, Neural Nets and Optics.*, Wiley Series in Telecommunications and Signal Processing (John Wiley, 1998).

44. T. M. Venema and J. D. Schmidt, "Optical phase unwrapping in the presence of branch points," Opt. Express 16, 6985-6998 (2008).

45. D. L. Fried, "Branch point problem in adaptive optics," J. Opt. Soc. Am. A 15(10), 2759-2768 (1998).

46. J. D. Schmidt, *Numerical Simulation of Optical Wave Propagation with examples in MATLAB* (SPIE Press, 2010).

47. C. C. Beckner Jr. and D. W. Oesch, "Implementation of a projection-on-constraints algorithm for beam intensity redistribution," Proc. SPIE 6711, 67110L (2007)

# 1. The need for laser beam optimization

The performance of adaptive optics (AO) is strongly dependent on the quality of the wavefront sensing measurements from the guide stars because they directly affect the correction error [1]. For the Shack-Hartmann (SH) wavefront sensors, currently the better adapted sensor for laser guide stars on large telescopes, the standard deviation measurement error ($\sigma_{meas}$) is a function of the spot size and the number of photons received per subaperture and per frame according to [1]:

$$ \sigma_{\text{meas}} \propto \frac{\theta_{\text{image}}}{\sqrt{N_{\text{ph}}}}, \qquad (1) $$

where $\theta_{image}$ is the full width at half maximum (FWHM) of the spot image in the focal plane of a SH subaperture, and $N_{ph}$ is the average number of photons received in a SH subaperture each frame. Therefore, the smaller the spot image or the greater the number of received photons, the better the measurement accuracy. This article analyzes the case of the Gemini South multi-conjugate AO system (GeMS) [2] which uses a single sodium laser to generate a constellation of 5 laser guide stars on sky. The size of the spot image $\theta_{image}$ depends on various parameters, among which the laser spot size in the sodium layer, the elongation of the seen spot due to the sodium layer thickness, the diffraction produced by the SH subaperture size and the atmospheric seeing.
For the first two years of operations of GeMS during the season of low sodium concentration (December-January), the system frame rate had to be frequently reduced compared to its maximum of 800 Hz in order to guarantee the average detection of at least 135 photons per sub-aperture per frame from each laser guide star [3,4]. This minimum flux is required for adequate closed-loop AO correction by GeMS. From Eq. (1), if the image spot size $\theta_{image}$ is reduced by 15%, it is equivalent for a given AO noise level to increase the number of photons by 40%. Laser-based AO systems usually being designed with little margin in terms of expected photons return, it appears all the more important to minimize the spot size.

In laser specifications, the smallest laser spot possible is obtained if the 589 nm beam to be projected has a beam quality factor $M^2 = 1$ [5]. Any discrepancy from this ideal shape results in $M^2$ values greater than 1. An estimation of the $M^2$ of a laser can be computed using a SH to measure the beam irradiance and wavefront at waist [6] and by using the discrete Fourier transform of the resulting complex field, the far-field distribution can also be computed. From each of these fields, the standard deviation of the x and y axis margin distribution of the beam intensity, can be obtained. Using the notations $D_x$ and $\theta_x$ for this quantity along x-direction at the waist and in the far-field respectively, the $M^2$ is estimated by

$$M_x^2 = \frac{\pi D_x \theta_x}{4^3 \lambda} \qquad (2)$$

During the 2011/2012 commissioning campaign, the measured $M^2$ factors on GeMS were below 1.5 and 1.3, in x and y respectively [4]. A beam quality $M^2$ close to 1 has not been achieved so far with GeMS laser. The $M^2$ values even worsened during the first half of 2013, revealing significant degradation of the laser beam quality with time. The laser beam has been measured right at the output of the laser bench using a dedicated Shack-Hartmann sensor. The obtained irradiance maps are shown in Fig. 1 for sets of measurements taken in April and October 2013. Note that these measurements were both made after several days of alignment optimization, i.e. on the best laser shape at each time. From the data of April 2013, $M^2$ factors of 2.21 and 1.21 along x and y directions respectively were found. In October 2013, the corresponding $M^2$ factors were 2.23 and 1.15.

These values highlight the strong distortion of the amplitude along x-axis, also visible in all plots of Fig. 1. The dotted line represents the half of the maximum to quantify the FWHM and it shows that the beam diameter is between 1.5 and 2 times larger along x than along y. The beam quality is always worse in the x-axis with GeMS because it corresponds to the unguided dimension of the amplification stages in the waveguide amplifier module [4]. In addition, a slow increase of the $M^2$ values over the length of the runs has also been noticed, suggesting that the system suffers from constant misalignment [4].

The impact of this degraded shape of the beam on the laser intrinsic spot size has been previously quantified by including the measured irradiance of April 2013 (top of Fig. 1) in simulations of the uplink propagation of the laser from the launching telescope to the mesosphere [7]. No phase aberrations were considered, but the beam was simulated for amplitude shapes different from that of a perfect Gaussian shape. The same uplink simulation code is used to evaluate the impact of amplitude and phase distortions on the short-exposure spot size at the sodium layer. Previous on-sky measurement of the laser intrinsic spot size of 1.0" has been reported for GeMS [8]. This number cannot be directly compared to the values obtained with the simulation because there is not a strictly linear dependence of the laser return flux and the short-exposure irradiance focused at the sodium altitude. However, GeMS laser is not expected to induce saturation at the sodium layer, so the variance of the short-exposure irradiance over the SH subaperture field-of-view provides a good estimate of the spot size at a first order [9]. In addition, the vertical distribution of the sodium layer is not taken into account in this computation, but its effect could be considered to globally increase of the spot size by
<figure><img src="image_2.png" /><figcaption>Fig. 1. Average irradiance map over 20 frames obtained from a 37 × 37 Shack-Hartmann sensor located at the output of the laser, during a run in April 2013 (top) and a run in October 2013 (bottom). **Left:** Irradiance map, with orthogonal lines of cuts through the maximum. **Right:** Cuts along x (dashed) and y-axis (solid) of the irradiance map above. The dotted horizontal line marks the half of the maximum.</figcaption></figure>

10% [9]. Simulating a seeing of 0.73 arcseconds at 500 nm (median seeing over 33 GeMS observations nights between December 2012 and June 2013 [3]), on averaged over 100 successive independent atmospheres, the obtained FWHM of the short-exposure spot (arcseconds) is:

* 0.61" for a perfect Gaussian beam with FWHM of 25 cm.

* 0.69" and 0.71" considering only amplitude aberrations measured in April 2013 and in October 2013 respectively.

* 0.74" considering both amplitude and phase aberrations of the laser beam. The same value 0.74" is obtained for April 2013 and for October 2013.

For a given AO noise level (in Eq. (1)), the reduced size of the short-exposure laser spot with a perfect Gaussian beam compared to the distorted beam would be equivalent to an increase of the received number of photons by 30 to 45%.

The beam degradation is understood as the result of quasi-static aberrations in both the laser bench and the beam transfer optics (BTO) path [4]. First, the co-alignment of the optical system for sum frequency generation used in GeMS is highly subject to temperature hysteresis, as well as telescope vibrations. This critical alignment tends to drift along a run. Secondly, the BTO is in a closed environment, with no turbulence, but the outside temperature can vary by 10 to 15
degrees, so aberrations along the BTO are subject to slow evolutions. Frequent and constraining
calibrations and alignment procedures (quasi-static aberrations) are thus required in both parts
to optimize the beam to launch. These complex and time-consuming alignment procedures
currently used will strongly reduce the availability of GeMS [3]. It may also affect the future
generations of AO requiring high power laser and using beam transport by mirrors, as planned
for the Thirty Meter Telescope [10]. It is worth noting that recent research and development of
fiber lasers for sodium guide stars [11] have shown very promising laboratory results to produce
lasers with better *M*² quality and high power. There is still few on-sky experience to guarantee
that this new technology can solve all the problems for an AO system like GeMS, requiring a
50-Watt laser. Therefore the study of an automatic technique to improve the beam shape of the
current laser in GeMS is considered highly desirable.

The concept of a beam shaping system for laser-based astronomical AO was recently pro-
posed [12] and its potential benefit on the GeMS signal-to-noise ratio has been highlighted with
preliminary simulations of the uplink propagation of the laser toward the sodium layer [7]. This
concept is studied here in greater detail, quantifying with numerical simulations the expected
performance of the method with respect to design parameters. These results will be further used
to develop an experimental prototype for such beam correction to be tested on GeMS laser.

In Sect. 2, the architecture with two deformable mirrors for amplitude and phase correction is detailed. In Sect. 3, the iterative algorithm used to deduce the commands for both mirrors is described with emphasis given to the iterative unwrapper required to solve the problem in practice. Last in Sect. 4, preliminary simulations of the beam shaping correction method are presented. The results confirm the ability to correct both amplitude and phase with this type of architectures. The influence of parameters like the separation distance between the mirrors, the number of iterations of the algorithm and the number of actuators of the mirrors are emphasized.

## 2. 2-DM concept for laser beam shaping

In order to optimize the laser beam to be launched, correction of both amplitude and phase
distortions of the beam is required. This is referred to as optical field conjugation or amplitude-
phase correction [13].

The presented concept takes its origins in the beam shaping research for laser radar and active coherent imaging (e.g. [14–18]). In these first studies, the common goal was to produce an optical device which modifies the beam coming from a given source to lead to a desired irradiance distribution in the near-field. In order to avoid loss of energy, only refractive or reflective surfaces must be used to redistribute the energy. Early works were focused on static shaping and lead to the difficult manufacturing of very specific optical components [15–17]. Eismann et al. [18] proposed a more versatile solution where they transform a Gaussian beam into a uniformly illuminated field using two computer-generated holographic elements. During the past two decades, several wavefront correction technologies were developed to match this low loss of energy and to provide also adaptive correction for evolving distortions introduced by propagation through turbulent media. Among these, the micro-electro-mechanical systems (MEMS) deformable mirrors (DM) [19] are now compact and robust device for beam shaping at least cost. In our study, we foresee to use two MEMS DMs.

In the fields of defense industry and free space communications, the beam propagation
through the atmosphere leads to strong amplitude distortions degrading the system perfor-
mance. During the last two decades, a significant amount of research was generated for these
applications to develop adaptive optics systems correcting for both amplitude and phase distor-
tions of a beam [20–24].

One of the first approach to tackle phase and amplitude correction simultaneously with two
DMs was proposed by Kanev *et al.* [13]. The first DM corrects for the amplitude and the second
<figure><img src="image_3.png" /><figcaption>Fig. 2. Schematics of 2-DM correcting systems. (a): Mono-static system with DM2 in the far-field of DM1 [20]. The FTM box represents a Fourier transforming mirror. (b): 2-DM correcting system in the near-field proposed in this paper. DM1 is located in the near field of DM2, at a distance z. The configuration is named *bistatic* for having different receiving and projecting apertures.</figcaption></figure>

one corrects for the phase. The concept has later been revised by Roggemann *et al.* [20, 25, 26] in a configuration where the second mirror is in the far-field of the first one. The scheme of such correction system is presented in Fig. 2(a), and it is referred to as *mono-static* because the receiving and projecting apertures are the same. The phase and amplitude corruption induced by the atmosphere in the optical path from the target above the aperture is supposed to be measured with a suitable device. It could be a SH sensor, from which outputs need to be processed to compute the received amplitude and the phase of the field in the aperture plane of the telescope. The measurements are analyzed to deduce the commands to be sent to the DMs in order to shape the laser beam to the conjugate of the received field, and project it. First, the laser collimated beam is supposed to fall upon DM1, where a phase shape $\phi_1$ is added to the wave. This applied phase aims at modifying the amplitude shape of the wave in the Fraunhofer region, after the Fourier transforming mirror, when the wave is incident on DM2. The second DM, DM2, is optically conjugated to the pupil plane of the beam projecting aperture, so it only modifies the phase distribution of the output beam. A novel modification of the latter approach to near-field correction has been proposed by Barchers *et al.* [21, 27–29] showing the potential interest of conjugating the first DM to a finite range where a turbulent layer could be present, instead of using a Fourier transforming mirror. This kind of dual-DM systems to precompensate atmospheric turbulence effects on beacon has been used during the last two decades in the
military and free-space communication fields.

In the adaptive optics systems for astronomy, only few studies tackled full optical field con-
jugation, because phase correction is by far more important than amplitude correction [30]. The
use of multiple DMs in AO for astronomy are common for phase correction only and in tomo-
graphic configurations, aiming to correct the phase over a wide field of view like GeMS [2].
Nevertheless, amplitude distortions or *scintillation*, being a source of loss of contrast in as-
trophysical imaging, Gonsalves suggested [31] to correct for amplitude distortions thanks to a
second DM. Again for higher contrast purposes, phase-induced amplitude apodization [32] is
an active area of research using aspheric mirrors for exo-planet imaging. And in the same field,
multiple DMs have recently be shown to provide polychromatic correction and allow to null
the intensity in High Strehl images [33, 34]. With respect to the lasers for astronomical AO, an
on-going project studies the potential benefit of only phase correction before projection to the
mesosphere [35, 36]. More recently another concept of laser beam cleanup with 2 DMs has been
presented [37] but again it targets only phase distortions since the second DM is conjugated to
the first one and is used only to increase the maximum spatial frequency of the correction and
the stroke of the overall system. To the knowledge of the authors, the present study of amplitude
and phase correction of the laser beam before projection for astronomical AO is new.

The 2DM-system proposed here for astronomical purposes uses a second DM conjugated to a finite range, z (see Fig. 2(b)). DM2 is in the near-field of the DM1 (i.e. in the Fresnel region), at a separation distance z of the order of 1 meter. DM2 remains conjugated to the pupil plane of the beam projecting aperture as in Fig. 2(a)). The near-field configuration should allow matching the space constraints of the laser systems on the telescope, although maintaining the ability to correct for amplitude and phase of the field.

The primary objective of the 2-DM concept is to provide correction of quasi-static amplitude and phase aberrations affecting the beam before its projection. The distortions of GeMS laser such as the ones presented in Fig. 1 have been observed to only evolve over a time scale of hours or days [38]. The developed solution focuses only on these quasi-static distortions but the choice of deformable mirrors would allow in a further extension of the study to tackle optimizations at shorter time scales. For instance, it may be used to finely tune the focus of the output beam when variations of the sodium layer height occurs. The DMs could also precompensate for the dynamical aberrations induced by the atmospheric turbulence in the propagation path of the laser above the launch telescope. This last extension is far from being straightforward however since the turbulence of interest is not directly measured. In astronomical laser-based systems, the configuration would usually be *bistatic* (cf. Fig. 2(b)), meaning that the laser launching telescope (left) is not the telescope measuring the atmospheric turbulence (right). For on-axis launching of the laser, the turbulence above the secondary mirror, *i.e.* behind the central obscuration of the laser-based AO system of the telescope, might be extrapolated for low-order modes corrected by the ground-conjugated DM of the AO. The atmospheric wavefront distortion would thus be known thanks to the adaptive optics of the telescope (represented by *AO sensing device* in Fig. 2(b)), for which the receiving aperture is the primary mirror and does not coincide with the launching telescope. Demonstration of such capability is yet unknown to the authors, so such dynamical extension of the correction is left for further research. In Fig. 2(b), the output of the AO sensing device is connected with a dashed arrow to the processing computer illustrating the fact that this option is not considered further in this paper.

The correction of quasi-static amplitude and phase distortions is based on a given desired
beam shape at the projection aperture, *U*<sub>1</sub>. The phase patterns to be applied to the DMs are
determined by a phase retrieval method [39] like in most of the amplitude-phase correction
systems mentioned before. The principle of the method is to iteratively estimate in two planes
the phase shapes which match the amplitude and phase constraints in other planes (e.g. image
plane, conjugated plane), as far as they are linked by a propagation relation. The first phase retrieval methods were developed by Gerchberg and Saxton [40], Gonsalves [41] and Fienup [42]. Fienup showed that these methods have the same local convergence properties around a fix point as the steepest descent and conjugated gradient algorithms [39]. The intensive research on optical field conjugation for laser defense applications led to eventually demonstrate [21] that algorithms for optical field conjugation, usually referred to as *Gerchberg-Saxton algorithms*, are applications of what is known as the method of sequential projections onto constraints sets [43]. The algorithm presented in Sect. 3 is a version of Gerchberg-Saxton method adapted to account for the near-field separation of the DMs and to unwrap the phases to be applied on DMs.

Last, to bring the 2DM correction concept to a practical implementation the method needs to provide phase estimates that can be efficiently reproduced by the mirrors. Non-segmented mirrors do not perform well when phase cuts are present [44]. Phase cuts can occur because the phase estimate is wrapped and because of branch points [45]. As shown later with simulations in Sect. 4, the estimated phases in our context are very likely to be wrapped and to generate branch points where the field amplitude vanishes in the aperture. To avoid phase cuts, we developed a regularized iterative unwrapper (see Sect. 3.3) to be applied to the phase estimates after every iteration of the phase-retrieval algorithm. The use of least squares and weighted least squares unwrappers have been reported in the literature related to beam shaping with DMs [29,44]. The least squares approach is not adapted to cases where the field intensity vanishes. A weighted least squares unwrapper allows to deal with degeneracies of the phase estimates where the intensity is zero, and thus avoid phase cuts. However, it is difficult to implement a weighted least squares unwrapper in practice because the weight based on the intensity distribution of the computed propagated field changes at every iteration of the phase retrieval algorithm. So the pseudo-inverse matrix required to apply the weighted least squares cannot be precomputed only once. To overcome these difficulties, a novel iterative unwrapper is detailed in Sect. 3.3. Its weighting can be easily updated on the fly with every new field estimate and no precomputation of pseudo-inverse matrix is required.

### 3. Algorithm for amplitude and phase correction

For the 2-DM design presented in Fig. 2(b), the following notations are used. The incident field on DM1 is the one coming out from the laser bench and is noted

$$U_l(\mathbf{x}) = u_l(\mathbf{x}) \exp(j\phi_l(\mathbf{x})), \qquad (3)$$

where $\mathbf{x}$ is the coordinate vector in the plane of DM1, and $u_l(\mathbf{x})$ and $\phi_l(\mathbf{x})$ account for the aberrated amplitude and phase in this plane respectively. The field leaving DM1 is noted $U_1$ and is expressed as

$$U_1(\mathbf{x}) = U_l(\mathbf{x}) m_1(\mathbf{x}) \exp(j\phi_1(\mathbf{x})), \qquad (4)$$

where $\phi_1$ is the phase pattern applied to DM1 and $m_1$ represents the reflection mask for the mirror, in order to account for the finite extension of the device.

The physics between DM1 and DM2 is modeled with the Fresnel integral as an approximation of the propagation. This free-space propagation of the electromagnetic wave $U_1$, at distance $z$, is described by the linear unitary transformation $T_z$ such that [27, 46]

$$U_z(\mathbf{x}') = T_z[U_1(\mathbf{x})] = \mathcal{F}^{-1}[\mathcal{F}(U_1) \exp(-j\pi\lambda z|\mathbf{f}_x|^2) \exp(j2\pi z/\lambda)], \qquad (5)$$

where $\mathbf{f}_x$ is the spatial frequency vector, $\lambda$ is the laser wavelength and $U_z$ is the incident field on DM2. After DM2 phase correction $\phi_2$, the output field is

$$U_2(\mathbf{x}') = U_z(\mathbf{x}') m_2(\mathbf{x}') \exp(j\phi_2(\mathbf{x})), \qquad (6)$$
where $m_2$ represents the mask of this mirror pupil. DM2 is conjugated to the projecting aperture such that $U_2$ is assumed to be the transmitted field.

In our context, the optical field desired to be transmitted by the launching aperture is assumed known, and we refer to it as the desired output field $U_t$, noted

$$U_t(\mathbf{x}') = u_t(\mathbf{x}') \exp(j\phi_t(\mathbf{x}')) \quad (7)$$

where $u_t$ is its amplitude and $\phi_t$ its phase. This desired output field is a constraint in the algorithm. Its choice is discussed in [7] and in the present paper we only consider it as being known and fixed.

In laser applications where strong scintillation is produced by the turbulence during the propagation above the launching aperture, the transmitted field $U_t$ needs to be the conjugate of the field which would be received in a mono-static configuration like in Fig. 2(a) [27]. In the astronomical context, the weak turbulence above the telescope leads to negligible amplitude distortions, such that the sensing device located after the receiving aperture in Fig. 2(b) is aimed at analyzing the phase distortions $\phi_b$ only.

Assuming $U_t$ and $U_l$ known, the goal of the 2DM concept is to determine $\phi_1$ and $\phi_2$ to be applied to DM1 and DM2 respectively in order to obtain the field $U_t$ on the projecting aperture [20]. For this, a phase retrieval method is used, iteratively providing estimates of $\phi_2$ and $\phi_1$ to satisfy the intensity constraints fixed by $U_l$ and $U_t$ respectively. The main steps of the algorithm, similar to the one described by Roggemann and Lee [20] are described in Sects. 3.1 and 3.2. In practice, the algorithm must also unwrap the phase estimates in order to guarantee efficient continuous-mirror correction. A specific iterative unwrapper is developed for this purpose in Sect. 3.3.

### 3.1. Forward iterative step for DM2

Given an initial estimate for $\phi_1$, the incoming field on DM2 is computed

$$U_z(\mathbf{x}') = T_z\{u_l(\mathbf{x})m_1(\mathbf{x})\exp[j(\phi_1(\mathbf{x}) + \phi_2(\mathbf{x}))]\} \quad (8)$$

Since we want the field after DM2 to be equal to the desired output $U_t$, the required phase to apply on DM2 $\phi_2$ is constrained to satisfy

$$\phi_2(\mathbf{x}') = -\arg [U_t^*(\mathbf{x}') U_z(\mathbf{x}') m_2(\mathbf{x}')] \quad (9)$$

Once the phase $\phi_2$ is obtained from Eq. (9), we compute an additional parameter $\alpha$, which is the ratio of the incident energy $E_2$ on DM2 over the energy $E_t$ of the desired output field $U_t$. This factor $\alpha$ is used later in Eq. (11) to rescale the field to be propagated backward in the iterative step for determination of $\phi_1$. The value of $\alpha$ is mathematically defined by

$$\alpha = \frac{E_2}{E_t} = \frac{\int \int |U_z(\mathbf{x}') m_2(\mathbf{x}')|^2 d\mathbf{x}'}{\int \int |U_t(\mathbf{x}') m_2(\mathbf{x}')|^2 d\mathbf{x}'}. \quad (10)$$

### 3.2. Backward iterative step for DM1

This second step estimates the phase $\phi_1$ to be applied to DM1 [20]. It is obtained by back propagation of the rescaled desired output field. The incident field on DM2 is thus

$$U_z(\mathbf{x}') = \sqrt{\alpha} U_t(\mathbf{x}') m_2(\mathbf{x}') \exp(-j\phi_2(\mathbf{x}')) \quad (11)$$

and the input field on DM1 can be written as

$$U_1(\mathbf{x}) = T_{-z}[U_z(\mathbf{x}')] = T_z^*[U_z^*(\mathbf{x}')] \quad (12)$$
The last equality is obtained by the property of the adjoint operator $T_z^*$ of $T_z$. Indeed, for any given complex field $U$, $T_z^*(U) = T_{-z}(U^*)$.

The estimation of phase $\phi_1$ is obtained applying the constraint that the phase and amplitude after backpropagation beyond DM1 matches the input laser field phase $\phi_l$ and amplitude $u_l$. Thus,

$$ \phi_1(\mathbf{x}) = \arg[U_l^*(\mathbf{x})m_1(\mathbf{x})U_1(\mathbf{x})]. \quad (13) $$

Equations (8)-(10) and Eqs. (11)-(13) represent the core of the 2-DM correction algorithm, being computed alternatively and iteratively, in order to obtain the best amplitude and phase outputs.

It is important to observe that the computation of Eqs. (9) and (13) leads to wrapped phase values. In addition, the field amplitude for which the argument must be obtained can be null or numerically very close to zero at some locations within the DMs aperture, which could lead to undesired branch points [45] appearing in the phase estimations of $\phi_1$ and $\phi_2$. In order to obtain phase functions $\phi_1$ and $\phi_2$ likely to be efficiently reproduced by the continuous sheet of a DM, the phases must be unwrapped and branch points must be avoided.

### 3.3. Phase unwrapping

In order to overcome these difficulties of wrapped phase and branch points, an iterative and regularized unwrapper estimator is presented. This unwrapper is modified from the weighted least squares unwrapper presented in [12], and is obtained by iteratively solving the linear system

$$ (\mathbf{G}^\mathrm{T}\mathbf{W}_g\mathbf{G} + \mu \mathbf{C}^\mathrm{T}\mathbf{C}) \hat{\phi} = \mathbf{G}^\mathrm{T}\mathbf{W}_g \mathcal{P}\mathcal{V}[\mathbf{G}\phi], \quad (14) $$

where $\mathbf{G}$ is the discrete representation of the gradient operator as described by Fried [45]. The $\mathcal{P}\mathcal{V}$ symbol stands for the principal-value operator which output is an angle that falls in the range $\pm\pi$ (modulus $2\pi$), $\mathbf{W}_g$ is a diagonal array of weights, $\mathbf{C}$ is a discrete representation of the curvature operator and $\mu$ is a scalar weighting the curvature regularization term $\mathbf{C}^\mathrm{T}\mathbf{C}$.

A wrapped phase has the gradient of its unwrapped phase plus or minus a multiple of $2\pi$. This is why the unwrapper in Eq. (14) involves the gradient operator on both sides of the equation and the principal value operator on the right hand side where the wrapped phase is. In addition, $\phi_2$ and $\phi_1$ are computed from Eqs. (9) and (13) only where the field amplitude $u$ in the argument is numerically non zero. This leads in both cases to wrapped phase maps $\phi$, and the wrapped phase samples are arbitrarily set to zero where the amplitude is also zero, i.e. where degeneracy occurs.

The matrix $\mathbf{W}_g$ is used as a diagonal weighting related to the level of confidence of the gradient value of the wrapped phase, i.e. accounting for the fact that the computed phase and gradients values do not represent the true values where the field amplitude reaches zero. The weighting is defined differently for gradient in $x$ and gradient in $y$, such that the component in $(i, j)$ associated to gradient along $x$ at location $(x_i, y_j)$, can be mathematically described as

$$ \mathbf{W}_{gx}(i, j) = \log(u(x_{i+1}, y_j)u(x_i, y_j) + \varepsilon) - \log(\varepsilon) \quad (15) $$

with $\varepsilon$ a small numerical value, e.g. $10^{-23}$, representing the threshold of the product $u(x_{i+1}, y_j)u(x_i, y_j)$ of two neighbour amplitude samples above which the associated gradient is considered with a strictly positive weight. This $\varepsilon$ is chosen as a negligible value compared to the average field amplitude over the aperture. This logarithmic scale has the benefit to spread the weighting values of $\mathbf{W}_g$ mainly in the range 1 to 10 where non negligible amplitude values have been obtained. The weight become significantly lower as soon as one field amplitude involved in the gradient computation is zero, revealing the proximity of a non-illuminated area. The weight is exactly zero where the gradient computation involves two field samples of null
amplitude. With such approach, the weighting matrix $W_g$ is updated on the fly, everytime the unwrapper is called with a new wrapped phase and amplitude field. This update is easily handled since there is no requirement to precompute a matrix inverse to apply the iterative unwrapper.

Another interesting feature of the unwrapper is the regularizing term $C^T C$ (in Eq. (14)), which favors solutions of $\hat{\phi}$ with low curvature. The relative importance of this penalty term can be tuned thanks to the scalar $\mu$ in Eq. (14). In practice, we have found that $\mu$ of the order of $10^{-3}$ is appropriate to influence the solution only in areas of negligible amplitude.

### 3.4. Convergence criteria

The convergence of the beam shaping iterative method is assessed thanks to two complementary criteria. The first one $\epsilon_{ampl}^2$ measures the relative distance between the currently achieved output amplitude shape and the desired one [20]. After $i$ iterations of the method,

$$ \epsilon_{ampl}^2(i) = \frac{\iint \left[ |U_t(\mathbf{x}')| - |U_2^{(i)}(\mathbf{x}')| \right]^2 d\mathbf{x}'}{\iint \left[ |U_t(\mathbf{x}')| - |U_2^{(0)}(\mathbf{x}')| \right]^2 d\mathbf{x}'} \quad (16) $$

where the notation $U_2^{(i)}$ stands for the achieved output field after DM2, when the $i$-th estimations of $\phi_1$ and $\phi_2$ are applied to DM1 and DM2 respectively. The scalar $\epsilon_{ampl}^2$ thus represents a relative amplitude error with respect to the initial amplitude error.

The second criterion is denoted as $S$ and it is sensitive to the phase matching between the reached output field and the desired output one. It is written

$$ S(i) = \frac{\left| \iint U_t^*(\mathbf{x}') U_2^{(i)}(\mathbf{x}') d\mathbf{x}' \right|^2}{\left| \iint U_t(\mathbf{x}') U_t^*(\mathbf{x}') d\mathbf{x}' \right| \left| \iint U_2^{(i)}(\mathbf{x}') U_2^{(i)*}(\mathbf{x}') d\mathbf{x}' \right|} \quad (17) $$

where index $(i)$ again refers to the $i$-th iteration of the procedure. This criterion is inspired from the far-field intensity criterion used in the literature [27, 47].

These two criteria are used in the simulations of Sect. 4 to enhance the convergence of the algorithm. They both evolve in the range $[0, 1]$. $\epsilon_{ampl}^2$ starts at 1 by definition and decreases toward 0 when the correction improves. On the contrary, $S$ is expected to increase with iterations toward unity.

## 4. Simulations

In this section, we present numerical simulations of the optical field conjugation method proposed in the previous section. In a first step, we check that the optimization of the amplitude and phase outputs is effective, following the algorithm presented in Sect. 3. Next, the influence on performance of system parameters is studied: the separation distance $z$ between the mirrors; the number of iterations; and the grid sampling step of the propagated fields and phase estimates.

### 4.1. Amplitude and phase correction

As a first step, we consider an arbitrary amplitude distortion of the incoming laser [12]. No phase aberrations are considered, but a particular output phase shape, a defocus, is specified. The laser wavelength is 589 nm and the distance between the DMs is chosen to be $z = 1.8$ m.

Without any beam shaping correction, i.e. $\phi_1 = \phi_2 = 0$, the input distortions lead to output amplitude very similar to the input one, slightly modified by the propagation in the near-field ($z = 1.8$ m). This output amplitude is represented in Fig. 3(a), over the 1 cm diameter of the
aperture of DM2. Cuts along *x* and *y* central axes are represented with solid curves in Fig. 3(b). It can be observed that the amplitude of the beam is far from being Gaussian.

The desired output amplitude is set to a Gaussian shape, represented by dotted slices along *x* and *y* central axes in Fig. 3(b). The desired output phase has been arbitrarily chosen to be a defocus (see dotted curve in Fig. 4(b)).

<figure><img src="image_4.png" /><figcaption>Fig. 3. Amplitudes of the output field at DM2, without correction ((a) and (b)) and with correction ((c) and (d)). Graphics (a) and (c) represent the 2D amplitude over the 1 cm aperture of DM2. Corresponding central cuts along *x* and *y* axis are presented as solid curves on the associated graphics on the right, (b) without correction and (d) with correction. The dotted curve in (b) stands for the Gaussian desired output amplitude. In (b) and (d), the vertical dashed lines stand for the diameter of DM2.</figcaption></figure>

After 400 iterations of the phase retrieval method presented in Sect. 3, the output amplitude and phase after DM2 almost perfectly match the desired ones. The two-dimensional representation of the output amplitude is shown in Fig. 3(c), and the one of the output phase in Fig. 4(a). The central slices along *x* and *y* are plotted with solid curves, in Fig. 3(d) for the amplitude and in Fig. 4(b) for the phase. The convergence of the algorithm along the 400 iterations is illustrated in Fig. 5. Both corrections of amplitude and phase work perfectly.

It is worth noting that output phase estimated in Fig. 4 differs from the desired phase shape near the aperture edges. This is due to the fact that the dotted curve represents a given phase function, the desired output. On the contrary, the solid curve represents an estimate of the resulting phase, computed from the simulation of the field propagation. Therefore, in the same
<figure><img src="image_5.png" /><figcaption>Fig. 4. Estimated phase of the output field after DM2 with correction. Graphics (a) represents the 2D phase as estimated over the 1 cm aperture of DM2. The central cuts along x and y axis are shown with solid curves in (b). The dotted curve in (b) stands for the cuts of the desired output phase (defocus), which coincides with the achieved output in areas of non-negligible amplitude (see (d) in Fig. 3). The vertical dashed lines in (b) delimit diameter of DM2.</figcaption></figure>

way as explained in Sect. 3.3 for $\phi_1$ and $\phi_2$ computations, the estimation of the resulting phase is initially wrapped and only at non zero amplitude locations. The field amplitude (shown in Fig. 3(c)) for radii greater than 4 mm is so small that the phase cannot be estimated with accuracy at these locations. The solid curve in Fig. 4 is thus the result of the iterative unwrapper applied to the output phase estimate. In the outer ring area, the regularization of the iterative phase unwrapper detailed in Sect. 3.3 mainly drives the estimation of the phase. However, whatever the phase estimate in this area, it has no effect on the beam shaping performance because the field amplitude is almost zero. Note also that the criterion $S$ in Fig. 5 is not notably affected by the phase discrepancy in this area because of the amplitude weighting in Eq. (17).

From Fig. 5, it can be concluded that the beam shaping has worked to perfection after 150 iterations. The correction of the output phase of the beam is almost instantaneous, as demonstrated by the value of $S$ already jumping to 85% after a single iteration. Amplitude correction drives the global convergence. The influence of the DMs separation distance on the convergence speed is further studied in Sect. 4.2.

In this first simulation, the grid sampling size of $\phi_1$ and $\phi_2$ is identical to the resolution $\delta$ of the introduced aberrations $U_l$ and of the desired output field $U_t$, with $\delta \approx 161$ µm. The desired output amplitude is a perfect Gaussian with FWHM of 1.7 mm, and the DMs pupils are considered to be 1 cm in diameter. The phase distortions $\phi_1$ and $\phi_2$ which should be applied on DM1 and DM2 in order to obtain such correction are presented in Fig. 6.

These smooth shapes are obtained thanks to the regularized unwrapper described in Sect. 3.3, applied to the wrapped phases computed from iterative procedures of Sects. 3.1 and 3.2.

The action of the phase unwrapper is illustrated in Fig. 7, where the central cuts along y for $\phi_1$ is shown in dotted line for the wrapped solution (between $-\pi$ and $\pi$) and in solid line once unwrapped. The limit of the mirrors pupil diameter are represented by the vertical dashed lines. Again it can be clearly seen that in the center of the slice (where the amplitude of the field is larger), the unwrapper accurately unwraps the phase estimates. On the pupil edges however, where the amplitude vanishes, the regularizing term of the unwrapper becomes significant and the unwrapped estimate is extrapolated, penalizing local curvature of the phase.
<figure><img src="image_6.png" /><figcaption>Fig. 5. Convergence of the criteria $\epsilon_{ampl}^2$ (solid) and $S$ (dashed) defined in Eqs. (16) and (17). The iteration counter in abscissae is presented in logarithmic scale from 1 to 400.</figcaption></figure>

<figure><img src="image_7.png" /><figcaption>Fig. 6. Phase corrections $\phi_1$ (left) and $\phi_2$ (right) to be applied to DM1 and DM2 respectively, after 400 iterations.</figcaption></figure>

## 4.2. Influence of DM separation

In this section, the influence of the separation distance between the 2 DMs is investigated. The idea of the near-field position of DM2 comes from possible space constraints on the telescope. The simulations presented in this section demonstrate that such near-field propagation is able to produce satisfactory amplitude corrections for the laser beam.

The simulated system is identical to the one presented in Sect. 4.1, but a flat output phase is sought, in order to focus the attention on the amplitude correction abilities. The final correction performance is evaluated in terms of the $M^2$ factor of the output beam. This criterion is applicable in this case because the desired output amplitude is a Gaussian shape. The results of the correction performance after 400 iterations are presented in Fig. 8.

The output $M_x^2$ and $M_y^2$ are shown in solid and dashed lines as a function of the separation distance $z$ between the DMs. The dotted horizontal lines stand for the $M_x^2$ and $M_y^2$ values when no beam shaping correction system exists. These values are computed assuming that the output beam is $U_l$. When the beam shaping system is considered, the $M^2$ factor is computed after the DM2, which means that even if no DM correction is applied, the output beam is slightly
<figure><img src="image_8.png" /><figcaption>Fig. 7. Central cut along y for the final wrapped (dotted curve) and unwrapped (solid curve) $\phi_1$ estimate shown in Fig. 6. The horizontal dots represent the $]-\pi; \pi]$ interval of the wrapped phase estimation. The vertical dashed lines stand for the diameter of DM2.</figcaption></figure>

affected in the near-field. Note that for $z \le 1$ m, $M_y^2$ factor achieved after 400 iterations is worse than when no correction is applied. This highlights the difficult amplitude correction at short DMs separation. For distances greater than 2 m, it can be observed that the beam correction is very efficient, with resulting $M^2$ factor values as low as 1.02. Such values mean very good quality Gaussian beams.

<figure><img src="image_9.png" /><figcaption>Fig. 8. Impact of the separation distance between the DMs on the $M^2$ factor of the output laser beam after 400 iterations. Solid line: $M_x^2$. Dashed line: $M_y^2$. $M_x^2$ and $M_y^2$ of the input laser beam are represented by the horizontal dotted lines ($M_x^2$: top; $M_y^2$: bottom).</figcaption></figure>

In addition to the evolution of the correction quality with the DMs separation $z$, its influence on the convergence speed is also studied. In Fig. 9 (left), the relative amplitude error of the output beam $\epsilon_{ampl}^2$ is represented as a function of the iteration number. The slowest convergence is obtained for the shortest distance $z = 1$ m, where convergence is reached after more than 350 iterations. The convergence is accelerated progressively when the separation $z$ is increased. For $z = 5$ m, less than 20 iterations suffice.

The convergence acceleration is due to the fact that a phase deformation of minor amplitude is required when the separation distance $z$ increases. This is illustrated on the right of Fig. 9, where the highest curve is the phase deformation $\phi_1$ required for separation $z = 1$ m. The
<figure><img src="image_10.png" /><figcaption>Fig. 9. **Left:** Evolution of $\epsilon_{ampl}^2$ along with the iterations, for various DMs separations $z = 1, 1.5, 2, 3, 4$ and $5$ meters. The slowest convergence is for $z = 1$ m. **Right:** Central cut along $y$ of the final $\phi_1$ deformation to be applied for the same DMs separations $z = 1, 1.5, 2, 3, 4$ and $5$ meters. The largest phase amplitude is required for $z = 1$ m and the smallest for $z = 5$ m.</figcaption></figure>

required deformation is reduced by approximately a factor equal to $p$ when the separation is changed from $z = 1$ m to $z = p$, with $p$ in the range of 1 to 5 meters. It is thus an important parameter to take into account in the design of the beam shaping system, depending on the mechanical properties of the DMs to be used.

### 4.3. Influence of number of degrees of freedom

In practice, expensive costs of the DMs with large number of actuators may force to consider the application of phase deformations with a lower spatial resolution than the one considered in Sects. 4.1 and 4.2. So a study of the impact of the phase grid sampling for the estimates $\phi_1$ and $\phi_2$ on the performance of the beam shaping is required. We specify this constraint in terms of the number of estimated phase samples across the DMs diameter, $n$, such that a DM with $\sim 3/4n^2$ degrees of freedom over the pupil area is expected to be able to reproduce it satisfactorily.

We choose the laser amplitude distortions $u_l$ as the ones measured from GeMS in April and October 2013 (Fig. 1). Again, we do not consider any phase aberrations $\phi_l$ for the input. The simulation grid sampling has been chosen equal to the resolution of the laser wavefront sensor measurement at GeMS (Fig. 1), i.e. $\delta = 198$ µm. The DMs aperture diameter is assumed to be 4.9 mm. The desired output amplitude is set to a perfect Gaussian with FWHM of 1.7 mm and a flat output phase.

The correction performance assessed by $\epsilon_{ampl}^2$ as a function of $z$ is represented in the plots of Fig. 10 for various values of $n$. Input amplitude distortions measured in April 2013 are used for the plot on the left and the ones measured in October 2013 are used on the right plot. With a large number of degrees of freedom for the correction, it is possible to reduce the error to a few percentage points of its original value placing the DMs at short distances ($z$ below 1 m). At such short separations, the error reduction significantly degrades when the number of phase samples $n$ across the pupil is too small.

If the mirrors have only 11 actuators across the aperture for instance, the remaining error is about 10% of its original value, and it requires greater separation distance $z$, i.e. beyond 1.2 m. Note that the distortions measured in October 2013 appear more difficult to correct than the
ones observed in April 2013. For separations *z* beyond 2 meters, there is no remarkable benefit in using 31 × 31 phase samples compared to using 11 × 11.

<figure><img src="image_11.png" /><figcaption>Fig. 10. $\epsilon_{ampl}^2$ after 400 iterations as a function of the separation *z* between DMs, and for different number of samples *n* across the pupil diameter. Amplitude distortions of input are taken from available measurements on GeMS laser in April 2013 (left) and October 2013 (right). No phase distortions are assumed at input.</figcaption></figure>

<figure><img src="image_12.png" /><figcaption>Fig. 11. Same as in Fig. 10 but the error is presented as an absolute value, not relatively to $\epsilon_{ampl}^2(0)$. The dashed lines represent $\epsilon_{ampl}^2(0)$ as a function of $z$.</figcaption></figure>

It is worth noting that a minimum for the relative error exists within the DM separation range studied. For instance, if *n* = 31, the relative error $\epsilon_{ampl}^2$ with *z* = 2 m, is degraded by about 10 percentage points compared to the achieved error with *z* = 80 cm. However, this is mainly due to the normalization value in the denominator of $\epsilon_{ampl}^2$ (Eq. (16)), which decreases with *z*. In order to clarify this, the same simulations results are presented in Fig. 11 but showing the amplitude error $\epsilon_{ampl}^2$ before its normalization by the error without correction in Eq. (16). The amplitude error without any beam shaping correction (dashed line) progressively decreases with increasing separation distance *z* between the DMs. This effect simply results from the propagation of the beam in the near-field. This absolute representation reveals that good correction quality is obtained if *z* is greater than 1.4 m for all three cases (*n* = 11, 17 and 31). If *n* is greater than 11, shorter separations *z* can be chosen for approximately the same good correction quality.
4.4. Benefit of correcting GeMS amplitude and phase distortions

According to the results of Sects. 4.2 and 4.3, we are now interested in quantifying how much the 2-DM correction system could reduce the size of the laser spot image. For this, the measurements made at GeMS in April and October 2013 are considered with both their amplitude and wavefront aberrations. The quality of the correction is evaluated by simulating the uplink propagation of the resulting beam at the launching aperture to the sodium layer as mentioned in Sect. 1. The spot size at 90 km and its intensity are compared to the ones evaluated without correction. The reduction of the laser spot size at the sodium layer because of the correction is represented as an equivalent increase of the number of photons (in Eq. (1)) for a given AO noise level. These factors of increase are shown in Fig. 12 as a function of the simulated atmospheric seeing. Left graph stands for the aberrations measured in April 2013, and right graph is for the ones of October 2013. The reduction of the spot size, in terms of photons increase, produced by a perfect Gaussian beam is also plotted.

<figure><img src="image_13.png" /><figcaption>Fig. 12. Equivalent increase of photons corresponding to the laser spot size reduction when launching (i) a Gaussian beam, (ii) the beam corrected with 17 × 17 devices separated by 80 cm and (iii) the beam corrected with 11 × 11 devices separated by 1.4 m. The reference laser spot size is the one produced by the laser aberrations measured at GeMS: **Left:** aberrations of April 2013. **Right:** aberrations of October 2013.</figcaption></figure>

First, one observes that the reduction of the spot size is more significant in good seeing conditions. The laser beam aberrations thus degrade the AO performance more severely when the turbulence conditions are good.

Second, because the 2-DM correction does not lead to a perfect Gaussian beam the three curves are not superimposed with the upper one (Gaussian). Still, with a correction system using 11 × 11 mirrors, the equivalent increase of photons is in the range 20 to 40%. A higher-order correction with 17 actuators across the aperture improves the photons increase to the range of 25 to 45%. Obviously the correction of GeMS laser aberrations will not allow to double the AO frame rate (which would require an equivalent increase by 100%), but still for median seeing of observing conditions for GeMS an increase of the number of photons by 20 to 35% would already be achievable. In the most favorable conditions for a correction with 11 actuators across the diameter, the frame rate could even be increased by a factor 1.4, which could mean a jump from 350 Hz to almost 500 Hz.
## 5. Conclusion

A two-deformable-mirror concept is developed to optimize the beam shape of the laser used as beacons for adaptive optics in astronomy. The optimization system aims at correcting quasi-static beam distortions in amplitude and phase thanks to a phase retrieval technique. Near-field algorithms previously developed in the literature for defense and space communications applications are adapted to the projection of lasers in the astronomical context. In particular, an iterative and regularized unwrapping method is developed to deduce commands for the mirrors. The method is computationally efficient and robust to handle any input amplitude distortions and any desired output amplitude, thanks to its iterative feature and on-the-fly update of the weighting matrix used for the unwrapping.

Preliminary simulations are presented to illustrate the effective amplitude and phase correction achieved by the method. This correction reduces the laser spot size thus improving the AO measurement accuracy. The convergence is shown to be accelerated when the separation distance between the 2 DMs increases. Regarding the number of degrees of freedom required for the mirrors, a reasonable order of 11 actuators across the aperture is shown to provide good beam shaping correction when applied to cases of amplitude and phase distortions measured at GeMS during 2013. Additional degrees of freedom on the deformable mirrors would improve the correction quality. Since the algorithm converges in a few seconds, it can definitely be applied to the the quasi-static aberrations observed at GeMS, which evolve at the time-scale of hours or days.

The simulated cases highlight the fact that for reduced number of degrees of freedom the considered examples of distortions are better corrected with DMs separations greater than 1.4 meter approximately. The simulation of uplink propagation toward the sodium layer show that the correction of aberrations measured on GeMS laser will not allow to double the AO frequency. Still in median seeing conditions for GeMS observations a 2-DM correction system with 11 actuators across the aperture may allow a reduction of the spot size by 10 to 15% compared to the spot generated by the laser beam with aberrations. For a given AO noise level, this is equivalent to an increase of the number of received photons by up to 40%. Space constraints within the telescope and costs of DMs will drive the trade-off between DM separation and number of degrees of freedom when designing the prototype to be tested on GeMS.

Finally, the measured quasi-static aberrations of the laser shown in this paper are the ones observed after alignment and manual optimization procedures on GeMS laser beam. This corresponds to a time-consuming process usually involving 1 or 2 laser engineers for at least 1 week before every run of GeMS. The presented 2-DM correction can relax the need for such complex alignment optimizations. Actually the laser optimization procedure at GeMS includes a trade-off between beam quality and laser power. So relaxing in a first step the pressure on laser beam quality could lead to improved laser power [38].

## Acknowledgments

This work was supported by the Chilean Research Council (CONICYT) through grant Fondecyt 1120626. Benoit Neichel acknowledges the French ANR program WASABI - ANR-13-PDOC-0006-01. Particular thoughts and acknowledgement go to our co-author Vincent Fesquet who recently passed away.