As per Matt's instructions in his OAF document (elog 395) in the Tuning section, Sanjit and I took a transfer function measurement from the output of the OAF system, to the input. i.e. we're trying to measure what happens out in the real world when we push on MC1, and how that is fed back to the input of our filter as MC_L. The game plan is to measure this transfer function, and read off the phase at the nyquist frequency, and use this value to calculate the appropriate sample-and-hold delay to be used in the OAF. The downsample rate for the OAF is 32, so that we're running at 64Hz instead of the 2048Hz of the front-end. Thus, our Nyquist frequency is 32Hz.
Phase@Nyquist * ------------------------ = Delay
In the attached figure we do a swept sine from CORR_EXC to ERR_EMPH_OUT to determine the transfer function. Here, we turn off all of the filters in both the CORR and EXC banks, because those are already matched/taken into account in the PEM filter banks.
Using the cursor on DTT, we find that the phase at 29.85Hz is -228.8deg, and at 37.06Hz is -246.0deg. Extrapolating, this means that at 32Hz, we expect about -234deg phase. Using our handy-dandy formula, this means that we should try a delay of 41 or 42 (41.6 is between these two...)
We'll give this a shot!
As Rana pointed out to me last night, I was using continuous phase, which is not good. When using regular phase, I find: (29.85Hz, 131.216deg), (37.06Hz, 113.963deg), so extrapolating gives (32Hz, 126.07deg). Plugging this in to our handy-dandy formula, we get a delay of 22.4, so we should try both 22 and 23.