I debugged the ISS_AC_COUPLED state with the IMC only. It seems to be doing what it promises now, but we haven't tried it in full lock. It required quite the dance for making sure the two AC coupling loops don't fight each other.
It is in SVN. Below is source code.
class ISS_AC_COUPLED(GuardState):
index=58
request =True
@ISC_library.assert_dof_locked_gen(['IMC'])
@ISC_library.gen_check_WFS_DC(['IMC'])
@ISC_library.iss_checker
def main(self):
ezca['PSL-ISS_SECONDLOOP_AC_COUPLING_SERVO_TRAMP'] = 0
# make sure 3rd loop is off
ezca['PSL-ISS_THIRDLOOP_SERVO_GAIN'] = 0
# turn off boosts
ezca.write('PSL-ISS_SECONDLOOP_BOOST_2',0)
time.sleep(0.1)
ezca.write('PSL-ISS_SECONDLOOP_BOOST_1',0)
time.sleep(0.1)
# set the AC coupling gain to 0
ezca['PSL-ISS_SECONDLOOP_AC_COUPLING_SERVO_GAIN'] = 0
ezca['PSL-ISS_SECONDLOOP_AC_COUPLING_INT_OFFSET'] = 0
# turn on 1Hz AC couplinf of AC coupling to deal with offset
ezca.switch('PSL-ISS_SECONDLOOP_AC_COUPLING_SERVO', 'FM6', 'ON')
# smoothly relief the Reference Integrator
ezca['PSL-ISS_SECONDLOOP_REFERENCE_SERVO_OFFSET'] = 0
ezca.switch('PSL-ISS_SECONDLOOP_REFERENCE_SERVO', 'INPUT', 'OFF')
self.timer['pause'] = 15
self.counter = 0
@ISC_library.assert_dof_locked_gen(['IMC'])
@ISC_library.gen_check_WFS_DC(['IMC'])
@ISC_library.iss_checker
def run(self):
# run the fault check function, which prints fault
# notificaitons, but don't do anything since we don't want to
# break lock unnecessarily.
ISC_library.PSL_ready()
if self.counter == 0 and self.timer['pause']:
# set up TRAMP for AC coupling
ezca['PSL-ISS_SECONDLOOP_AC_COUPLING_SERVO_TRAMP'] = 3
# turn on INPUT coupling to initialize the AC coupling FM6
ezca.switch('PSL-ISS_SECONDLOOP_AC_COUPLING_SERVO', 'INPUT', 'ON')
# and start the servo for the OFFSET and reference integrator
ezca['PSL-ISS_SECONDLOOP_AC_COUPLING_INT_OFSEN'] = 1
ezca.switch('PSL-ISS_SECONDLOOP_REFERENCE_SERVO', 'OFFSET', 'ON')
self.timer['pause'] = 10
self.counter += 1
if self.counter == 1:
ezca['PSL-ISS_SECONDLOOP_AC_COUPLING_INT_OFFSET']=(ezca['PSL-ISS_SECONDLOOP_AC_COUPLING_DRIVE_OUT16'] - ezca['PSL-ISS_SECONDLOOP_AC_COUPLING_OUTPUT'])/5000.0
ezca['PSL-ISS_SECONDLOOP_REFERENCE_SERVO_OFFSET']=(ezca['PSL-ISS_SECONDLOOP_REFERENCE_SERVO_OUTPUT'] )/100000.0
if abs(ezca['PSL-ISS_SECONDLOOP_AC_COUPLING_DRIVE_OUT16'] - ezca['PSL-ISS_SECONDLOOP_AC_COUPLING_DRIVE_INMON']) < 1.0:
if abs(ezca['PSL-ISS_SECONDLOOP_REFERENCE_SERVO_OUTPUT']) < 1e-3:
ezca.switch('PSL-ISS_SECONDLOOP_AC_COUPLING_DRIVE', 'HOLD', 'OFF')
ezca['PSL-ISS_SECONDLOOP_AC_COUPLING_INT_OFSEN'] = 0
ezca['PSL-ISS_SECONDLOOP_AC_COUPLING_INT_OFFSET'] = 0
ezca.switch('PSL-ISS_SECONDLOOP_REFERENCE_SERVO', 'OFFSET', 'OFF')
ezca['PSL-ISS_SECONDLOOP_REFERENCE_SERVO_OFFSET'] = 0
self.counter += 1
if self.counter == 2 and self.timer['pause']:
ezca['PSL-ISS_SECONDLOOP_AC_COUPLING_SERVO_GAIN'] = -0.3
self.timer['pause'] = ezca['PSL-ISS_SECONDLOOP_AC_COUPLING_SERVO_TRAMP'] + 3
self.counter += 1
if self.counter == 3 and self.timer['pause']:
ezca.switch('PSL-ISS_SECONDLOOP_AC_COUPLING_SERVO', 'FM6', 'OFF')
self.timer['pause'] = 20
self.counter += 1
if self.counter == 4 and self.timer['pause']:
ezca.switch('PSL-ISS_SECONDLOOP_REFERENCE_SERVO', 'INPUT', 'ON')
self.counter += 1
if self.counter == 5:
return True