The Gemini Control System
Richard J. McGonegal and Stephen B. Wampler
The Gemini 8-m Telescopes Project
950 N. Cherry Ave., Tucson AZ 85726
ABSTRACTThe Gemini 8-m Telescopes Project has been charged with extremely challenging performance requirements in the areasof tracking, pointing, image quality and operations. In addition the work is being done in a distributed fashion on 3 continents - which itself puts constraints on the design. The author will describe the software, hardware and control components of the Gemini system as well as reporting the predicted performance of the design.
Keywords: telescopes, performance, control systems

INTRODUCTION
The Gemini Project is an international partnership to build two 8-meter telescopes, one on Mauna Kea, Hawaii, and one
on Cerro Pachon, Chile . The telescopes and auxiliary instrumentation will be international facilities open to the scientificcommunities of the member countries. The international partnership is made up of the United States, the United Kingdom,
Canada, Chile, Argentina, and Brazil. The telescopes will be high performance, 8-meter aperture optical/infrared telescopes and have a planned completion date of 1998-2000. The goal of the telescopes is to exploit the best natural observing conditions and to undertake a broad range of astronomical research programs within the national communities of thepartner countries. In order to reach this goal Gemini has set demanding requirements in terms of image quality, tracking,pointing, and availability (Table 1)

SCIENCE REQUIREMENTS
Performance Requirements
Table 1 shows the performance required of the Gemini telescopes during operation.
TABLE 1. Gemini Performance Requirements

Specification

Requirement

Description

Image Quality

0.1 arcsec

increase in 50% encircled energy diameter

Tracking

0.044 arcsec

RMS jitter in line of sight

Pointing

3.0 arcsec

in service pointing

Availability

98%

time collecting science photons

Image quality is defined as the variation in the image point spread function integrated over one hour. Image quality isdetermined by measuring the 50% encircled energy diameter (eed) of a stellar source. Image quality can be quantified bycomparing long and short exposure images. Tracking is defined as the jitter in the telescope line of sight over one hour
Tracking is determined by measuring the instantaneous (or nearly so) centroid of a stellar source. Tracking can be quantified by taking repeated centroid measurements and calculating their root mean square. Pointing is defined as the ability toalign the telescope line of sight to a particular position on the sky. Pointing is determined by measuring the difference
between the observed and predicted positions of a stellar source. Pointing can be quantified by taking repeated measurements across the visible sky and taking their root mean square. Availability is defined as the amount of time spent doing
science. Availability is determined by measuring the amount of time spent collecting photons, including required calibrations. Availability will be quantified by tracking the long term average of the measured time compared to the total time

available. The requirement for availability will not be addressed in this paper. It is the subject of ongoing work at the
project and will be reported on at a later date.
In all of the above the requirement is a residual reached after a number of systems are correcting the telescope. The system
makes extensive use of :• look-up-tables (LUTS) which position the telescope axes and optics in real time
• active feed back of a focal plane guide star’s tip/tilt/focus measurements - which drive the secondary• active feedback of a focal plane star’s higher order zernike measurements - which correct the figure of the primary mirror
Operational Requirements
The Gemini telescopes must also support a wide range of operational modes:
Classical Observing - user manually sequences the different telescope subsystems to acquire data
Preplanned Observing - user plans detailed use of facility in advance and submits this to facility
Queue Scheduling - parts of one observer’s program are interspersed with those of others in order to make more
efficient use of facility
Flexible Scheduling - programs to be executed are selected depending on environmental conditions in order tomake efficient use of existing conditions
Service Observing - program is executed by a member of observatory staff - not the Principal Investigator
These different modes create a requirement for a programmable upper layer to the software - which Gemini calls theObservatory Control System. This system acts to synchronize and sequence the actions of the different subsystems whichmake up the observatory system.

SOFTWARE
User View
Operation of the Gemini telescopes is through the use of Science Programs developed by the astronomers. These programs provide a means for astronomers to describe how they want the system to perform in a structured, hierarchical outline that is executable by the Observatory Control System. One goal of the design of the Science Programs is to provide
the flexibility required for interactive use of the telescopes with the structure required for efficient planning and scheduling. The Science Program is used by the Observatory Control System to identify resource demands (which system features are needed and how long they are needed), environmental constraints (clarity of ’seeing’ required, wind conditions),
timing constraints (when is an observation possible), and an ordering of actions (which observations to take first, andwhich concurrent operations should be permitted). The system can then use this information to schedule the program withother programs to keep the telescope fully utilized. Observatory staff can create, monitor, and adjust nightly plans consisting of a number of such programs.
While the Science Program provides structure, embedded within a Science Program are consoles where astronomers havethe flexibility to configure the telescope equipment for their specific needs. Figure 1 shows a prototype science programwith an open console where the astronomer is setting up a pattern of target positions where images are to be taken (adither pattern). In practice, a star field would typically appear in the positioning window.
An important feature of the software interface is that the same consoles used when developing programs are the same ones
available during operation of the telescope for making adjustments during an observing session. For example, the astronomer can reopen the above console to make fine-tuning adjustments to the target positions after the telescope is pointed in
the proper direction.
Since the observing process is often highly interactive, with the astronomer potentially making a large number of suchfine-tuning adjustments, a Science Program is a dynamic object that is itself transformed during the observing process it
represents. In the example shown above, parts of the program have completed and the program now includes data that has
been collected (found in the Obs Data folder in the program). In addition, the program shows the status of the observing
process it describes.

FIGURE 1.

Science Program with Console

Software Organization
The Gemini Control System is implemented as four major systems, as shown in Figure 2.
FIGURE 2.

The Gemini Principal Systems

Observers
submit programs
receive information
Observing Plan Queue(Observations frommultiple programs)

Observing DB

Observatory
Control
System(observations)Operator
Data Store DB(Images,
Calibrations,
Headers)

Gemini Databases

Data Handling System

EPICS
Real
Time
DB

Telescope
Control
SystemInstrument
Control
SystemEach major system is responsible for some specific aspects of control during operation and may be split into one or moresubsystems to accomplish this task. The Observatory Control System manages all aspects of the science program andsequences the interactions between the other major systems while a science program is being performed. In addition, theObservatory Control System supports planning activities by providing tools with which the observatory staff can quickly
match science programs to resources and existing environmental conditions. The Telescope Control System is responsible
for the pointing and tracking the telescope and all related subsystems, such as the carousel (rotating portion of the enclosure building), the mount, the primary and secondary mirrors, and the cassegrain rotator (rotates to keep image orientation
constant as telescope tracks across the sky). It is the Telescope Control System that has primary responsibility for maintaining the best possible image quality on the Gemini telescopes. The Instrument Control Systems, one per instrument(Gemini typically has three science instruments mounted at any one time). These are responsible for each instrument's
mechanical/optical components and the detector control. The Instrument Control System has primary responsibility in theacquisition of useful data from the images provided by the telescope. Having multiple active Instrument Control Systems
allows the Observatory Control System to provide parallel sequencing. For example, one instrument might be collecting
internal calibration data while another instrument has the telescope beam. The Data Handling System collects data fromthe instruments, associates relevant status items with the data, and provides both quality-control feedback to the astronomer and preliminary analysis to remove instrumentation and environmental effects from the data. The Data Handling System is also responsible for archiving the data and associated status items.
The Telescope and Instrument Control Systems are based on EPICS. The Observatory Control System is responsible formapping the information in a Science Program into the database-driven domain of EPICS.
Principle of Operation
The Gemini Control System views the overall system as existing in a particular state at any particular moment. The
Observatory Control System transitions the system from one state to another by supplying configurations that describe thecontrollable conditions for the new state. So, systems are controlled by being directed to achieve specific target configurations. The Observatory Control System can monitor the performance of each system by comparing the target configuration with the actual configuration as reported by the other systems. This approach maps well onto EPICS-based systems
and can be adapted to non-EPICS systems as well. The science consoles found in Science Programs provide a directmeans of specifying configurations, where each console contributes a set of attributes and their associated values to a configuration. These attribute/value pairs can be directly mapped onto the process variables found in an EPICS database.
Because the major system components are separate systems, resources can be allocated efficiently. For example, an instrument that has been given access to the telescope beam may relinquish that access as soon as photon collection is complete.
The Observatory Control System can then begin concurrent execution of another Science Program (or another part of thesame science program) and begin moving the telescope to a new target position as the instrument reads out its detector andtransfers data to the Data Handling System. (During Classical Observing it is possible that the astronomer will have disallowed this advance motion, performing a quality check of the data to determine if more data needs to be collected at thecurrent target position.)

HARDWARE
The Gemini Control System is a distributed system using both Unix workstations and VME crates running EPICS and
VxWorks. These components are connected with several LANs. Figure 3 shows the hardware layout for the Mauna Kea
telescope. (The Cerro Pachon telescope is configured similarly.)
The VME crates are all EPICS based, although some instruments may not be using either EPICS or VME systems forcontrol. To prevent the high volume of data from interfering with time critical control commands, system command anddata flow are provided with separate LANs. A third, very high speed connection, called the Synchro Bus is provided forthe extremely time-critical control signals from wavefront sensing probes to the secondary mirror. The Event Bus is a collection of analog signal connections for synchronizing instrument detectors to quick telescope movements. Finally, anInterlock System both detects and prevents dangerous situations.
Two VME crates are not connected to any hardware devices - the TCS VME crate is used by the Telescope Control System to implement the Gemini pointing and tracking models and to synchronize the TCS subsystems. The OCS VME crate
serves as a repository of system status information from other systems. This EPICS system provides a common collection
point and to avoid monitoring actions from impacting actual control. It also provides a way for non-EPICS systems to provide status information back through EPICS.

FIGURE 3.

Mauna Kea Hardware Layout
Primary Mirror

Secondary
Mirror

Systems

Systems

Cass Rotator

A&G

Adaptive Optics

Systems

Systems

Systems

Instrument

Detector

Systems

Systems

Instrument
VME

Detector
VME

Interlock System
Enclosure

AzimuthAltitude

Systems

Systems

Systems

RotatorVME
Primary
VME

A&G
VME

Adaptive Optics
VME

Secondary
VME

Mount
VME

Synchro Bus

Event Bus
EnclosureVME

OCS/GIS
VME

TCS
VME

Video LAN
Data LAN
Control LAN

IEEE 802.3

Time LAN
Time
Reference

RouterRouter

Instrument/
Telescope
Workstation

Router

Instrument/
Telescope
Workstation

Instrument/
Telescope
Workstation

FDDI Backbone
RouterData

Data
Storage

Archive

Data Reduction
Workstations

T1

Summit Ring

Hale Pohaku

Base Facilities

Observing
Workstations

Router

WAN

CONTROL
Control Systems Available
The following control systems are available for use in the different modes of operation:• mount—altitude drives (4)—azimuth drives (8)—cassegrain rotator (4)• secondary—axis articulation—fast tip/tilt/piston• primary—passive pneumatic air bag providing 80% of axial support with controlled pressure—passive hydraulic wiffletree providing 20% of axial support with controlled tip/tilt—passive hydraulic lateral support with controlled translation—active axial and lateral pneumatic support• adaptive optics—deformable mirror—tip/tilt mirror
Sensors Available
The following sensors are available for use:
• fast wave front sensor - provides low spatial order, tip/tilt and focus, error at up to 200/15 Hz respectively inparallel with science observing• slow wave front sensor - medium spatial order (~ 30 spots) read out once per minute to provide tip/tilt, focus,
astigmatism, and coma in parallel with science observing• calibration wave front sensor - provides high spatial order (~400 spots) map of wavefront errors; precludes science observing while in beam
• adaptive optics wave front sensor - provides medium spatial order map of wavefront errors at very high rates (<1 KHz)• tape and friction encoders, fiducial system• laser measurement of secondary position, tilt meters, accelerometers, strain gauges (all TBD)
Servo Bandwidths
The servos have bandwidths as follows:
TABLE 2. Servo Bandwidths:

Servo

SensorMax Servo
Bandwidth (Hz)Max Sampling
Rate (Hz)Closed Loop

Fast WFS

0.100

1-10

Tip/Tilt Loop

Fast WFS

40.000200.000

Fast Focus Loop

Fast WFS

3.000

15.000

Active Loop

Slow WFS

0.003

1/60

Adaptive Loop

Adaptive WFS

150.000

750-1000

Operating Modes of the Telescope
The normal operating mode of the telescope will be with the tip/tilt loop, fast focus loop, and active optics loop closed this is refered to as Active Optics Mode.
Open Loop Mode
In open loop mode there is no star on the wavefront sensor and the primary active and passive system run from LUTs.
There will be LUTs available which will be based on a certain grid spacing on the sky and the respective servos will interpolate within these grids. This interpolated value will be used to command the next position set of the active actuators andthe passive system. In general, the LUTs will be based on 10 degree grids in right ascension and declination and the servo
loops will determine new positions at a 20 herz rate. If required there will be temperature corrections for the LUTs. These
LUTs will be used to remove the repeatable deformations of the primary based on the current position and temperature.
We assume that the LUT acts as a high pass filter with a break at 0.003 Hz (5 minute time scale).
The dominant contributions to image degradation during open loop mode are gravitational warping of the mirror cell andhigher order (focus and above) atmospheric effects.
Closed Loop ModeIn closed loop mode a guide star is available for making corrections but there is no fast tip/tilt of the secondary available.
The position of the guide star in the focal plane is used to make relatively slow (< 0.1 Hz) corrections to the position of themount, primary, and secondary which are required due to (a) errors in the LUTs and (b) non-repeatable errors such as hysterisis and wind shake. For the purpose of this discussion we will define slow as 0.1 Hz. We will not try and make corrections to the mount or the secondary system faster than 0.1 Hz. Limit on mount correction bandwidth will not be samplingof guide star position but rather the maximum speed at which the mount can be moved without inducing vibrations. During this mode all corrections will be performed by slow tip/tilting of the secondary. If required, the DC offset of the secondary slow tip/tilt mechanism will be used to make corrections to the mount.
During closed loop mode the LUTs will be used to feedforward position and velocity information to the servo system. The
guide star information will be used to make corrections to the LUT positions. We model this as a closed loop servo with abandwidth of 0.1 Hz. This servo improves the windshake performance but the major contributors to image centroid
motion are still windshake and atmospheric tip/tilt.

Tip/Tilt Secondary ModeIn tip/tilt mode a guide star within the isokinetic patch is used to generate corrections (at up to 200 Hz) to the tip/tilt of thesecondary in order to maintain the image centroid. The main sources of error to be corrected are wind shake of the telescope/optics and atmospheric turbulence induced motion of the image centroid. This information can come from a dedicated X/Y guider or it may come from the wavefront or curvature sensor. In this mode of operation the adaptive optics
system is not operating.
During this mode all corrections will be made by tip/tilting the secondary. If required the DC tilt offset of the secondary
will be used to inject corrections to the slow secondary 5 DOF mount and the telescope drives via low pass filters. The
LUTs will be used as in closed loop mode. It is the goal of the LUTs to model the repeatable errors such that DC corrections are unnecessary. It is the goal of the telescope design that it is stiff enough that dynamic errors and non-repeatableerrors are small enough such that corrections are unnecessary. We model this as a closed loop servo with a bandwidth of
40 Hz and a sampling rate of 200 Hz. The bandwidth is driven by the requirement to reduce the windshake to fit within theerror budget. The sampling rate is driven by the requirement to have a sampling rate that is at least 5x the servo bandwidthin order to have a stable servo system. Once the tip/tilt system is activated the dominant contribution to encircled energy
diameter is the higher order effects of the atmosphere.
Fast Focus ModeIn this mode the star which is being used to generate tip/tilt information is also used to provide focus information at a
reduced rate (estimated to be 15 Hz). This focus information is used to make corrections to the focus position of the secondary by making offsets in the actuators of the secondary tip/tilt system. We model this as a closed loop servo with abandwidth of 3 Hz and a sampling rate of 15 Hz. The effects of a changing focus do not have large effects in open loop or
closed loop mode because these modes are dominated by wind shake. The improvement in image quality due to the tip/tiltsystem results in the focus effects being a significant contributor to image quality. The major impact on telescope focus isthermal changes in the optical support structure - these can be adequately reduced by thermal sensors and calibration however extra margin is introduced with the fast focus system. Wind buffeting and atmospheric higher order effects(beyond tip/tilt) cause a significant contribution to image quality relative to the error budget. These effects can be reduced
substantially by the use of a fast focus system with a 3 Hz closed loop bandwidth.
Active Optics Mode
This is the normal operating mode of the telescope and it includes look up tables, fast tip/tilt and focus described in previous operating modes. The coma component is used to correct translation of secondary mirror and astigmatism and higher
components used to correct figure of primary mirror via LUTs. In this mode an off-axis star (a star outside of the isokinetic patch must be integrated long enough (~60 sec) to remove effects of atmospheric seeing) is observed with a wavefront sensor and the information derived from that signal is used to make corrections to the primary figure. The adaptive
optics system is not used in the active optics mode. During this mode all higher order corrections will be made by altering
the figure of the primary. If required the DC offset of the primary figure may be used to make corrections to the 5 DOF
mounts of the primary and secondary - but it is the goal of the appropriate LUTs to model the repeatable errors such that
corrections are unnecessary. It is the goal of the primary support system that it is stiff enough that dynamic errors and nonrepeatable errors are small enough such that corrections are unnecessary. The primary axial LUT will be used during thismode to feedforward corrections to the primary figure. The wavefront sensor information will be used to make corrections
to the LUT and to update its current value. The LUT will be capable of working in both an absolute mode and in an incremental mode. All tilt and wavefront information from the Acquisition and Guide unit (A&G) will be rotated to apply tothe fixed reference frame of the primary mirror. This will be handled by the Telescope Control System as it collects all of
the relevant position and orientation data.
Adaptive Optics ModeIn this mode a bright star is used as a probe of the wavefront errors at a high sampling rate. This information is used tomanipulate an internal tip/tilt mirror and a deformable mirror provided with the AO system. The AO deformable mirror
with tip/tilt optic used to extend tip/tilt corrections to higher frequencies and wavefront correction to more modes. During
this mode all tip/tilt corrections will be made with the AO small internal tip/tilt mirror. If required the DC offset of thismirror will be used to make corrections to the tip/tilt position of the secondary. This in turn will make corrections to themount if needed.

• DC position of tip/tilt optic used to correct secondary tip/tilt position via a low pass filter• DC focus term of deformable mirror used to correct secondary focus via a low pass filter• DC figure terms of deformable mirror used to correct primary figure via a low pass filter
During this mode all wavefront corrections will be made with the deformable mirror. If required the DC offsets of thedeformable mirror can be used to make corrections to the primary figure, primary 5 DOF system, and the secondary 5
DOF system. The appropriate LUTs will be used in this mode to feed forward position and velocity. However the secondary tip/tilt system will not be used other than as a follower to the adaptive tip/tilt mirror DC position. The primary axial
support LUT will be used in this mode to feedforward corrections to the primary figure. The curvature sensor information
will be used to make corrections to the LUT position and to update its current value. The LUT will be capable of working
in both absolute and incremental modes.

PERFORMANCE ANALYSES
Initial Conditions
In order to perform the analyses it is necessary to pick a given set of conditions to use for the performance estimate. The
standard case used throughout is:• observing at 2.2 microns and guiding at 0.7 microns• the existing atmospheric conditions are the upper 10th percentile - equivalent to an R0 of 40 cm at 0.5 microns• there is a single dominant seeing layer 4 km above the site with a mean wind speed of 20 m/s in that layer• the tip/tilt information is coming from a zero read noise detector within a 1.5 arcminute radius of the scienceobject - a star brightness is chosen such that there is a 90% chance of finding one in this field• the higher order Zernike corrections are coming from a 5 e- read noise device within a 7 arcminute radius - a
995 sky coverage is assumed for this larger field• the external wind speed at the enclosure is 11 m/sec• the telescope is at 45 degrees zenith angle and perpendicular to the wind direction
In addition performance has been estimated in a) low wind speeds, 3 m/sec, and b) median seeing, R0 of 22 cm. at 0.5
microns.
Image Quality
The current estimate for the image quality of the telescope is 0.102 acseconds increase in the 50% eed. This is well within
the error budget at 45 degrees zenith angle, 0.123 arcseconds, and is very close to the zenith requirement of 0.100
arcseconds.
TABLE 3. Top Level Image Quality Error Estimate

Area

Raw

Open

Autoguider Tip/Tilt

Focus

ActiveOptical Design

0.065

0.065

0.065

0.065

0.065

0.065

Surface Errors

0.201

0.187

0.187

0.140

0.105

0.046

Optical Alignment

0.014

0.014

0.014

0.014

0.014

0.014

Self Induced Seeing

0.027

0.027

0.027

0.027

0.027

0.027

Dynamic Alignment

0.147

0.036

0.036

0.025

0.004

0.004

Tracking

3.676

0.732

0.332

0.056

0.056

0.056

RSS Totals

3.685

0.760

0.389

0.169

0.139

0.102

TrackingThe current estimate of tracking performance is a 0.037 arcsec jitter in the telescope LOS which translates to a 0.056
arcsec increase in the 50% eed. This is slightly above the current error budget of 0.044 arcsec 50% eed.
TABLE 4. Top Level Tracking Perfromance Esitimates

Area

LOS jitter (arcsec)

50% eed (arcsec)

Wind Shake

0.024

0.036

0.041

Measurement Error

0.017

0.025

0.006

Off Axis Guiding

0.009

0.013

0.006

Non Linear Effects

0.022

0.033

0.014

RSS Total

0.037

0.056

0.044

Error Budget

Pointing
The overall pointing performance of the telescope is estimated to be 2.43 arcseconds RMS. The breakdown of this relative
to the error budget is seen in the table below.
TABLE 5. Top Level Pointing Error Estimate Cause

Before Correction

After Correction

Error Budget

Calibration Stars

0.10

0.10

0.10

Interpolation Function

0.50

0.50

0.50

Encoder Repeatability

0.14

0.03

0.15

Position of Optics

58.73

2.02

2.67

Position of Mount

16.06

1.25

1.25

RSS Total

60.89

2.43

3.00

CONCLUSIONS• The current Gemini design meets the demanding requirements set by the scientific mission of the telescope.
• In order to calculate performance estimates in this regime it is necessary to use the best modeling tools andexpertise available.
• A range of initial conditions must be explored to fully understand the implications of a given design on performance.

ACKNOWLEDGMENTS
This report would not have been possible without the concerted efforts of the entire Gemini engineering team. I would liketo give special thanks to M.Burns, M.Sheehan, B.Ellerbroek and J.Oschmann for all their model runs and comments on
preliminary versions of this report.

REFERENCES[1] D.Rockey, Absolute Pointing Error Budget, Keck Observatory Report No. 159[2] M.Burns, Servo Simulation and Modeling for the Gemini 8-m Telescopes, SPIE Proceedings V.2479, 1995
[3] R.Racine, private communication, 1994