Context. The pyramid wavefront sensor (PyWFS) provides the required sensitivity for demanding future adaptive optics (AO) instruments. However, the PyWFS is highly nonlinear and requires the use of beam modulation to successfully close an AO loop under varying atmospheric turbulence conditions. This comes at the expense of a loss in sensitivity. Aims. We trained, analyzed, and compared the use of deep neural networks (NNs) as nonlinear estimators for the nonmodulated PyWFS, identifying the most suitable NN architecture for a reliable closed-loop AO. Methods. We developed a novel training strategy for NNs that seeks to accommodate for changes in residual statistics between open and closed loops, plus the addition of noise for robustness purposes. Through simulations, we tested and compared several deep NNs from classical to new convolutional neural networks (CNNs), plus the most recent transformer neural network (TNN; global context visual transformer, GCViT), first for an open loop and then for a closed loop. By identifying and properly retraining the most adequate deep neural net, we tested its simulated performance first in an open loop and then for closing an AO loop at a variety of noise and turbulence conditions. We finally tested the trained NN ability to close a real AO loop for an optical bench. Results. Using open-loop simulated data, we observe that a TNN (GCViT) largely surpasses any CNN in estimation accuracy in a wide range of turbulence conditions. Moreover, the TNN performs better in a simulated closed loop than CNNs, avoiding estimation issues at the pupil borders. When closing the loop at strong turbulence and low noise, the TNN using nonmodulated PyWFS data is able to close the loop, similar to a PyWFS with 12λ/D of modulation. When the noise is increased, only the TNN is able to close the loop, while the standard linear reconstructor fails even when a modulation is introduced. Using the GCViT, we closed a real AO loop in the optical bench and achieved a Strehl ratio between 0.28 and 0.77 for turbulence conditions corresponding to Fried parameters ranging from 6 to 20 cm, respectively. Conclusions. Through a variety of simulated and experimental results, we demonstrate that a TNN is the most suitable architecture for extending the dynamic range without sacrificing sensitivity for a nonmodulated PyWFS. It opens the path for using nonmodulated Pyramid WFSs in an unprecedented range of atmospheric and noise conditions.
Read full abstract