I added blocks to the x1siq model to use the moderinger technique to readout loss and Q for four modes. On the fourth, presumably highest-frequency mode, I modified the moderinger to send the bandpassed signal to a lock in block that mixes the signal with an LO that we will give whatever frequency that mode has when we 'start' our measurement. I then take I and Q from that lock in and find the beat frequency by
I take the simplest possible time derivative of Q/I, by holding one sample of Q/I for one clock cycle, then multiplying the difference between subsequent Q/I by the sampling rate.
This beat frequency is sent to an EPICS output so I can pass it to our existing temperature control PID loop. We still need to: