Calypso Tertiary Servo Users Manual

The Danbury Corporation

Gary McGrath, Bruce Truax

November 19, 1996

Last Updated on Monday, May 8, 2000


Table of Contents


Introduction

The tertiary servo system is actually two servos that control the tip and tilt of the tertiary mirror in response to image motion. This system locks on to a star image and attempts to drive the image position error to zero in both the X and Y directions.

The tertiary servo runs on a DOS 66 MHz 486 computer. The Software is executed from the P: (PROM) drive of the Ziatech ZT8902 Single Board Computer. A configuration file is used to set up the constants used in the software. This configuration file can be modified and copied to the P: drive of the target computer using Ziatech's Virtual System Console (VSC) software. VSC allows a host computer to be connected to the target Tertiary Controller via an RS-232 serial connection. This precludes the need for disk drives, monitor, keyboard, and interface controller boards.

The tertiary controller is connected through a second RS-232 serial port to the camera control computer. Commands are sent from the Camera Controller to the Tertiary controller. Responses, status messages, and error messages are transmitted back to the Camera Controller. Alternatively, any PC can be used to command the Tertiary controller. All that is needed is a PC with a serial port, and a communications software package such as Procomm.


System Overview

The Tertiary Servo system is responsible for several simultaneous tasks. It must read the serial port (COM2), interpret and execute the commands. Response strings are also sent to the serial port. A panel task displays the status of the system. The system must also perform a control loop with exact timing. The control loop reads the three photodiodes, and computes the centroid of the guide star in X and Y coordinates. Since it is desired to lock the position of the centroid in the center of the sensors, the error signal for each coordinate axis is the negative of the centroid position for that axis. Each coordinate axis has its own digital PID compensation and as many as four optional digital notch filters which process the two error signals independently. The output for each axis is then converted to an analog signal by a 12 bit D/A converter which drives the amplifier of a PZT actuators. These actuators move the mirror in tip and tilt. Also within the servo loop processing, there are two channels of diagnostic analog output. These can be configured to output various digital signals for the purpose of testing. There is a diagnostic analog input channel that can optionally be used as a position command signal for either the X or Y axis. These tasks all run virtually simultaneously through the use of a preemptive multitasking operating system.

The tertiary servo is designed to correct for small star position errors. Since the pointing model for the telescope is not perfect, there will also be slow errors which will accumulate over time. This will slowly cause the star to drift out of the range of the tertiary mirror. To keep the star within the range of the tertiary mirror, the main telescope servos must adjust their tracking occasionally. To provide the telescope with the necessary information to track the star, the tertiary servo has an OFFSET command. When this command is issued, the tertiary servo returns the offset, in volts, of the tertiary mirror resolved into the X and Y coordinates of the image plane. The Telescope Operator Interface (TOI) queries the tertiary servo for these values on a periodic basis (once every 15 seconds works well). When ever one of the two offset values exceeds 3 volts, the TOI sends a 0.5 arc second offset command of the opposite polarity to the corresponding axis. For example, if the X Offset value is 3.13V, the TOI will send a -0.5 arc second offset in X instrument coordinates. This amount of telescope offset will reduce the offset error of that axis by a about half. Slightly larger corrections could be used, but it does not appear to be necessary as this size offset works quite well, allowing the telescope and tertiary servo to track an object indefinitely.

Autotuning

As the natural seeing changes, the gain of the servo loop also changes. This change in loop gain is inversely proportional to the size of the tip/tilt corrected seeing. In addition, theory states that the gain of the servo loop should decrease as the brightness of the guide star decreases. In order to get the best possible performance out of the adaptive system, it is necessary to adjust the servo gain, and therefore its bandwidth depending on current conditions. We have implemented an experimental Auto Tuning system at the recommendation of Rene Racine which is currently programmed to start at a very low servo gain and slowly increase the gain until the error variance stops decreasing. A this time (May, 2000) this system has only undergone preliminary testing and is not qiute ready for prime time. The commands for the autotuning function are listed below and are all prefixed by the word AUTOTUNE. There are also a number of configuration parameters which are used by the autotuning algorithm, they are:

Gain Multiplier
Gain Direction
Gain Lower Limit
Gain Upper Limit
Gain Start
Autotune Timer

Since the autotuning system is still under development, the commands and configuration parameters are subject to change and should not be integrated into the TOI until testing is complete.


Configuring The System

Files on the Tertiary controller are stored in onboard Flash memory in virtual drive P:. These files can be accessed using Virtual System Console (VSC). To use VSC, connect a null modem cable from COM1 (connector J8 on the ZT8902 computer) to either COM1 or COM2 of a host PC. Then run VSC on the host. The command line parameters for VSC are as follows:

VSC.EXE [/port] [/Bbaud] [/R] [/Wdelay][/Q] [/U] [/C] [/H] [/S] [/Kkey_scan_code]

Where the /port option indicates the serial port; COM1=1, COM2=2 of the host computer. The /Bbaud option indicates the baud rate. The possible baud rates are 115.2K, 57.6K, 38.4K, 19.2K, 9600, 4800, 2400, 1200, and 300 baud. The Tertiary Controller is configured to use a baud rate of 115.2K. Therefore, the host should also use 115.2K. The /R option is for hardware handshaking and should not be used. The /Wdelay is a communication delay and should not be used. The /Q option puts the host in "quiet mode" where the host does not sound a beep when a communications error occurs. The /Q option should not be used. The /U option uninstalls VSC. It is not necessary to use the /U option. The /C option preserves the cursor shape when switching screens. The /H option displays the on-line help for VSC. The /S option suspends execution when switching between screens. The /S option is not necessary. The /K option programs the hot key used to switch from one screen to another. The default is ALT-SPACE. The option for CTRL-ALT-SPACE is /KCA(39). More details about VSC and its optional parameters can be found in the "Ziatech Industrial Computer System Manual for BIOS Version 4". An example of the VSC command line that will work for the Tertiary Controller is given below. This example uses COM2 at 115.2KBaud and uses the CTRL-ALT-SPACE key sequence to switch screens.

vsc /2 /B9600 /KCA(39)

Once VSC is loaded, the host can be used as a terminal to the Tertiary Controller. The hot key (CTRL-ALT-SPACE) is used to switch between the screens of the two computers. When the Tertiary Controller screen is displayed, the A: and C: drives are mapped to the next available drive letters on the target. A message on the screen will indicate which drive letters they correspond to. These drives can be used in any DOS command as if they were local drives.


Configuration File

The configuration file is an ASCII text file that contains the information that the Tertiary Servo needs to initialize the system. This file must be called TERTIARY.CFG, and it must be in the directory that the Tertiary Controller Software is run. Typically, this would be the root of the P: drive.

The configuration file has a key word string on each line, followed by any number of spaces, an equal sign (=), any number of spaces, a value, and an optional comment. The keyword string must have the exact spelling as indicated below including only one space character between each word, but may have any combination of upper or lower case letters. Lines can also be either blank or contain comments. A pound sign (#) is used to eliminate the possibility of confusing a comment string with a similar keyword string. Although, it is not absolutely necessary.

The possible keyword strings (in bold) and their descriptions are given here:

 

photon base (hex)

The base address of the photon counters.

Photon<APD Number 1,2,3> scale (float)

The scale factor of the photon counters. You must enter one for each counter.

photon<APD Number 1,2,3> offset (float)

The offset of the photon counters. You must enter one for each counter.

Photon threshold (int)

Sets the threshold for activating the servo system. If the total number of photon counts for the averaging period drops below this number, then the servo will shut down and slew to the park position.

tau Itotal

Sets the time constant for the average total number of APD counts in seconds. This is a simple first order IIR filter. The average number of counts is used to determine if the Photon Threshold for guiding has been exceeded.

tau Variance

Sets the time constant for the X and Y variance computations in seconds. In addition to being useful indicators of the performance of the servo, the X and Y variance values are used by the Autotuning feature. If these values are too noisy, the Autotuning will stop prematurely. A typical value is 15 seconds.

tau Offset

Sets the time constant (in seconds) for the X and Y offset values which are used to offset the telescope so that it can track large motions of the star. Typical values are 5 - 30 seconds.

Gain Multiplier

Sets the gain multiplier used for each cycle of the autotuning algorithm. The recommended value is 2.0

Gain Direction

Sets the direction of the gain change. If the value is 1 then the gain will increase each time through the autotuning loop. If the value is -1, it will decrease. In the normal mode of operation, the gain will start at a very low value and increase each time through the loop.

Gain Lower Limit

Sets the lowest allowable value for the X and Y gain values. This limit is checked by the XGAIN and YGAIN commands as well as the autotuning software. Gain values less than this number will not be allowed and the gain will remain at the current value.

Gain Upper Limit

Sets the highest allowable value for the X and Y gain values. This limit is checked by the XGAIN and YGAIN commands as well as the autotuning software. Gain values greater than this number will not be allowed and the gain will remain at the current value.

Gain Start

Sets the starting gain for the autotuning algorithm. A typical starting value is 10.

Autotune Timer

Sets the number of milliseconds which the servo waits after performing a gain change before it checks the new X and Y variance values to see if the error has decreased. Typical values are 15000 - 30000. Note that this loop time should be similar to tau Variance value.

servo on <flag>

Switch to set the servo so that it is either off (0) or On (1) at startup.

diag in (int)

Diagnostic analog input flag used for testing. Indicates what the diagnostic analog input (chan 0 of VL-1297 Analog I/O board) will be used for. The possible values are: 0 = no input, 1 = x input command, 2 = y input command.

diag base (hex)

Indicates the base address of the VL-12297 Analog I/O board used for diagnostics.

diag in scale (float)

The input scale factor of the VL-1297 Analog I/O board used for diagnostics in volts/count. Typically, for a 16 bit A/D and +/-10 volt range, the scale factor would be 3.05176E-4.

diag in offset (float)

The input offset of the VL-1297 Analog I/O board used for diagnostics in volts. Typically, this value is zero.

diag out ch0 (int)

Diagnostic analog output flag for channel 0. Indicates which value will be output to channel 0 of the analog output (VL-1297 analog I/O board). The possible values are: 0 = no output, 1 = x position, 2 = y position, 3 = x error, 4 = y error, 5 = x PID output, 6 = y PID output.

diag out ch1 (int)

Diagnostic analog output flag for channel 1. Indicates which value will be output to channel 1 of the analog output (VL-1297 analog I/O board). The possible values are: 0 = no output, 1 = x position, 2 = y position, 3 = x error, 4 = y error, 5 = x PID output, 6 = y PID output.

diag out scale (float)

The output scale factor of the VL-1297 Analog I/O board used for diagnostic output in counts/volt. Typically, for a 12 bit D/A and +/-10 volt range, the scale factor would be 204.8.

diag out offset (float)

The output offset of the VL-1297 Analog I/O board used for diagnostics in volts. Typically, this value is zero.

Diag in gain (float)

Sets the input gain for the diagnostic input signal, typically set to 1

Diag out ch0 gain (float)

Sets the output gain for the diagnostic input signal, typically set to 1

Diag out ch1 gain (float)

Sets the output gain for the diagnostic input signal, typically set to 1

T (float)

The sample time or servo loop time in seconds.

X Kp (float)

The proportional constant of the PID compensation for the X axis. The PID Transfer Function is G(s) = Kp[ Ki/s + s Kd +1].

Y Kp (float)

The proportional constant of the PID compensation for the Y axis. The PID Transfer Function is G(s) = Kp[ Ki/s + s Kd +1].

X Ki (float)

The integral constant of the PID compensation for the X axis.

Y Ki (float)

The integral constant of the PID compensation for the Y axis.

X Kd (float)

The derivative constant of the PID compensation for the X axis.

Y Kd (float)

The derivative constant of the PID compensation for the Y axis.

X Integration Limit (float)

The limit of the integral part of the PID compensation for the X axis. If the integrator reaches the limit, it is set to zero.

Y Integration Limit (float)

The limit of the integral part of the PID compensation for the Y axis. If the integrator reaches the limit, it is set to zero.

X notch ch1 (int)

A switch to turn on and off notch filter 1 on the X axis. Possible values: 0 = off, 1 = Standard Notch Filters, 2 = Second Order Filters.

Y notch ch1 (int)

A switch to turn on and off notch filter 1 on the Y axis. Possible values: 0 = off, 1 = Standard Notch Filters, 2 = Second Order Filters.

X notch ch2 (int)

A switch to turn on and off notch filter 2 on the X axis. Possible values: 0 = off, 1 = Standard Notch Filters, 2 = Second Order Filters.

Y notch ch2 (int)

A switch to turn on and off notch filter 2 on the Y axis. Possible values: 0 = off, 1 = Standard Notch Filters, 2 = Second Order Filters.

X notch ch3 (int)

A switch to turn on and off notch filter 3 on the X axis. Possible values: 0 = off, 1 = Standard Notch Filters, 2 = Second Order Filters.

Y notch ch3 (int)

A switch to turn on and off notch filter 3 on the Y axis. Possible values: 0 = off, 1 = Standard Notch Filters, 2 = Second Order Filters.

X notch ch4 (int)

A switch to turn on and off notch filter 4 on the X axis. Possible values: 0 = off, 1 = Standard Notch Filters, 2 = Second Order Filters.

Y notch ch4 (int)

A switch to turn on and off notch filter 4 on the Y axis. Possible values: 0 = off, 1 = Standard Notch Filters, 2 = Second Order Filters.

X notch frequency ch1 (float)

The filter frequency ( OMEGA/[2 Pi] ) of notch filter 1 on the X axis (Hz). The form of the notch filter is G(s) = [s^2 + 2 ZETAn OMEGA + OMEGA^2] / [s^2 + 2 ZETAd OMEGA + OMEGA^2]

Y notch frequency ch1 (float)

The filter frequency (OMEGA/[2 Pi]) of notch filter 1 on the Y axis (Hz). The form of the notch filter is G(s) = [s^2 + 2 ZETAn OMEGA + OMEGA^2] / [s^2 + 2 ZETAd OMEGA + OMEGA^2]

X notch frequency ch2 (float)

The filter frequency (OMEGA/[2 Pi]) of notch filter 2 on the X axis (Hz). The form of the notch filter is G(s) = [s^2 + 2 ZETAn OMEGA + OMEGA^2] / [s^2 + 2 ZETAd OMEGA + OMEGA^2]

Y notch frequency ch2 (float)

The filter frequency (OMEGA/[2 Pi]) of notch filter 2 on the Y axis (Hz). The form of the notch filter is G(s) = [s^2 + 2 ZETAn OMEGA + OMEGA^2] / [s^2 + 2 ZETAd OMEGA + OMEGA^2]

X notch frequency ch3 (float)

The filter frequency (OMEGA/[2 Pi]) of notch filter 3 on the X axis (Hz). The form of the notch filter is G(s) = [s^2 + 2 ZETAn OMEGA + OMEGA^2] / [s^2 + 2 ZETAd OMEGA + OMEGA^2]

Y notch frequency ch3 (float)

The filter frequency (OMEGA/[2 Pi]) of notch filter 3 on the Y axis (Hz). The form of the notch filter is G(s) = [s^2 + 2 ZETAn OMEGA + OMEGA^2] / [s^2 + 2 ZETAd OMEGA + OMEGA^2]

X notch frequency ch4 (float)

The filter frequency (OMEGA/[2 Pi]) of notch filter 4 on the X axis (Hz). The form of the notch filter is G(s) = [s^2 + 2 ZETAn OMEGA + OMEGA^2] / [s^2 + 2 ZETAd OMEGA + OMEGA^2]

Y notch frequency ch4 (float)

The filter frequency (OMEGA/[2 Pi]) of notch filter 4 on the Y axis (Hz). The form of the notch filter is G(s) = [s^2 + 2 ZETAn OMEGA + OMEGA^2] / [s^2 + 2 ZETAd OMEGA + OMEGA^2]

X notch numerator damping ch1 (float)

The value of the numerator damping term (ZETAn) for notch filter 1 on the X axis. The form of the notch filter is G(s) = [s^2 + 2 ZETAn OMEGA + OMEGA^2] / [s^2 + 2 ZETAd OMEGA + OMEGA^2]

Y notch numerator damping ch1 (float)

The value of the numerator damping term (ZETAn) for notch filter 1 on the Y axis. The form of the notch filter is G(s) = [s^2 + 2 ZETAn OMEGA + OMEGA^2] / [s^2 + 2 ZETAd OMEGA + OMEGA^2]

X notch numerator damping ch2 (float)

The value of the numerator damping term (ZETAn) for notch filter 2 on the X axis. The form of the notch filter is G(s) = [s^2 + 2 ZETAn OMEGA + OMEGA^2] / [s^2 + 2 ZETAd OMEGA + OMEGA^2]

Y notch numerator damping ch2 (float)

The value of the numerator damping term (ZETAn) for notch filter 2 on the Y axis. The form of the notch filter is G(s) = [s^2 + 2 ZETAn OMEGA + OMEGA^2] / [s^2 + 2 ZETAd OMEGA + OMEGA^2]

X notch numerator damping ch3 (float)

The value of the numerator damping term (ZETAn) for notch filter 3 on the X axis. The form of the notch filter is G(s) = [s^2 + 2 ZETAn OMEGA + OMEGA^2] / [s^2 + 2 ZETAd OMEGA + OMEGA^2]

Y notch numerator damping ch3 (float)

The value of the numerator damping term (ZETAn) for notch filter 3 on the Y axis. The form of the notch filter is G(s) = [s^2 + 2 ZETAn OMEGA + OMEGA^2] / [s^2 + 2 ZETAd OMEGA + OMEGA^2]

X notch numerator damping ch4 (float)

The value of the numerator damping term (ZETAn) for notch filter 4 on the X axis. The form of the notch filter is G(s) = [s^2 + 2 ZETAn OMEGA + OMEGA^2] / [s^2 + 2 ZETAd OMEGA + OMEGA^2]

Y notch numerator damping ch4 (float)

The value of the numerator damping term (ZETAn) for notch filter 4 on the Y axis. The form of the notch filter is G(s) = [s^2 + 2 ZETAn OMEGA + OMEGA^2] / [s^2 + 2 ZETAd OMEGA + OMEGA^2]

X notch denominator damping ch1 (float)

The value of the denominator damping term (ZETAd) for notch filter 1 on the X axis. The form of the notch filter is G(s) = [s^2 + 2 ZETAn OMEGA + OMEGA^2] / [s^2 + 2 ZETAd OMEGA + OMEGA^2]

Y notch denominator damping ch1 (float)

The value of the denominator damping term (ZETAd) for notch filter 1 on the Y axis. The form of the notch filter is G(s) = [s^2 + 2 ZETAn OMEGA + OMEGA^2] / [s^2 + 2 ZETAd OMEGA + OMEGA^2]

X notch denominator damping ch2 (float)

The value of the denominator damping term (ZETAd) for notch filter 2 on the X axis. The form of the notch filter is G(s) = [s^2 + 2 ZETAn OMEGA + OMEGA^2] / [s^2 + 2 ZETAd OMEGA + OMEGA^2]

Y notch denominator damping ch2 (float)

The value of the denominator damping term (ZETAd) for notch filter 2 on the Y axis. The form of the notch filter is G(s) = [s^2 + 2 ZETAn OMEGA + OMEGA^2] / [s^2 + 2 ZETAd OMEGA + OMEGA^2]

X notch denominator damping ch3 (float)

The value of the denominator damping term (ZETAd) for notch filter 3 on the X axis. The form of the notch filter is G(s) = [s^2 + 2 ZETAn OMEGA + OMEGA^2] / [s^2 + 2 ZETAd OMEGA + OMEGA^2]

Y notch denominator damping ch3 (float)

The value of the denominator damping term (ZETAd) for notch filter 3 on the Y axis. The form of the notch filter is G(s) = [s^2 + 2 ZETAn OMEGA + OMEGA^2] / [s^2 + 2 ZETAd OMEGA + OMEGA^2]

X notch denominator damping ch4 (float)

The value of the denominator damping term (ZETAd) for notch filter 4 on the X axis. The form of the notch filter is G(s) = [s^2 + 2 ZETAn OMEGA + OMEGA^2] / [s^2 + 2 ZETAd OMEGA + OMEGA^2]

Y notch denominator damping ch4 (float)

The value of the denominator damping term (ZETAd) for notch filter 4 on the Y axis. The form of the notch filter is G(s) = [s^2 + 2 ZETAn OMEGA + OMEGA^2] / [s^2 + 2 ZETAd OMEGA + OMEGA^2]

The following are the coefficients for the Second Order System filters. There are 4 filters available in each of the x and y axes.

SOS X1 b0 (float)

SOS X1 b1 (float)

SOS X1 b2 (float)

SOS X1 a0 (float)

SOS X1 a1 (float)

 

SOS X2 b0 (float)

SOS X2 b1 (float)

SOS X2 b2 (float)

SOS X2 a0 (float)

SOS X2 a1 (float)

 

SOS X3 b0 (float)

SOS X3 b1 (float)

SOS X3 b2 (float)

SOS X3 a0 (float)

SOS X3 a1 (float)

 

SOS X4 b0 (float)

SOS X4 b1 (float)

SOS X4 b2 (float)

SOS X4 a0 (float)

SOS X4 a1 (float)

 

SOS Y1 b0 (float)

SOS Y1 b1 (float)

SOS Y1 b2 (float)

SOS Y1 a0 (float)

SOS Y1 a1 (float)

 

SOS Y2 b0 (float)

SOS Y2 b1 (float)

SOS Y2 b2 (float)

SOS Y2 a0 (float)

SOS Y2 a1 (float)

 

SOS Y3 b0 (float)

SOS Y3 b1 (float)

SOS Y3 b2 (float)

SOS Y3 a0 (float)

SOS Y3 a1 (float)

 

SOS Y4 b0 (float)

SOS Y4 b1 (float)

SOS Y4 b2 (float)

SOS Y4 a0 (float)

SOS Y4 a1 (float)

analog base (hex)

The base address of the VL-1297 analog I/O board that is used for the analog output that drives the PZT actuators.

output scale (float)

The output scale factor of the VL-1297 Analog I/O board used for the output that drives the PZT actuators in counts/volt. Typically, for a 12 bit D/A and +/-10 volt range, the scale factor would be 204.8.

output offset (float)

The output offset of the VL-1297 Analog I/O board used for the output that drives the PZT actuators in counts/volt. Typically, this value is zero.

output min limit (float)

The output limit of the VL-1297 Analog I/O board used for the output that drives the PZT actuators in volts. Typically, this value is -9 for a D/A range of +/-9 volts.

output max limit (float)

The output limit of the VL-1297 Analog I/O board used for the output that drives the PZT actuators in volts. Typically, this value is 9 for a D/A range of +/-9 volts.

input scale (float)

The input scale factor of the VL-1297 Analog I/O board used for reading the photodiodes (volts/count). Typically, for a 16 bit A/D and +/-10 volt range, the scale factor would be 3.05176E-4.

input offset (float)

The input offset of the VL-1297 Analog I/O board used for reading the photodiodes (volts). Typically, this value is zero

x park pos (float)

X axis mirror park position in volts. This should be set to 5 volts for normal operation

y park pos (float)

Y axis mirror park position in volts. This should be set to 5 volts for normal operation

park accel (float)

Acceleration used to reach the park position in Volts/sec^2. Typically set to 1.0

 


Setup and Operation

Setup System

At the present time, we are still running the tertiary servo what should be referred to as a diagnostic mode. Once we have some more experience with the system we should be able to make the operation of the servo much simpler, eliminating the need for the oscilloscope and the virtual system console. In the current mode of operation, these items provide needed feedback about the operation and stability of the servos.

Connect and setup electronics
  1. Connect the round black connector on the Primary Mirror side of the HRCam body. This connector provides power to the avalanche photodiode detectors.
  2. Turn on the instrument power at the on the panels on the side of the telescope (the right hand panels when looking at the right side of the fork. WARNING: These two steps should only be done when the tertiary power is off at the main control panel to avoid damaging the APD's
  3. The next step is to connect the portable PC to the Virtual System Console Fiber Optic Modem in the control room.
  4. Turn on the Instrument and Tertiary power on the main power control panel.
  5. Insert the Virtual System Console boot disk in the portable PC
  6. Boot the portable PC and the press <cntrl><alt><space> simultaneously. This will switch the screen so that it now becomes the console for the tertiary controller.
  7. Turn on the tertiary servo star position display Oscilloscope located next to the jupiter workstation.
Operation

We are now ready to operate the servo. There are two things which are important to remember. First, the APD's are easily damaged by exposing them to too much light. Make sure that the servo is OFF before you slew the telescope. Secondly, the servo should be either off or idle if you are not locking on an object. It is not a good idea to leave the servo running with no input signal, or while you are trying to center a star.

  1. Start the TOI and initialize the axes. Turn on the instrument rotator.
  2. Slew to the object you wish to observe. Take a quick image to make sure that the object is in the field.
  3. Open the high resolution camera control window and turn on the APD's. This causes the tertiary mirror to ramp to the center of its travel. It also turns on the APD's and starts the centroid computations.
  4. Position the guide star on the pickoff mirror so that it is well centered. Check the number of counts on each detector. If the number of counts is greater than 13,000 on any one detector, turn the servo off immediately. The maximum number of counts the APD's can sense safely is 15,000 (15 MHz).
  5. If average total number of counts is too low, the servo will not operate. We believe that this lower limit is about 10 photoelectrons/millisecond. There is a settable parameter in the configuration file which will shut of servo tracking when counts are below a preset threshold. This prevents the tertiary mirror from being given random, and possibly damaging signals.
  6. Once you have determined that the number of counts is in the correct range, look at the display on the oscilloscope. You should see the star position bouncing around wildly. It may appear to be confined to a triangular region, this is an artifact of the trident detector. The average spot position will probably be off the center of the scope.
  7. You are now ready to issue the servo lock command from the TOI. When this command is issued, the average location of the spot should be pulled to the center. If the pattern looks anything other than random, then the servo may be oscillating and should be shut down.
  8. Congratulations, you are locked on the star. You can take an image.
Shutdown

Please follow these instructions for shutdown to avoid damaging the APD detectors or the Tertiary Mirror PZT actuators.

  1. When you are done using the tertiary servo issue the APD OFF command from the HRCam control window, this causes the TOI to issue the SERVO OFF command to the tertiary servo controller.
  2. When the APD OFF command is issued, the PZT drive voltage (visible on the VSC) should slowly ramp to zero.
  3. Once the PZT drive voltage ramps to zero, the power to the tertiary system can be shut off. If you do not wait for the voltages to ramp to zero the PZT drivers will "PING" the tertiary mirror with a sudden motion. This is not good for the mirror or the PZT's.
  4. Note that to avoid damaging the APD's, the APD ON command (SERVO ON) should never be issued unless it is dark (or the observatory is closed and the lights are off). If you need to perform testing on the tertiary servo while it is still light, unplug the APD power supply connector.

Commands

Commands can be issued to the Tertiary controller through serial port COM2 which is located on connector J7 of the ZT8902 computer. This interface was designed to be used by the camera controller as well as any serial communications terminal emulator such as Procomm. The communications parameters should be set to 9600 Baud, No parity, 8 data bits, 1 stop bit, and no handshaking. Characters are not echoed back to the host computer, so the communications software must be set up to echo characters locally. A null modem adapter must be used when communicating between two computers. The commands and responses are plain ASCII text followed by a carriage return (CR) and an optional line feed (LF) character. If a command is sent to the Tertiary Controller that is not recognized, the message "BAD COMMAND" is returned to the host. For every recognized command that is received, the command string is returned with an "OK" appended to it. If the command returns information than the "<command> OK" echo will be returned after the information is sent. This allows the "<command> OK" echo to be used by the TOI as an end of information marker.

The following are the commands (in bold) that the Tertiary Controller can accept, and the possible responses.

NOTE: each value that requires or returns a numeric value shows the 'C' format specified used to read or write the value.

SERVO ON

Turns the servo processing on in the idle state (see SERVO IDLE and SERVO RUN). The mirror is ramped to the x and y axis park positions. This command should be issued when preparing to use the tertiary servo but before the star is placed on the pickoff mirror.

The Tertiary Controller starts up with the servo off by default.

SERVO OFF

Turns the servo processing off and zeroes out the D/A converters for the PZT drives.

SERVO RUN

Enables the PID computations and completes the servo loop. This command should be issued once the guide star is on the pickoff mirror.

SERVO IDLE

In this state, the star position computations are performed but no signals are sent to the actuators except to ramp them to their park positions (usually in the center of their travel range). This is the default state at startup. Since the star positions are computed, the diagnostic outputs can be used to monitor the star position and the counts on the detectors as reported by the STATUS command or on a VSC monitor can be used as an indicator of star intensity.

When the SERVO IDLE command is given, the actuator signals are slowly ramped to their park positions and the PID servo parameters are reset to zero.

This command should be issued when you want to stop guiding on one star and slew to another.

STATUS

Returns:

I1=[photodiode #1 reading (%lf)]

I2=[photodiode #2 reading (%lf)]

I3=[photodiode #3 reading (%lf)]

Itotal=[Time Averaged Total of all three APD readings (%lf) ]

Xout=[output drive signal (volts) (%lf)]

Yout=[output drive signal (volts) (%lf)]

Xrms=[time averaged x-rms error signal (%lf)]

Yrms=[time averaged y-rms error signal (%lf)]

XGAIN=[X gain setting (%lf)]

YGAIN=[Y gain setting (%lf)]

PARAMETERS

Returns various system parameters. This is used for diagnostic purposes only and the returned information may change without notice.

ROT_EL_ANGLE <Rotator - Elevation axis angle (%lf)>

Tells the servo the angle between the rotator and the elevation axis. This number is needed to properly transform the coordinate system of the detector to the coordinate system of the tertiary mirror actuators. The angle is in degrees.

XGAIN [gain (%lf)]

Used to set the gain of the servo for the x-axis. The initial value for this parameter is set from the X Kp value from the configuration file. If the command XGAIN is followed by a number, this number is used as the gain for the servo. The values for XGAIN are restricted between 0.5 and 2000. Values outside of this range will return the error "XGAIN out of range". If the XGAIN command is given without the parameter, the command is treated as a query and the current value of the gain is returned in the following format:

XGAIN= <value (%lf)>

YGAIN [gain (%lf)]

Used to set the gain of the servo for the y-axis. The initial value for this parameter is set from the Y Kp value from the configuration file. If the command YGAIN is followed by a number, this number is used as the gain for the servo. The values for YGAIN are restricted between 0.5 and 2000. Values outside of this range will return the error "YGAIN out of range". If the YGAIN command is given without the parameter, the command is treated as a query and the current value of the gain is returned in the following format:

YGAIN= <value (%lf)>

AUTOTUNE START

Starts the auto tuning process. The gains for both axes are set to the Gain Start value specified in the configuration file. The auto tuner then waits Autotune Timer servo loops and records the X and Y variance values. The gain of both axes is then increased by multiplying the current gain by the Gain Multiplier value (if Gain Direction is +1 or dividing if Gain Direction is -1). The software then waits another Autotune Timer servo loops and checks the X and Y variance values again. If the new variance values are less than the old variance values the gain is increased (decreased) again. This loop is repeated independently for each axis until the variance increases. Once the variance increases, the auto tuning stops and the gain is reset to the previous value. Note that the axes are tuned simultaneously, but independently so it is possible, and very likely, that the two axes will end up with different gain values.

The Virtual System Console will display the X and Y gain values on the line following the X and Y variance values. If tuning is in process for an axis, the gain value will be followed by a "Tuning" indicator.

This command can be issued at any time. If the servo is locked, the gains will immediately be set to the starting value and the auto tuning process will begin. If the command is issued while in the idle mode, the gain values will be set to the starting values and the auto tuning process will begin as soon as the SERVO RUN command is given.

AUTOTUNE STOP

This command will stop the auto tuning process and leave the gains at their current values.

AUTOTUNE DEFAULT

Resets all of the servo parameters to the default values set in the configuration file.

AUTOTUNE RESET

Sets the servo parameters to the starting values set in the configuration file.