Virgo Logbook
UTC--:--:--
GPS-
Reports
AdV-COM›automation #35984

Metatron update

Today we finished all the planned changes for the Metatron nodes and code; we list here all the changes, regarding all the Metatron nodes affected


SUS

The following changes have been introduced on the SUS* nodes:

  • SUS_PR.py is not anymore a specific implementation but is now identical to all the other SUS* nodes by only importing the contents of SUS.py;
  • A setOPTIC(optic) function has been introduced in SUS.py and it is called just after the "from SUS import *" on every SUS_*.py file. This is to avoid the error raised by SYSTEM  being undefined at documentation generation time (via make html);
  • The @handle_exceptions decorator has substituted the try/except sections;
  • The ALIGN* and MISALIGN* states have been made consistent by using in both cases the sequence:
    1. The delta between the desired position on the .ini file and the current position of the mirrors (from optical levers) is calculated;
    2. The new DSP setpoint is calculated by adding the delta to the current DSP setting;
    3. The new setpoint is applied to the DSP
  • Correspondingly all SUS*.ini files have been updated by leaving only the entries:
    • xx_mar_tx_misalign
    • xx_mar_ty_misalign
    • xx_mar_tx_align
    • xx_mar_ty_align
  • So, currently, the SUS*.ini files only contains references to the actual positions of the mirrors (as from optical lever channels on the DAQ) and no more references to the corresponding DSP setpoint (which may differ).

Overall tests have been made this morning by stopping all nodes, restarting them (and thus have them all in state INIT) and then bring the ITF_LOCK node to LOCKED_RECOMBINED (several times, including also the FmodERR tuning sequence).


ALL *_LOCK nodes, with the exception of OMC_LOCK

  • all nodes are now properly documented, replacing comments with docstrings wherever needed, allowing the autogenerated documentation to be complete and up to date;
  • all nodes use the decorators provided by META_library.py for the management of stalled nodes, Python exceptions, etc...The try/except blocks have been removed and are not needed anymore for these purposes;
  • the Acl photodiodes servers have been added and are handled like the LSC process, using the Acl/Python interface; they are needed solely for the purpose of demodulation phases' adjustments;
  • the additional 'root' logging level has been removed, as it was instantiated but not used;
  • any node does NOTHING in the DOWN state: this means that if you want to use some node 'by hand', just put its manager to DOWN and you should be able to use it; if you can't, please report the issue;
  • all these nodes have now a common and standardized numbering scheme for the state indexes, which is the following:
INDEX STATE TYPE
0 INIT
1 DOWN
2, .... 9 (MIS)ALIGNING
10, 11 reserved
12, ... 19 (MIS)ALIGNED
20, ... 39 ACQUIRE
40, ... 59 LOCKING
60, ... 79 LOCKED

The corresponding ensembles {ALIGNING, ALIGNED} and {ACQUIRE, LOCKING, LOCKED} have the last digit in common; this should be hopefully helpful for anyone who will go index-hunting on the DAQ.

  • For the same reason of helping people looking at states by quering names with scripts, every suitable state has now the corresponding prefix in its name (e.g, LOCKED_ON_B7_BOOST_ON), and the corresponding error signal/photodiode used for the purpose in its name as well (e.g., LOCKED_HF_B1p_B4_BROAD)
  • the .ini configuration files are loaded and read ONLY in the ACQUIRE state and not in multiple random places;
  • with the exception of trivial '0' and '1', ALL PARAMETERS and NUMBERS have been MOVED TO CONFIGURATION FILES;

NARM_LOCK / WARM_LOCK

These nodes are mostly unchanged, apart from the common changes and the following:

  • we added the states (MIS)ALIGNED_NORTH_END and (MIS)ALIGNED_NORTH_ARM (with their own transient -ING states, and the same applies to the WEST arm node), with the purpose of automating the PRNI/PRWI/CITF configurations (more info on those later in this entry); note that the (MIS)ALIGNED_NORTH_END state effectively realigns the Input Mirror;

MICH_LOCK

This node has the same structure as before, but the mess of configurations and configuration names has been polished as far as possible. Not all the configurations have been tested, but the few ones that we are currently using; in any case, the logic for the configurations is exactly the same, so failures will have to be cured updating only the parameters, as probably the ITF conditions have changed in the meantime (threshold, phases, etc..); all the gains have been renormalized w.r.t. the new Beam Splitter magnets & coils.

In particular, the mid-fringe configuration we are using now is the LOCKED_HF_B1p_B4_BROAD state.

Some paths have been kept but deactivated (using the request=False directive in the state class), because they haven't been used in a long time, and because the maximum number of states which fit in the drop-down menu of the Metamedm screen is 15...


CARM_DARM_LOCK

This is the first new node we introduced; this node manages NARM_LOCK and WARM_LOCK, so unless you want to do unusual stuff, you should be able to just use this one; the starting point for this node was all the CARM/DARM stuff in ITF_LOCK, but there are new features:

  • you can lock one arm, or both, and move from the former to the latter without losing the pre-existing lock; the state request for the lock of the arms is done with the B7/B8 signals with Boost on, as this is the standard configuration we use;
  • this node reads its own configuration file, and the ones of the single arm nodes: this is because the NArm and WArm loop gains are used to combine the signals for CARM/DARM; so the need of updating such vales in different places is gone, and an update of the single arm .ini file will be enough;
  • the Drift Control is automatically turned on whenever one or both arms are requested to lock;
  • we added the MISALIGNED_END_MIRRORS, MISALIGNED_ALL_BUT_NI, MISALIGNED_ALL_BUT_WI states (and -ING transients) to ease the automation of PRNI/PRWI/CITF from ITF_LOCK; these states do nothing but request the corresponding new states to NARM_LOCK and WARM_LOCK;
  • the machine can bounce back and forth from LOCKING_ARMS and LOCKED_ARMS without killing the lock of one surviving arm;
  • the basis change from [NArm,Warm] to [CARM,DARM] and back seems a little smoother, due to some tuning of the cm commands' timing and ramptimes;
  • the CARM_TO_MC path lies (obviously) in this node, with two possible configurations: B4_Q and B4_I_NORM; the latter, which is the one we use, is the one that is requested from ITF_LOCK; the CARM_MC_SET offset is not read anymore from the configuration file, but is computed and removed online during the lock and written back on the configuration file, in case of need;
  • we kept the CARM_SLOW path and also a semi-dummy hand-off path for DARM, in the hope of not using the former ever again, and using the latter as soon as possible...
  • this new DARM path and the CARM_TO_MC path can be chosen in both orders.

PRCL_LOCK

This is the second new node we added, which handles the lock of the PRCL degree of freedom; features:

  • this node manages the SUS_PR node;
  • it has a MISALIGNED_PRM state, which is requested by ITF_LOCK during the lock of the arm cavities; this state lies on its own path;
  • the analogous ALIGNED_PRM state is on the path for locking the PRNI/PRWI/CITF configurations; when ALIGNING_PRM, the Drift Control is automatically turned off;
  • the PRNI/PRWI configurations are the same "PRX" path; it's ITF_LOCK that requests the needed mirrors to align/misalign;
  • the "CITF" and "PRITF" paths are the ones needed for such configurations, but remember that this node handles only the PRCL DOF;
  • in particular, the CITF_DF configuration is the one described some time ago in the Wiki, which is the one using B4_12MHz_I as trigger channel; I chose to implement this configuration as it will allow to lock on both carrier and sidebands just by modifying the .ini file of this section, without the need of implementing new logic or even new states in this node; the same applies to the correspoding paths in MICH_LOCK;
  • in order to avoid having every path to collapse into a single state in different times of its sequence, and since the diversity of those configurations, the realignment of the PR mirror is done within the "PRITF" paths, without going through the ALIGNED_PRM state; the Drift Control is turned off at the same time as the request for the PR mirror, like in the standalone state;
  • the misalignment of the PR mirror is requested by ITF_LOCK at the beginning of its own sequence;
  • there is one special edgeless state in PRCL_LOCK, which is PRCL_LOCKLOSS. This is a 'waiting room' before going to DOWN, which is not used internally but is requested by ITF_LOCK during the main PRITF path: if we lose PRCL lock, nothing special happens and PRCL_LOCK starts over from ACQUIRE_*; but if we lose everything during the realignment of PR and every node must go to DOWN, PRCL_LOCK goes here instead, where we check that the PR mirror has finished its movement before requesting another one, and then we "jump" to DOWN safely. In this way we avoid that SUS_PR node computes unreal and possibly dangerous deltas between DAQ and DSP with the result of kicking the PR mirror in random positions; this is helpful also foreseeing auto-relocking capabilities. In any case, this state turns off PRCL loop and actuation as the DOWN state does.

ITF_LOCK

The main node has been somewhat simplified, and now really relies on managed nodes:

  • the node manages INJ_MAIN, CARM_DARM_LOCK, MICH_LOCK and PRCL_LOCK;
  • this is the only node where the main LSC.ENABLE switch is turned on/off;
  • the DOWN state asks all the DOF nodes to go to DOWN themselves; after that it doesn't steal the nodes back and you can use the managed nodes by hand;
  • as a general rule, in the case of some lockloss we tried to fall back to the last good place instead of blindly going back to DOWN: for example, if MICH and PRCL are lost, but CARM/DARM survive , there is no need of starting back from scratch, but we can try to resume mid-way;
  • the LOCKING_ARMS state requests the CARM_DARM_LOCK node to lock the arms, MICH to stay in DOWN and PRCL to misalign the PR, unless the PRCL_LOCKLOSS situation described above; in this case the node awaits the PRCL_LOCK node to jump outside PRCL_LOCKLOSS, and then the PRM gets misaligned;
  • as anticipated, the LOCKED_RECOMBINED is the new, proper name for the old STEP3 (NArm + WArm + MICH@HF with B1pB4 Diff over Sum);
  • the LOCKING_RECOMBINED state has the same failsafe for the PR mirror as LOCKING_ARMS: this is because no node can discriminate in which basis the arms are locked so, if we lose only MICH and PRCL during the realignment of PR, we fall back here and we ask again the PR mirror to misalign; this is complementary to bullet #3;
  • the CARM_TO_MC and the PRITF_HF paths both begin after LOCK_CARM_DARM, but are independent one from the other; nothing special happens on the CARM_TO_MC path, only state requests to the CARM_DARM_LOCK node;
  • the PRITF_HF path is a little bit different, given also the novelty of the configuration: it is the only place in this node where we actually do something other than state requests to managed nodes: during the LOCKING_PRITF_HF state the MICH_GAIN and MICH_SET are adjusted to reflect the different ITF status; when we will move towards dark fringe, the next-to-be-written states will be the place where to change these parameters again, rather than the MICH_LOCK node;
  • the LOCKED_PRNI, LOCKED_PRWI and LOCKED_CITF_DF states just request the corresponding state to the managed nodes, without doing anything on their own.

 

We tested extensively all the modifications and new features and found no particular problems regarding Metatron itself. The real ITF configurations that we tested (multiple times) are:

  • PRNI / PRWI: work fine, no issues;
  • CITF: no issues from the points of view of Metatron, but I didn't manage to get the lock because of different ITF conditions; this "2f" configuration may need some adjustments w.r.t. the last time it was used (before the BS upgrade and several retunings of telescopes); will check first by hand ASAP.
  • CARM_TO_MC: works fine, no issues;
  • PRITF_HF: works fine, no issues.

You can find a scheme of the new node hierarchy in Figure 1, while in the attached file there are the state graphs for each node in its current state.

Both the old and the new Metatron userapps have been saved in the SVN and tagged as v1r0 and v2r0 respectively.

2 comments

narnaud · 9 Jan 2017 · 15:12 #35995

The scripts generating the Metatron documentation have been updated to take into account the Python modules which have been added by Diego and Franco.

The status DAQ channels have been updated as well to incorporate the changes in the Metatron node states and indices. The CARM_DARM and PRCL status channels have been added to the existing ones:

V1:DQ_META_STATUS_BS
V1:DQ_META_STATUS_CARM_DARM
V1:DQ_META_STATUS_ITF
V1:DQ_META_STATUS_MICH
V1:DQ_META_STATUS_NARM
V1:DQ_META_STATUS_NE
V1:DQ_META_STATUS_NI
V1:DQ_META_STATUS_PR
V1:DQ_META_STATUS_PRCL
V1:DQ_META_STATUS_WARM
V1:DQ_META_STATUS_WE
V1:DQ_META_STATUS_WI
 

carbognani, ruggi, majorana, sorrentino · 3 Apr 2017 · 22:56 #37136
The Logic of SUS nodes has been updated in order to introduce the possibility to misalign not to an absolute position but using a delta applied to the curent DSP setting. This new behavior is triggered if inside the .ini file the *_misalign parameters are absent and at their place the two delta values tx_delta and ty_delta are present. During MISALIGNING the delta is added and during ALIGNING the delta is subtracted (only if it was added before). This has been applied for the PR suspension by setting in the ini file: pr_mar_tx_delta = 0.0 pr_mar_ty_delta = -60.0 Tests have been made by driving the SUS_PR nodes among its different states and confirming the correct behavior. It has also been checked for the SUS_NI node that the standard behavior is unchanged. After this we have tried several dark fringe lock attempts without problem.