Auto Alignment Script

This page explains the automatic alignment script. It resides in /cvs/cds/kami/scripts/AutoAlignment/

Working Principle

The dither alignment technique uses a sinusoidal signal to move a mirror in pitch or yaw. By demodulating the transmitted power signal at the same frequency as the excitation signal, we can obtain an error signal of misalignment.

Implementation

There are three parties involved in the dither alignment. The first one is the realtime code, which does the excitation and demodulation. Then the demodulated signal is read by a python script called DitherAlignment.py. This script feedback the error signal to corresponding Picomotors by writing appropriate values to EPICS PVs which are monitored by pmepics.py. The daemon script pmepics.py is responsible to drive Picomotors according to the values of the EPICS PVs reserved for Picomotors.

AIS realtime code

AIS is an acronym for Alignment Initialization System.
AIS_MEDM.png
The current AIS is in a very primitive state, but does a job well.

There is a sin-cos signal generator at the top left. This signal goes out from the DAC to be injected to a pitch or yaw actuator of an optics. The signal is also used as a LO for demodulators. Signals from a QPD are filtered for line removal and AC coupling. The demodulated signal is filtered by a LPF and a comb filter of 10Hz harmonics.

The alignment script (DitherAlignment.py obtains the error signal by reading an EPICS channel, such as K1:CTR-AIS_TRX_DEMOD_OUT.

Usage of the alignment script

First, you have to make sure that the EPICS-PicoMotor system is properly running. See CLIO/Technicals/PMEPICS for details. Then invoke DitherAlignment.py with an appropriate options. Run it with option -h to see available options.

Example:

DitherAlignment.py --freq 5 --excGain 10.0 -fbGain -0.01 --readBackChan "K1:CTR-AIS_TRX_DEMOD_OUTPUT" --feedBackChan "K1:PICO-MC_END_PIT"

This will read K1:CTR-AIS_TRX_DEMOD_OUTPUT as the error signal and feed it back to K1:PICO-MC_END_PIT

Operation details of DitherAlignment.py

This script does discrete proportional feedback control. First it reads a value from the readback channel. Then multiplies it with the feedback gain. This number (rounded) is set as the speed of the Picomotor. Then the Picomotor is moved for 0.5 sec or a duration specified by --fbDuration option. The script pauses for 2 second to wait for the mirror to settle. This duration can be over-ridden by option --fbWait. After the pause, the error signal is read again and the next feedback iteration starts.

The pause duration is doubled when the error signal gets smaller than 20 or the value specified by --slowDownLevel. The feedback finishes when the error signal gets smaller than the value specified by --successCond (defaults to 2.0) or time out happens. --timeout controls the time out length.