Today we tested the fine tuning of the FmodErr signal, which works by changing directly the modulation frequencies (6 MHz, 8 MHz, 56 MHz) on the LNFS, instead of moving the MC mirror every time; this, when only small changes are needed, will improve both the speed and the accuracy of the tuning, while for bigger changes we will still move the MC mirror first, and then do the fine tuning with the LNFS:
-
we first acted on the LNFS by hand, using the script
/virgoDev/Automation/scripts/set_LNFS_freq.py: this script uses the 8 MHz nominal frequency as a reference, a delta frequency we want it to move by, and a maximum overall deviation from such reference; it will change such frequency and rescale the other ones (6 MHz and 56 MHz) accordingly; - as a safety measure, if the overall deviation from reference is too big, the reference value wiil be set again; at this point, the tuning by moving the MC mirror will be necessary, before another attempt;
- we did not observe any misbehaviour, and we tested this both offline and in-lock, without consequence;
-
we did a preliminary calibration in Hz of the usual
INJ_FmodErr_ACpsignal which we use as a sensor of the mistuning; -
after this, we modified the logic of the
INJ_MAINAutomation node in order to implement this novelty (using the same script), and everything still lives in theFMODERR_TUNINGstate as before: if the needed tuning is small, the LNFS method will be used, otherwise the MC will be moved; the logic takes care of doing a fine tuning after the MC tuning, and also in case of the reset to the reference frequency vaues; - the next steps will be to monitor the performance of the macro over time, and to introduce a routine (probably as a new state) to calibrate automatically (and with more precision) the error signal in Hz.
A note about the frequency monitoring: as can be seen in Figure 1, the phase measured with the demodulation board next to the LNFS starts to wrap around at the moment the frequency is moved away from the nominal value, this is expected. Note that there is a frequency difference between the local oscillator in the FPGA of the board and the true modulation frequency, which is already compensated for in the LNFS_Demod process. Since we now have a demodulation frequency which will change slightly for every lock, this correction becomes a bit arbitrary, and can be removed.
The modulation frequency can calculated by taking the 2-sample difference of the phase, correcting for potential wrapping around, and multiplying by -fsample/(2*pi), see attached script and Figure 2. By averaging this signal, an accurate measurement of the modulation frequency can be made relative to the demodulation frequency. It would be good to calculate this online.
One issue seems that the channels INJ_LNFS_FREQ1/2/3 seem to be not very accurate. I guess this is due to the limited precision of 32 bit float with which SMS channels are stored in the frames, which leads to a resolution of about 0.7 Hz for the 6MHz frequency and 6.7 Hz for the 56MHz. It would be nice to store these frequencies as doubles, but I am not sure that is possible.