\documentclass{mem}
\usepackage{natbib}\usepackage{txfonts}\usepackage{balance}
\usepackage{graphicx}
\usepackage[a4paper]{hyperref}
\idline{75}{282}
\begin{document}
\def\teff{$T\rm_{eff }$}
\def\kms{$\mathrm {km s}^{-1}$}

\title{
Modelling the multi-conjugate adaptive optics system of the European Extremely Large Telescope
}

   \subtitle{}

\author{
L. \,Schreiber\inst{1},
C. \,Arcidiacono\inst{1},
G. \,Bregoli\inst{1},
E. \,Diolaiti\inst{1},
R. C. \,Butler\inst{2},
I. \,Foppiani\inst{1},
M. \,Lombini\inst{1},
M. \,Patti\inst{1,3}
\and P. \,Ciliegi\inst{1}
          }

  \offprints{L. Schreiber}
 

\institute{
Istituto Nazionale di Astrofisica --
Osservatorio Astronomico di Bologna, Via Ranzani 1,
I-40127 Bologna, Italy
\email{laura.schreibe@oabo.inaf.it}
\and
Istituto Nazionale di Astrofisica --
Istituto di Astrofisica Spaziale e Fisica Cosmica, via Gobetti 101, 
I-40129 Bologna, Italy
\and
Alma Mater Studiorum Università di Bologna --
Dipartimento di Fisica e Astronomia, via Ranzani 1, 
I-40127 Bologna, Italy
}

\authorrunning{Schreiber}


\titlerunning{Modelling MCAO for the E-ELT}


\abstract{
MAORY is the Multi-Conjugate Adaptive Optics Module for the E-ELT. The baseline design assumes six sodium Laser Guide Stars and three Natural Guide Stars for wavefront sensing. 
Three deformable mirrors, including the telescope adaptive mirror M4, are optically conjugated to different altitudes in the atmosphere to achieve compensation of the atmospheric turbulence effects over an extended Field of View.
In preparation for the project phase-B we are analyzing different critical aspects of such a system. We are developing a versatile and modular end-to-end simulation code that makes use of GPUs to obtain high-fidelity modelling of the system performance and, in parallel, a semplified code for the analysis of the effects induced by the temporal variation of the sodium layer where the artificial laser guide stars are generated. An overview of the work in progress will be given.
\keywords{Telescopes -- Instrumentation: adaptive optics}
}
\maketitle{}

\section{Introduction}

Single Conjugate Adaptive Optics (SCAO) is based on the correction of the total effect of the atmospheric turbulence, operated by a single deformable mirror (DM), and measured in the direction of a bright reference star.
The correction in the direction of the science target gets worse increasing the angular distance between the science target and the reference source. This translates into a deformation of the PSF across the corrected Field of View (FoV) that depends on the distance from the guide star. So the main limitations are the dimension of the corrected FoV, crucial for some science target, and the lack of suitable reference sources in the desired region of the sky (low sky coverage). Multiple Conjugate Adaptive Optics (MCAO) uses multiple reference stars for a 3D turbulence measurement and multiple DMs, conjugated to different altitudes where the turbulence is stronger, in order to enlarge the corrected FoV and to ensure the PSF stability across it. Using artificially generated Laser Sources it is possible to overcome the low sky coverage problem \citep{1985A&A...152L..29F}, assuring theoretically the access to the whole sky. The so called 'cone effect', that refers to the fact that the portion of atmosphere crossed by the laser light is conic instead of being cylindrical, is nicely solved by using multiple Laser Guide Stars (LGS) \citep{1998A&AS..128..617R}. 
But MCAO systems based on Sodium LGS need anyway Natural Guide Stars (NGS) to solve intrinsic limitations of artificial beacons, such as tilt indetermination and tilt anisoplanatism \citep{ellerbroek2001}. 
%MAORY\citep{diolaiti2010} is the future Multi-Conjugate Adaptive Optics module for the European Extremely Large Telescope (E-ELT) \citep{gilmozzi2008} first light (cita papero MAORY) \citep{ramsay2014}.
NGSs are also required to mitigate the impact of the sodium layer structure and variability: on a 40-meter class telescope, as a consequence of the perspective elongation effect and of the finite LGS Wavefront Sensor FoV, spurious wavefront aberrations are generated \citep{2012SPIE.8447E..1KD}. 
The sodium layer may also have transverse structures leading to significant differential effects among LGSs \citep{2012SPIE.8447E..19P}.

All these issues show up in MAORY \citep{diolaiti2010}, the future Multi-Conjugate Adaptive Optics module for the European Extremely Large Telescope (E-ELT) \citep{gilmozzi2008} first light  \citep{ramsay2014}.
The baseline is to operate wavefront sensing by  means of a constellation of 6 LGSs and 3 NGSs.
The wavefront correction is operated by M4/M5, that are part of the telescope, and by 2 post focal DMs conjugated respectively to 5 and 12.7 km.
Both MCAO and SCAO modes are foreseen.

\section{MAORY wavefront sensing}

MAORY will use 6 Shack-Hartmann (SH) Wavefront Sensors (WFS) with $80 \times 80$ sub-apertures, each measuring the WF slopes with a frequency of 500 Hz. The foreseen detectors are the NGSD CMOS $880 \times 840$ pixels \citep{downing2014}, that translates in about 10 pixels per sub-apertures.  
% If we consider a pixel scale of about 1$\arcsec$/px and that a sodium layer thickness of 10 km at 90 km altitude corresponds to about 10$\arcsec$ elongation at a distance of 40 meters, it is clear that the effects of spot truncation on the system performance need to be studied.
 At the end of the phase A the light of the NGS channel was split in two channels: the infrared part for the fast Tip-Tilt, Focus and Astigmatisms (TTFA) estimation and the visible part for the so-called 'Reference' WFS, dedicated to the medium-low order modes measurement (up to about 40 modes), and to the non-common path aberrations calibration.
The sky coverage is ensured by taking advantage from the AO correction in the infrared, that squeezes the PSF of the reference stars on the fast NGS WFS detectors. The visible channel should be enough slow ($\approx$ 1 - 0.1 Hz) to not dramatically affect the sky coverage.
The NGS WFS design is responsibility of the Observatory of Arcetri \citep{esposito2015}.

\section{The simulation code}

A simulation code is a necessary tool to design complex systems and to assure the fulfillment of the scientific requirements.
MAO \citep{arcidiacono2014} is an end-to-end monte-carlo code to simulate MAORY and AO systems in general.
It is composed by single modules that can be seen as independent processes that transform the input parameters in output products, that are stored as fits files.
MAORY is a very complex system, and the simulation of it can be really time consuming, especially the simulation of the LGS WFSs that takes the majority of the computation time. For this reason the use of the GPU technology is mandatory.
%The code has been designed to be 'embarrassingly' parallel, that means that different independent processes can run on different CPUs/GPUs at the same time. 
%Our workstation is made by 2 6 cores Processors Intel Xeon E5-2630 v2, 2.6 Ghz and 4 GPUs Nvidia TESLA K20X of 6 GB. The data are stored on 4 Hard Disks with a capacity of 2 TB each.
The code is developed for a dedicated server with two 6-core processors, 256 GB RAM and 4 Graphical Processing Unit (GPU) processors. Massive parallelization has been adopted whenever possible.
The main architecture is written in IDL, that may call parallel optimized C/C++ and CUDA libraries on IDL (in particular for the LGS WFSs simulation and for the PFSs computation).
The code is easily adaptable and can simulate a lot of AO configurations, giving us the possibility to explore the full space of parameters.
The number and type of wavefront sensors and of DMs is arbitrary. The reference sources can be either natural or Lasers, with also the possibility to vary the sodium density profile for each simulation step and from one star to another.
Also a fast and less accurate mode has been implemented (see Section \ref{fast mode}). When the fast mode is set, the time consuming simulation of the WFSs is skipped, to give us the possibility to simulate long time series in order to study effects slowly, but continuously, varying in time (like the sodium profile variations).    

\section{The modules} 

%
\begin{figure}[t!]
\begin{center}
{\includegraphics[scale=0.43]{moduli.eps}}
\caption{\footnotesize
The MAO main modules and their interactions.
}
\label{moduli}
\end{center}
\end{figure}
%
 
A scheme of the independent modules is represented in Fig. \ref{moduli}.
The input parameters are used to build IDL data structures that feed the single modules. In this way, what does not need to run strictly in closed loop, is computed and stored separately. %(that consist of one or more tag-value pairs, where the value associated with a given tag can be of any data type)
Some of the modules, like the atmospheric layer generation, are totally independent of the simulated instrument and, once stored, can be used to generate the wavefronts. 
The colored boxes of Fig.\ref{moduli} highlight the dependency between the modules. 
In the first block (green color) the atmospheric layers and the wavefronts for each simulation step are generated in open loop and stored. The cone effect and the laser up-link propagation are taken into account. The phase screens are computed from the phase (Kolmogorov or Von Karman) Power Spectrum. It is also possible to add to the open loops the E-ELT wavefronts perturbations residuals and, when running the fast mode, the low order modes due to laser spot truncation (see Section \ref{fast mode}). Non-common path aberrations can be added to the NGSs open loops.
In the second block (blue color) the control matrix is computed. The control matrix is the pseudo-inverse of the interaction matrix. The influence functions can be provided as an input file by the user, or can be computed analytically.
In the red box, the closed loop takes place. Fig \ref{loop} represents a possible MAORY closed loop scheme.
The incoming wavefronts, or open loops, are first subtracted for the actual Deformable Mirrors (DM) shapes.
The residual wavefronts are stored for the PSF computation and then measured from the wavefront sensors.
Residual slopes are computed in the 3 channels (fast LGS, fast TTFA, slow Reference) and offloaded to the control system at different rates.
The RTC combines the slopes in a proper way and sends the commands to the DMs.
In the last module, the PSFs are computed at the user desired
wavelength.

%
\begin{figure*}[t!]
\begin{center}
{\includegraphics[scale=0.6]{figura1.eps}}
\caption{\footnotesize
An example of the MAORY Closed Loop block diagram
}
\label{loop}
\end{center}
\end{figure*}
%
 

\subsection{The LGS simulations}\label{LGS simu}

The LGS SH WFSs are simulated in order to accurately reproduce the projected LGS image in each sub-aperture. 
It is foreseen the possibility to divide the sodium layer in an arbitrary number of sub-layers, in order to take into account for different wavefronts related to different sodium layer slices. \\
In the following we describe the steps through which each SH sub-aperture is simulated:\\
For each sodium sub-layer
\begin{itemize}
\item The Diffraction Limited PSF is computed through sub-WF FFT  
\item Then the PFS is convolved for the relative sodium profile portion projected in the sub-aperture. The projected profile is computed in open loop considering the sub-aperture position with respect to the laser launcher and the portion of the profile seen by each WFS pixel
\item The result is added to the result of the previous step
\end{itemize}
Then the sub-aperture image is convolved for the intrinsic laser image, resized to the final sub-aperture FoV and rebinned to the final pixel scale
The sub-aperture image is written into the total SH WFS image 
%\end{itemize}
Finally the photon and readout noise are added.
The sodium profile can be changed from one simulation step to the next and from one star to another.
For the SH WFS optimization, different algorithms for centroid computation have been implemented.
Also the pupil can be updated in order to study effects of misregistration.

\section{Fast mode}\label{fast mode}
As mentioned in Section \ref{LGS simu}, for each star the image of the LGS has to be created in each of the illuminated sub-apertures for each simulation step. 
Each of the 4 GPUs can simulate up to 2 LGS SH WFSs. Even running the GPUs in parallel, when simulating an E-ELT MCAO system with 6 LGSsì SH WFS (that count about 5000 sub-apertures each), the total computation time per simulation step is about 8 seconds.
It is then possible to run the code in fast and less accurate mode, skipping the WFSs simulation.
The wavefront sensors are replaced by the x and y derivative computation of the wavefronts.
The slopes are then polluted with measurement noise in each sub-aperture, computed thought either analytical formulas or empirically.
Finally the low order modes due to laser spot truncation are computed on a side and added to the open loops \citep{schreiber2014}.

 
\begin{acknowledgements}
This work has been partly supported by the Italian Ministero dell'Istruzione, dellUniversit`a e della Ricerca
(Progetto Premiale E-ELT 2012 ref. Monica Tosi).
\end{acknowledgements}

\bibliographystyle{aa}
\begin{thebibliography}{}

\bibitem[Arcidiacono et al.(2014)]{arcidiacono2014} Arcidiacono, C., 
Schreiber, L., Bregoli, G., et al.\ 2014, \procspie, 9148, 91486F 
%
\bibitem[{Diolaiti et al. (2010)}]{diolaiti2010} 
Diolaiti, E.,  et al. 2010, Proc. SPIE, 7736, 77360R
%
\bibitem[Diolaiti et al.(2012)]{2012SPIE.8447E..1KD} Diolaiti, E., 
Schreiber, L., Foppiani, I., \& Lombini, M.\ 2012, \procspie, 8447, 84471K 
%
\bibitem[Downing et al.(2014)]{downing2014} Downing, M., Kolb, J., 
Balard, P., et al.\ 2014, \procspie, 9154, 91540Q 
%
\bibitem[Ellerbroek \& Rigaut (2001)]{ellerbroek2001} Ellerbroek, B.~\& 
Rigaut F.,\ 2001, JOSA A, 18(10), 2539-2547
%
\bibitem[Esposito et al.(2015)]{esposito2015} Esposito, S. et al.
\ 2015, this Conference
%
\bibitem[Foy 
\& Labeyrie(1985)]{1985A&A...152L..29F} Foy, R., \& Labeyrie, A.\ 1985, \aap, 152, L29 
%

\bibitem[Gilmozzi \& Spyromilio (2008)]{gilmozzi2008} Gilmozzi, R.~\& 
Spyromilio J.,\ 2008, Proc. SPIE, 7012, 701219
%
\bibitem[Pfrommer 
\& Hickson(2012)]{2012SPIE.8447E..19P} Pfrommer, T., \& Hickson, P.\ 2012, \procspie, 8447, 844719 
%
\bibitem[Ragazzoni et 
al.(1998)]{1998A&AS..128..617R} Ragazzoni, R., Esposito, S., \& Riccardi, A.\ 1998, \aaps, 128, 617 
% 
\bibitem[Ramsay et al.(2014)]{ramsay2014} Ramsay, S.~K., Casali, 
M.~M., Gonz{\'a}lez, J.~C., \& Hubin, N.\ 2014, \procspie, 9147, 91471Z 
%
\bibitem[Schreiber et al.(2014)]{schreiber2014} Schreiber, L., 
Diolaiti, E., Arcidiacono, C., et al.\ 2014, \procspie, 9148, 91486Q %
%



\end{thebibliography}


\end{document}

