• From: "Robert McGwier" <rwmcgwier@xxxxxxxxxxxxxxx
• Date: Thu, 4 Dec 2003 01:34:51 -0000

```cross correlation does the job.  This is best done
in the frequency domain since you can get fractional
sample delays which correspond to rotation angles.

recall delay in time = a phase shift in the frequency
domain

F(f(t-d)) = exp(i(phase rotation)) F(f(t)).

If you look over all bins and determine the best
rotation, voila.  Do a weighted average by the power
(POWER NOT AMPLITUDE) in the bins when determining the
phase rotation and thence the delay.

The only way to proceed correctly in the time domain
then is to polyphase resample, in this case, upsample,
adjust the pointer to correspond to the correct
interpolation phase as determined by step one above, evaluate
the interpolation filter and then decimate immediately.   It
is to be remembered that only those times we will decimate
to actually need to be evaluated in the upsample/filtered
version.  Since all other outputs will be thrown away.

Is this clear? Maybe Leif has another way or has already
implemented this and thus it is available for stealing ;-).

Bob

-----Original Message-----
[mailto:owner-linrad@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Alberto di Bene
Sent: Wednesday, December 03, 2003 10:58 PM

I have a question for Leif.
In another forum we were discussing about phase and time compensation,
and someone came up saying that Linrad is capable of compensating a time
delay that may exist in e.g. the left channel of a sound card, but not
in the
other one, or viceversa.  This because some testings have measured that
cheap sound cards exhibit about 14 microseconds of delay on one channel
with respect to the other, probably due to the fact that there is just a
single
ADC, time-multiplexed between the left and right channels. This time delay
plays havoc with the ortogonality of the I and Q signals.

A fixed time delay means a phase difference varying with the frequency, so
the normal methods of phase compensation do not work in this circumstance.
What is needed is an adjustable fractional time delay filter.

Does Linrad have such a feature ? If yes, could you Leif please tell me the
routine where it is implemented ? I am more than willing to copy it  :-)