Low-Cost Solar Adaptive Optics

Summary

A low-cost (less than $25k total hardware cost) adaptive optics system with a 37-actuator deformable mirror and a fast tipt-tilt mirror has been developed for the 1.5-m McMath-Pierce main telescope. The breadboard version has seen first light at the McMath-Pierce West Auxiliary Telescope in early July, 2002. The breadboard was available for user observations on a limited, shared-risk basis starting in early 2003.

System Description

Overview

Item Model Manufacturer US$ when purchased
PC 1 GHz Pentium III, 815E
256MB DIMM, PC133
7 ISA, 7PCI backplane
Kontron USA 1828.60
Frame Grabber PC-Dig PCI LVDS Coreco Imaging 1350.00
DAC Voltage Output Card CIO-DAC02 card
25 conductor cable
25-pin screw terminal
Measurement Computing 293.00
CCD camera Dalstar CA-D6 955 frames/s, 260 by 260, 8-bit  Dalsa 6100.00
Camera-to-frame-grabber cable DBHD100-TO-OPEN 100-pin LVDS cabel Matrox, connector in house 95.00
CCD camera power supply in house  
Deformable mirror (DM) 37-actuator, 15-mm diameter with driver and digital boards Okotech 6600.00
HV power supply for DM  2 F03H in parallel EMCO High Voltage Corp. 229.50
tip-tilt mirror with controller K-108-00 PSH-8 platform
E-103-24 power supply
2 E-103-20 amplifiers
E-103-90 casing
Piezosystem Jena 6694.00
various optics and mounts   Edmund Industrial Optics 629.85

Low-cost approach

The advent of low-cost deformable mirrors (DMs) with a significant number of actuators and fast, relatively large format CCD cameras has opened the door for low-cost AO systems. Solar AO systems require special wavefront sensors that can work on low-contrast extended-source solar features. Traditionally, correlation-based algorithms are used, which require massive computing power. The use of Digital Signal Processors (DSPs) to provide this computing power led to high hardware and software costs. Substantial increases in computer speed has allowed for designs with decreased reliance on external processors. Scharmer et al. built a solar AO system around a single Compaq workstation with a 600-MHz Alpha 21164 processor. However, they still needed a custom-built interface to pipe the data into the processor at a high enough speed.

Large software costs often destroy the advantage of AO systems that are designed around low cost hardware. We have tried to avoid this pitfall by selecting hardware elements that implied minimal software efforts. This included the use of an industrial PC with Linux RedHat 7.1 out of the box and the selection of interface cards with supported Linux drivers.

Hardware approach

The optics for the tip-tilt and AO systems are currently based on optical breadboard tables (see figure below). Once sufficient experience has been gained with these arrangements, a dedicated user instrument will be assembled. All optical elements are off-the-shelf. Mirrors are gold-coated to minimize the loss in reflectivity in the infrared.

Overview of the complete breadboard AO setup under the West Auxiliary telescope of the McMath-Pierce facility. Much of the space is occupied by the flexible Shack-Hartmann wavefront sensor setup.

The tip-tilt mirror is mounted on a PSH-8 piezo-driven platform from PiezoJena, which has a large tilt range of 8 mrad. This large tilt range is necessary because of the large demagnification of the pupil from 1.5 m to about 10 mm.

The DM is a gold-coated 37-actuator electrostatic membrane mirror from Okotech in the Netherlands. It  has been well characterized in numerous laboratory experiments (see list of publications at http://www.okotech.com). This 15-mm diameter mirror has sufficient range for use in astronomical adaptive optics, as the mirror mode amplitudes are well matched to the atmospheric seeing modes. The mirror actuators show no hysteresis and are almost completely linear with the applied voltage squared (see figure below). The achievable surface shape can be well controlled at up to 1 kHz, which is sufficient for infrared AO at the McMath-Pierce telescope. Okotech provides the necessary ISA computer interface and high-voltage driver cards. High-voltage converters step a 12-volt laboratory power source supply up to the 300-volts required by the high-voltage mirror driver cards.

The relation between the voltage squared applied to a particular aperture and the shift measured in a particular subaperture. The relation is highly linear with a correlation coefficient of 0.988.

The wavefront sensor is based on an orthogonal lenslet array and a Dalsa CA-D6-256 CCD camera. The camera has 256 by 256 pixels and reads out at nearly 1kHz with 8-bit internal digitization. This camera is connected to a PC-Dig LVDS digital frame grabber from Coreco Imaging Technologies. The latter can keep up with the 1-kHz full frame rate provided by the camera and can transfer the digital data at the required rate over the PCI bus to the main memory. The industrial PC from Kontron USA is based on a combined PCI/ISA passive back-plane and a 1GHz Pentium III single-board computer that uses the Intel 815E chipset.

There are currently two independent optical setups. One is for tip-tilt correction only and is called the Universal Tracker (UT). It has already been used with three very different post-focus instruments. The other setup is the full AO setup whose science instrument has so far been limited to a simple video camera.

Software approach

As mentioned above, keeping hardware costs low is insufficient; for an AO system to be truly low-cost, software expenditures must also be minimized. The industrial PC described above is operating under Linux RedHat 7.1. This provides a flexible, general-purpose environment where the AO code can be run simultaneously with development and data analysis tools. Running the AO process with soft-realtime priority under the Linux 2.4 kernel ensures that the AO process has exclusive access to the CPU whenever feasible. This limits the typical wavefront sampling jitter to a few microseconds with the exception of when entire images from the wavefront sensor camera are displayed.

For the UT setup, the camera looks at an image of the telescope focal plane without the lenslet array. There are three tip-tilt correction modes:

  1. Digital quad-cell for sunspots: a dark feature such as a sunspot or pore is observed. The intensity in four quadrants is averaged and the normalized differences between opposite quadrants are used to control the tip-tilt mirror.
  2. Digital limb tracker for vertical and horizontal limb orientations: the solar limb is positioned either horizontally or vertically across the fast camera. The control signal is the ratio of the intensity measured across the limb divided by the sum of the intensities measured inside and outside of the limb. This makes the limb position measurement inherently insensitive to scattered light level, changes in seeing, and the overall intensity level. The mirror is only driven in the appropriate axis while the other one is kept in its center position.
  3. Correlation tracker: this mode can operate on any solar surface feature. A reference image is acquired, and subsequent images are compared to this reference by calculating the sum of absolute differences (SAD) as a function of displacement between the two images. The sub-pixel accurate displacement that minimizes the SAD is used to drive the tip-tilt mirror. Reference images are automatically updated after a user-defined period (typically 30 seconds).
In all three modes, the set point can be moved digitally instead of moving the camera. This allows the telescope image to be moved across the slit of a spectrograph or the position on the science camera to be fine-tuned. The loop update rate is 955 Hz, which corresponds to the maximum readout rate of the CCD camera.

The correlation tracker approach is somewhat different from previous work in that almost the whole 256 by 256 image is used for the tracking. This large field of view allows tracking on features that have contrasts as low as 1%. This does not require that the seeing be good enough to discern solar granulation. The larger-scale pattern of solar convection is sufficient to provide reasonably stable image motion compensation. The correlation tracker provides better stable image motion compensation than other systems that use much smaller fields of view.

There are two crucial parts of the software. The first is the Linux driver for the digital frame grabber, which is provided by GOM in Germany as an open-source project (http://oss.gom.com). The company has proven to be very responsive to our needs, in particular in adapting the code to our Dalsa camera. The test program supplied with the driver was used as the backbone of all of our software developments. We could therefore concentrate on the few crucial pieces of code that derive the control signals and control the mirrors.

The other crucial software aspect consists in the use of the MMX and SSE instructions provided by the Pentium III to (1) dark and gain correct the images coming from the camera and (2) calculate the sum of absolute differences between an image and a reference for various displacements. These time-critical pieces of software have been implemented in inline assembler code within the C program. MMX and SSE instructions provide parallel processing on up to 8 pixels. Dark and gain corrections are performed with 16-bit accuracy and then the calibrated images are truncated to 8 bits.
 

#define NS 256 /* number of subapertures */
#define RX 16  /* size of reference subaperture in x */ 
#define RY 16  /* size of reference subaperture in y */ 
#define SX 8   /* size of subapertures in x */ 
#define SY 8   /* size of subapertures in y */ 

uint8_t  cimag[NS*SX*SY] __attribute__ ((aligned (32)));
uint8_t  refim[RX*RY] __attribute__ ((aligned (32)));

/* calculate sum of absolute differences for one subaperture */

int sae(int dx, int dy, int sn) {
  /* dx, dy: current shift vector
     sn:     subaperture number   */

  uint32_t c1 = 0;
  uint8_t *ip, *rp; /* pointers to appropriate rows */

  ip = &cimag[sn*SX*SY]; /* start at first pixel of each subaperture */
  rp = &refim[(dy+4)*RX+dx+4]; /* reference is loaded unaligned with movq*/

  /* assembler code for one subaperture */
  asm("movq   (%1),   %%mm1 \n\t" /* load 8 reference pixels unaligned */
      "psadbw (%2),   %%mm1 \n\t" /* sum of absolute differences */
      "movq   16(%1), %%mm0 \n\t" /* reference is 16 pixels wide, skip */
      "psadbw 8(%2),  %%mm0 \n\t" /*              by 16 pixels per row */
      "paddw  %%mm0,  %%mm1 \n\t" /* add to previous sum in MMX register */
      "movq   32(%1), %%mm0 \n\t"
      "psadbw 16(%2), %%mm0 \n\t"
      "paddw  %%mm0,  %%mm1 \n\t"
      "movq   48(%1), %%mm0 \n\t"
      "psadbw 24(%2), %%mm0 \n\t"
      "paddw  %%mm0,  %%mm1 \n\t"
      "movq   64(%1), %%mm0 \n\t"
      "psadbw 32(%2), %%mm0 \n\t"
      "paddw  %%mm0,  %%mm1 \n\t"
      "movq   80(%1), %%mm0 \n\t"
      "psadbw 40(%2), %%mm0 \n\t"
      "paddw  %%mm0,  %%mm1 \n\t"
      "movq   96(%1), %%mm0 \n\t"
      "psadbw 48(%2), %%mm0 \n\t"
      "paddw  %%mm0,  %%mm1 \n\t"
      "movq   112(%1),%%mm0 \n\t"
      "psadbw 56(%2), %%mm0 \n\t"
      "paddw  %%mm0,  %%mm1 \n\t"
      "movd   %%mm1,  %0    \n\t"
      "emms                 \n\t"
      : "=g" (c1)
      : "r" (rp), "r" (ip)
      );
  return c1;
}

Source code for calculating the sum of absolute differences for an 8 by 8 subaperture in a 16 by 16 reference aperture. This requires a Pentium III or compatible CPU and the GNU C compiler. The loop over all 8 rows of pixels has been unrolled to avoid branch misses in the heavily pipelined Pentium III architecture.

The sum-of-absolute-differences algorithm is shown above. The movq instruction moves 8 pixels simultaneously into MMX registers. The psadbw instruction calculates the sum of absolute differences of 8 pixels in the captured image with 8 pixels of the reference image. This instruction can be scheduled every 2.5 clock cycles (2.5 ns for our 1GHz processor) since the Pentium III has two execution units that can handle psadbw instructions. However, the 1-GHz Pentium III can, on average, only load 1 byte per clock cycle, meaning that the performance is typically limited by the 1GByte/s I/O limit and not by the processing power. Nevertheless, this is sufficient to run the 256 by 256 pixel correlation tracking at more than 500 Hz or analyze 200 wavefront sensor subapertures with 8 by 8 pixel images and a 16 by 16 pixel reference image at 1kHz. The 200 subapertures are about 10 times more than in any other working solar AO system and at least a factor of 2 more than any solar AO system currently under development.

Software Downloads

  • oko37.tar.gz (8KB): Finite element code modeling the 15-mm 37-actuator membrane mirror
  • ao2sim.tar.gz (1.2MB): Source code distribution of McMath-Pierce AO simulator
  • ao2source.tar.gz (36KB): Source code distribution of McMath-Pierce AO system

Presentations and Publications

  • Keller C.U., Plymate C., Ammons S.M., Low-cost solar adaptive optics in the infrared, SPIE 4853 (2.7 MB PDF file)
  • Keller C.U., Plymate C., Ammons S.M., Low-cost solar adaptive optics in the infrared, presentation at the SPIE meeting in Hawaii, USA, August 2002 (1.5 MB PDF file)
  • Keller C.U., McMath-Pierce Adaptive Optics: Software, presentation at CTIO in Chile, January 2003 (0.5MB PDF file)
  • Keller C.U., McMath-Pierce Adaptive Optics: Science, presentation at CTIO in Chile, January 2003 (2.2MB PDF file)
Christoph Keller
Christoph Keller
Professor of Experimental Astrophysics

exoplanets, innovative instrumentation, solar physics, remote sensing, interdisciplinary research

Related