We have continued with the work on the refinement of the Guided Lock algorithm. Last shift we had managed to implement the part of the impulses (see entry 35097) and this shift we finished the lock algorithm by adding the linear lock when a sufficiently slow peak passes. After some code/computing?? problems when restarting the LSC_Acl process we managed to finish the code. Figure 1 shows one lock of the cavity. In detail the algorithm works as it follows:
- When the transmitted power (B8_DC) is higher than 10% of Pmax (Power when locked ~0.36 mW) a counter starts in order to know how many samples have passed (LSC_WArm_GL_COUNT). When B8_DC arrives to the 40% of Pmax, the counter stops and the algorithm calculates to which velocity corresponds this ΔT (LSC_WArm_GL_VEL_EST) using the linear relationship found on the simulations. The absolute sign of the error signal (LSC_B8_6MHz_ERR_NORM) gives us the sign of the velocity and is stored in a channel called LSC_WArm_GL_sign_save.
- At this point, the algorithm calculates the impulse length needed in order to stop the mirror by taking in account the maximum acceleration that can be achieved with 10V. As we do not want to completely stop the mirror but to reduce its speed and change its sign, we add an extra length to the pulse. The pulse sent can be seen in LSC_GL_PULSE_OUT. The flag LSC_WArm_GL_STATE_1 indicates the moments when we are sending an impulse.
- Now, in order to engage the linear lock we want a trigger on the velocity, that is, if the peak is slow enough, we will not send a pulse but try the linear lock instead. IN order to do this we put a trigger on the counter itself, because when it arrives to a given number of counts, we know that it is at least slower than a given value (for example, ~49 counts for 0.3um/s). So when the counter reaches the counter threshold, the linear lock is engaged, and the counter stops charging. The flag LSC_WArm_GL_STATE_2 indicates when the linear lock is engaged.
The free parameters of this method are the number of extra counts given to the impulse, the impact of the alignment on the height of the peaks and the velocity estimation itself. Most probably these parameters can be better tuned in order to make the algorithm more efficient, but it already works quite well, in the sense that it does what we expect from it. Two sets of data have been taken: one in free-swinging, and another only with the impulses on (not trying to engage the linear lock), in order to see the impact of the guided lock and if indeed we are slowing down the peaks. A first statistic of the data points out that the number of high velocity peaks is reduced and the number of slow ones slightly increases, but a more detailed analysis needs to be done.
In conclusion, the algorithm is working well even if its efficiency could be improved by tuning experimentally the parameters.
Both the locking script and the Metatron script, along with its configuration file, have been updated to the new algorithm. Before the North Arm will be available again, its configuration will be updated as well.
2 comments
The lock of the West Arm has been tested with both the script and Metatron, and it works without problems.
One issued that we discovered regarding Metatron, maybe already known: if modifications are done to a Python script, the corresponding VPM process must be restarted, otherwise it keeps in memory the old code and configuration file and strange things happen...
Today I updated the North Arm Acl configuration file to Guided Lock v2. Now the configuration files of the arms are in sync again.
Also, the LSC_init.py script and the Metatron node have been updated. The North Arm lock has been tested with Metatron and acquired without any problem.