Desktop-based Simulation of Adaptive Optics Systemsfor Astronomical Applications
Mikhail V. Konnik and James WelshFaculty of Engineering and Built Environment, The University of Newcastle, Australia
SUMMARY
Adaptive optics systems are highly complicated networks of devices that makes an analytical study of such systems difficult. Hence numerical simulations are crucial in providing a quantitative evaluation of capabilities of adaptive optics systems. The proposed AORTA(Adaptive Optics Real Time Analyser) simulator is written on MATLAB-compatible programming language and contains routines for simulation of atmospheric turbulence, wind profiles, Fresnel/Fraunhofer light propagation, model of Shack-Hartmann wavefront sensor,and zonal wavefront reconstruction. The aim of the project is to develop a complete adaptive optics simulator and investigate the controller design based on optimal control methods and Kalman filter. The mathematical description of the simulator’s components isprovided. The results of simulation of light propagation through turbulent atmosphere are presented.
MOTIVATION
The proposed AORTA simulator is written on GNU/Octave open-source language thatis a free alternative to MATLAB. AORTA simulator contains routines for complete sim-ulation of light propagation through turbulent atmosphere, wavefront registration andreconstruction. This is necessary for design a optimal controller with Kalman filter.Such simulator allows to study an influence of noise from different sources on the per-formance of the whole adaptive optics system. The aim of this project is to developa complete adaptive optics simulator and investigate the controller design based onoptimal control methods and Kalman filter.
BENCHMARKS OF AORTA SIMULATOR
The GNU/Octave language was chosen rather than MATLAB because of speed:GNU/Octave is faster than MATLAB on FFT operations that are used extensively insimulations of light propagation through the atmosphere.
10-5
10-4
10-3
10-2
10-1
100
101
102
100
101
102
103
104
Media
n c
om
puta
tional tim
e, [s
econds]
The size of the matrix, NxN
MATLAB v7, LinuxGNU/Octave v3, Linux
107
108
109
1010
100
101
102
103
104
Mean c
om
puta
tional tim
e, [b
yte
s]
The size of the matrix, NxN
MATLABGNU/Octave
Figure 1: Benchmarks of Octave and MATLAB: (top) computation time versus matrix size for FFT,(bottom) memory consumption on FFT operations versus matrix size.
According to our benchmarks (see Fig. 1), on typical size of matrices in adaptive opticssimulations (thousands by thousands of elements) Octave is almost 3 times fasterthan MATLAB in FFT operations. However, Octave uses more memory than MATLAB.For small matrices (less than 1024 × 1024) it can be 2.5-3 times more memory, andfor large matrices (2048 × 2048 and more) that is typically 10-20%. Thus, althoughOctave is faster than MATLAB on FFT, Octave consumes more memory than MATLABwhile performing FFT and thus may run out of memory on large matrices. However,the speed of calculations is more important for such type of simulators.
ATMOSPHERE TURBULENCE
The statistics of refractive index inhomogeneities follows that of temperature inhomo-geneities and can be described by the Kolmogorov-Obukhov law of turbulence. Thespatial density of turbulent fluctuations Φ(k) are described by Kolmogorov’s spectrumcalled sometimes “two-thirds law”:
Φ(k)dk ∼ V 2 ∼ k−2/3 (1)
From the results of simulations (see Fig. 2) it is evident that there are two groupsof models: Kolmogorov-alike and von Karman-alike. The main difference is the be-haviour at the hight spatial frequencies: more accurate models tend to attenuate thehigh-frequency oscillations. From the analysis of Fig. 2 it is clear that for very smallstructures within the atmosphere, the Kolmogorov-alike spectrum models significantlyoverestimate power spectrum.
10-40
10-35
10-30
10-25
10-20
10-15
10-10
10-5
100
105
1010
1015
10-2
10-1
100
101
102
103
104
Atm
osphere
pow
er
spectr
um
Spatial frequency, κ [rad/m]
Hill modelTatarskii model
Kolmogorov model Modified von Karman
von Karman
Figure 2: Comparison of the power spectrum models.
Models derived from von Karman model describe small turbulence structures moreadequately. The simulation of layered atmosphere using von Karman power spectrumdensity model is shown on Figure 3. From the results of simulations it was concludedto use modified von Karman model as more consistent with experimental data.
Figure 3: Simulation of layered atmosphere using von Karman model.
MONTE-CARLO SIMULATIONS
The variation of the refractive index in the atmosphere is a random process. Henceturbulence models give statistical averages of the structure function and power spec-trum of refractive index. The phase fluctuations may be presented as a weighted sumof basis functions such as Zernike polynomials or Fourier series coefficients. Themethod based on Fourier series is commonly used and produces adequate results.In the AORTA simulator, phase fluctuations φ(x, y) were assumed as Fourier-transformable functions:
φ(x, y) =
+∞∫
−∞
+∞∫
−∞
Φ(fx, fy) exp[i2π(fx · x + fy · y)]dfxdfy (2)
where Φ(fx, fy) is the spatial-frequency-domain representation of the phase.To generate phase screens on a finite grid, the phase φ(x, y) can be described interms of Fourier series:
φ(x, y) =
N/2∑
n=−N/2
N/2∑
m=−N/2
cn,m exp[i2π(fxn · x + fym · y)], (3)
where fxn and fym are the discrete x− and y−directed spatial frequencies, and thecn,m are the Fourier-series coefficients. The results of Monte-Carlo simulations fordifferent power spectrum models are shown on Fig. 4.
hill Atmosphere phase Turbulence Profile
50 100 150 200 250 300 350 400 450 500
50
100
150
200
250
300
350
400
450
500
radian
−60
−40
−20
0
20
40
60
80
vonkarman Atmosphere phase Turbulence Profile
50 100 150 200 250 300 350 400 450 500
50
100
150
200
250
300
350
400
450
500
radian
−15
−10
−5
0
5
10
Figure 4: Comparison of the power spectrum models: (top) Kolmogorov spectrum and (bottom) vonKarman spectrum.
Layered model is a fairly good approximation. For accurate atmosphere representa-tion, typically 5-10 phase screens are used in the simulations.
MODELS OF POINT SOURCES OF LIGHT
Mathematical model of a point light source is represented by a Dirac delta function:
Upls(r1) = δ(r1 − rc), (4)
where rc = (xc, yc) is the location of the point source in the (x1; y1) plane. But sucha point light source has an infinite spatial bandwidth, while most optical sources arespatially band-limited.AORTA simulator uses sinc-sinc model : two sinc functions to generate narrow pointsource. The model uses two sinc functions to generate narrow point source. Forexample, if a square region of width D is used then window function is the following:
W (r2 − rc) = A rect(
x2 − xc
D
)
rect(
y2 − yc
D
)
, (5)
where A is an amplitude factor, xc and yc are coordinates the location of the pointsource in the (x1; y1) plane. The model of sinc-sinc point source is given by:
Upls(r1) = Ae− ik∆z2∆z r2
1 e− ik∆z2∆z r2
c e− ik∆z2∆z r1rc
(
D
λ∆z
)
sinc[
D(x1 − xc)
λ∆z
]
sinc[
D(y1 − yc)
λ∆z
]
(6)
Figure 5: Light point source simulated with sinc-sinc model.
The simulated point source that represents astronomical object is shown on Fig. 5.
OPTICAL IMAGES FORMATION
When the source light P′ is at long distance from the aperture, the curvature of thewavefront reaching the aperture may be considered plane. If the energy of the planeis constant EA over the aperture A, then the optical disturbance U(P) at point P attime t is:
dU(P) =EA
zexp[i(ωt − kz)]dS, (7)
where ω is the temporal frequency of radiation, k = 2πλ
is the wavenumber, and z isthe distance between dS and P. The total disturbance at P can be found by integratingthe contributions from each element of dS.The source plane has coordinates (x1, y1) and (x2, y2) in the observation plane. Thedistance between the source and observation planes is ∆z . The problem is: given thesource-plane optical field U(x1, y1) we need to find observation-plane field U(x2, y2).The solution is given by the Fresnel diffraction integral :
U(x2, y2) =eik∆z
iλ∆z
+∞∫
∞
+∞∫
∞
U(x1, y1)ei k2∆z [(x1−x2)
2+(y1−y2)2]dx1dy1 (8)
This equation presents a paraxial approximation that is appropriate is seeing anglesare not too far from zenith. The quadratic phase factor inside the Fresnel diffractionintegral is not band-limited, so it poses some challenges related to sampling.In the proposed simulator it has been implemented the following approaches for lightpropagation:◮ Fraunhofer diffraction;◮ one-step Fresnel diffraction;◮ two-step Fresnel diffraction;◮ angular spectrum propagation.
SIMULATION OF LIGHT PROPAGATION THROUGHTURBULENT ATMOSPHERE
Using the Monte-Carlo simulations of turbulence atmosphere with von Karman modelof turbulence power spectrum, one can calculate the propagation of point light sourcethrough layered atmosphere. As a result, the scattering of light can be observed (seeFig. 6).
Figure 6: Light propagation through the turbulent atmosphere: (left) point source propagation through3 turbulent layers, (right) point source propagation through 6 turbulent layers.
In order to characterise the image’s quality, Strehl ratio was used as traditional crite-rion of images quality in optics. Strehl ratio is the ratio of the observed peak intensityat the detection plane of an imaging system compared to the maximum peak intensityof a perfect imaging system at the diffraction limit (Airy disk):
S =
∫∫
MTF g(νx, νy)dνx, dνy∫∫
MTF ideal(νx, νy)dνx, dνy(9)
The algorithm for evaluation of Strehl ratio includes arbitrary-sized region of interest(ROI) and cubic interpolation within that ROI. Numerical simulations were conductedfor investigation of how the ROI size influences on the value of Strehl ratio. The resultsof simulations are summarised in Table 1.
Table 1: Strehl ratio evaluation with ROI: influence of ROI size on Strehl ratio.
Atm. Strehl ratio, Strehl ratio, Strehl ratio, Strehl ratio, Strehllayers ROI 16 pix ROI 32 pix ROI 64 pix ROI 128 pix ratio, theory
1 1.00000 1.00000 1.00000 1.00000 1.000002 0.34017 0.33745 0.33609 0.33533 0.193813 0.10768 0.10620 0.10528 0.10479 0.085404 0.01801 0.01478 0.01389 0.01363 0.020295 0.02730 0.01341 0.01149 0.01090 0.011176 0.04194 0.01429 0.00920 0.00829 0.00888
Analysis of the results from Table 1 allows to conclude that small size of ROI tendsto overestimate the value of Strehl ratio. Optimal size of ROI is between 64 and 128pixels for the 512 × 512 grid.
WAVEFRONT SENSING
The wavefront may be sensed as a displacement of the light spots focused by thesensor’s lenslet array. Each lens takes a small part of the aperture (sub-aperture),and forms an image of the source. When an incoming wave-front is plane (see Fig. 7),all images are located in a regular grid defined by the lenslet array geometry.
Figure 7: Principle of the Shack-Hartmann wavefront sensor: (left) positions of light spots forundistorted reference wavefront, (right) positions of light spots for distorted wavefront passed thoughturbulent atmosphere.
If the wavefront is distorted, the images of light spots are displaced from their nominalpositions. Displacements of image centroids in two orthogonal directions x, y areproportional to the average wave-front slopes in x, y over the sub-apertures:
x =
∑
i,j xi,jIi,j∑
i,j Ii,j, y =
∑
i,j yi,j Ii,j∑
i,j Ii,j, (10)
where Ii,j are the intensities of light on the detector’s pixels.
ZONAL WAVEFRONT RECONSTRUCTION
For the Shack-Hartmann sensor, we need to measure the x− and y−gradients in thesame sub-aperture. This can be done using Fried geometry, as shown on Fig.8a. Thehorizontal dashes indicate positions of x−slope sampling, the vertical dashes are they−slope sampling positions. The filled circles are the estimated phase points. Themeasured phase differences are converted from length into phase:
φx =2π
λLxθx, φy =
2π
λLyθy (11)
where Lx is a length of the element, and θx is the measured angle of arrival compo-nent. The reconstruction of wavefront slopes can be performed as follows:
Sxi,j =
(φi+1,j + φi+1,j+1)/2 − (φi,j + φi,j+1)/2
h(12)
Syi,j =
(φi,j+1 + φi+1,j+1)/2 − (φi,j + φi+1,j)/2
h(13)
where h = D/N, and D is the diameter of the aperture and the N is the number oflenslets. The estimation of phase can be done as follows:
φ = A†S. (14)
where inverse of gradient interaction matrix A are evaluated using Moore-Penrosepseudo-inverse A†.
a)0 0.1 0.2 0.3 0.4 0.5 0.6 0.7
0
0.05
0.1
0.15
0.2
0.25
0.3
0.35
0.4
0.45
0.5Gradients that are restored from centroids
b)
2
4
6
8
10
12
14
16
18
202
46
810
1214
1618
20
−10
−5
0
5
x 10−3
c)
Figure 8: Zonal reconstruction of the wavefront: a) Fried geometry of slope measurements; b) matrixof gradients for the wavefront; c) reconstructed wavefront using zonal approach.
In the proposed simulator, Fried geometry of wavefront reconstruction is implemented.The calculated matrix of gradients is presented on Fig. 8b. The simulation of recon-structed wavefront is presented on Fig. 8c.
CONCLUSION
Adaptive optics is a technique that allows to compensate the impact of atmospheric turbulence in real-time thus improving the quality of astronomical images. However, adaptive optics systems are highly complicated networks of devices that makes analytical studyof such systems difficult. The aim of this project is to develop a complete adaptive optics simulator and investigate the controller design based on optimal control methods and Kalman filter. The proposed adaptive optics simulator is written on MATLAB and runs onGNU/Octave. According to conducted benchmarks, on typical size of matrices in adaptive optics simulations Octave is almost 3 times faster than MATLAB, but typically uses 10-20% more memory than MATLAB. The simulator contains software routines for modellingof atmospheric turbulence, wind profiles, Fresnel and Fraunhofer propagation, model of wavefront sensor, and zonal wavefront reconstruction. Using the developed simulator, it is possible to design and study the controller based on optimal control techniques andKalman filter. Design of the controller is the next stage of this research project.