AdV-INJ›Electro optical modulation system (EOM)
#33300
PLL to measure LNFS frequency
The 'local oscillator' used in the digital demodulation is typically off by a few Hz due to the finite size of the lookup-tables used in the FPGA. To correct this, a second 'derotation' step is needed, which is done with processes like Pr_Demod_SIB2, which run on real-time PCs. These processes use sine and cosine generators, whose frequency is hard-coded as the nominal frequency difference (a few Hz). Even though the LNFS is currently synchronized to the 10 MHz reference from the master GPS clock, its phase as measured by the demodulation board (after derotation) is still drifting slightly, see fig 1. A drift of 1 radian is observed over 4.5 days, which corresponds to a frequency offset slightly less than a micro-Hertz. This is consistent with the specifications of the LNFS100, which contains a 48-bit DDS onboard. Something similar is happening for the stand-alone DDS that generate the 131 MHz signals, but here the deviation from the expected frequency is even on the level of several Hz, since they only use a 32-bit DDS chip. Any residual frequency offset could in theory be corrected using the 2f subtraction, but that might not always be possible. For debugging, and e.g. for the lock of the arm cavities using B7 at step 1, we will need the possibility to use demodulated signals also without the 2f subtraction. If these phase-drifts are not compensated, we would have to retune phases by hand every few days.
The obvious solution to this issue would be to create a 'virtual LO signal', by measuring the phase of the LNFS using the digital demodulation board in the IER, and sending the low-frequency part of this phase via TOLM to all the other processes that need to do the phase derotation of the signals of the photodiodes. For this purpose, I implemented a simple PLL in software inside Pr_LNFS_demod.cfg, see fig 2 for the scheme. The loop filter is a PI controller with roll-off. The integrator below UGF/10 ensures that the phase error is driven to zero, while the roll-off at UGF*10 avoids injecting too much noise at high frequencies. Unity gain is currently set to 0.3 Hz, but this can be set to any value we want. See fig 3 for the measured and reconstructed signals. Fig. 4 shows the step response of the filter at the moment that it is switched on, the frequency converges quickly to the nominal frequency difference of 6.85 Hz. The same figure also shows that the PLL can follow a step of 1 Hz of the LNFS (these steps will be needed to tune FMOD_ERR). Note that the implementation is net yet optimized for speed and numerical accuracy. The code is a bit of a hack, but this could be simplifies a lot with some small changes to Pr.
Also the 2f signals of the photodiodes, which are used for the phase correction, need to be de-rotated. One easy solution might be to set the LO-frequencies in the FPGA so that FPGA_LO_2F = 2 * FPGA_LO_1F, so that also DELTA_FREQ_2F = 2 * DELTA_FREQ_1F. Reconstructed 2F signals can then be generated from the reconstructed 1F signals using standard trigonometry [cos(2*phi) = 2 * cos(phi)^2 - 1 and sin(2*phi) = 2 * sin(phi) * cos(phi)]. The various reconstructed sine waves could be sent via TOLM from LNFS_Pr_Demod to all the other demodulation processes like SIB2_Pr_Demod, so that they can be used instead of the hard-coded sine generators.