DSPRelated.com
Forums

Comparing timing between sinusoids at different freqs

Started by Wally July 9, 2009
I have a requirement to measure the relative timing between two sinusoids 
for the purpose of determining the relative circuit delays between the 
sources and me.  I have no control over the sources, but they are highly 
stable fixed frequencies.  The measurement technique I use would be done at 
the sources themselves, and simultaneously at my receiving point, with the 
change in relative timing representing relative circuit delay.

If the sources are at the same frequency I can do simple relative phase 
measurements at the sources and at my receiving point.  Unfortunately they 
are at slightly different (0.01%)  frequencies, which makes their relative 
phases time-dependent.

One possible solution I have in mind is to compute the average zero crossing 
times of the two sinusoids over the same measurement interval, and compare 
those averages.  I imagine that even though the zero crossing times are 
changing on a relative basis during the measurement interval due to the 
frequency differences, the averaged zero crossing times will still give a 
unique answer for relative timing determination.

Another way might be to shift one of the frequencies in my test equipment so 
the two frequencies are equal, then make a relative phase comparison. 
However, is the effect of this frequency shift on signal phase predictable?

I'm out of my comfort zone here and will be grateful for any advice.



On Jul 9, 12:18&#4294967295;pm, "Wally" <nos...@nospamm.com> wrote:
> I have a requirement to measure the relative timing between two sinusoids > for the purpose of determining the relative circuit delays between the > sources and me. &#4294967295;I have no control over the sources, but they are highly > stable fixed frequencies. &#4294967295;The measurement technique I use would be done at > the sources themselves, and simultaneously at my receiving point, with the > change in relative timing representing relative circuit delay. > > If the sources are at the same frequency I can do simple relative phase > measurements at the sources and at my receiving point. &#4294967295;Unfortunately they > are at slightly different (0.01%) &#4294967295;frequencies, which makes their relative > phases time-dependent. > > One possible solution I have in mind is to compute the average zero crossing > times of the two sinusoids over the same measurement interval, and compare > those averages. &#4294967295;I imagine that even though the zero crossing times are > changing on a relative basis during the measurement interval due to the > frequency differences, the averaged zero crossing times will still give a > unique answer for relative timing determination. > > Another way might be to shift one of the frequencies in my test equipment so > the two frequencies are equal, then make a relative phase comparison. > However, is the effect of this frequency shift on signal phase predictable? > > I'm out of my comfort zone here and will be grateful for any advice.
Can you send something other than sinusoids? The problem as it stands now is fraught with ambiguities from many factors, including: * sinusoid phases are ambiguous relative to their periods. * there is no way to agree on what the time epoch of the two systems are. The best is to trigger the transmission of a pseudo-random signal or something with unique correlation peaks, and then compare the peaks from the outputs of the two systems. Sorry to turn this problem around to you, but unless you make a lot of assumptions about the value of the relative delays, nobody can really help you. Julius

Wally wrote:

> I have a requirement to measure the relative timing between two sinusoids > for the purpose of determining the relative circuit delays between the > sources and me. I have no control over the sources, but they are highly > stable fixed frequencies. The measurement technique I use would be done at > the sources themselves, and simultaneously at my receiving point, with the > change in relative timing representing relative circuit delay. > > If the sources are at the same frequency I can do simple relative phase > measurements at the sources and at my receiving point. Unfortunately they > are at slightly different (0.01%) frequencies, which makes their relative > phases time-dependent.
Oops. If the problem is stated like that, it can't be solved. You have two unknowns for one measured parameter. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
On Jul 9, 12:18&#4294967295;pm, "Wally" <nos...@nospamm.com> wrote:
> I have a requirement to measure the relative timing between two sinusoids > for the purpose of determining the relative circuit delays between the > sources and me. &#4294967295;I have no control over the sources, but they are highly > stable fixed frequencies. &#4294967295;The measurement technique I use would be done at > the sources themselves, and simultaneously at my receiving point, with the > change in relative timing representing relative circuit delay. > > If the sources are at the same frequency I can do simple relative phase > measurements at the sources and at my receiving point. &#4294967295;Unfortunately they > are at slightly different (0.01%) &#4294967295;frequencies, which makes their relative > phases time-dependent. > > One possible solution I have in mind is to compute the average zero crossing > times of the two sinusoids over the same measurement interval, and compare > those averages. &#4294967295;I imagine that even though the zero crossing times are > changing on a relative basis during the measurement interval due to the > frequency differences, the averaged zero crossing times will still give a > unique answer for relative timing determination. > > Another way might be to shift one of the frequencies in my test equipment so > the two frequencies are equal, then make a relative phase comparison. > However, is the effect of this frequency shift on signal phase predictable? > > I'm out of my comfort zone here and will be grateful for any advice.
You have two clocks running at different rates, and you ask how much is one ahead of the other? It depends on the time. But which time, clock A or clock B, or some other clock's time? If you tell us more about your problem, we may be able to come up with a sensible answer. Clay
Thanks guys for the above replies.  Let me clarify:

I can measure the relative phases at the sources and the relative phases at 
my receiving point using the same instrumentation with the same internal 
clock in the same measurement interval.  I'm looking for the change in 
relative phase between the sources and the receiving point to determine 
relative circuit delay between the sources and my receiving point.  BUT, I 
don't know how to do this if the sources are at slightly different 
frequencies.

I'm stuck with taking the sources as I find them.  They're sinusoidal.  True 
there is a 2 pi periodicity but the wavelength is long compared to possible 
circuit delays so there is no danger of ambiguity.

It just seems intuitively that I should be able to average the zero crossing 
times across the same measurement interval and compare the two averages. 
But I don't see how to prove that.

Wally.



"Wally" <nospam@nospamm.com> wrote in message 
news:zEo5m.8129$Rb6.5872@flpi147.ffdc.sbc.com...
>I have a requirement to measure the relative timing between two sinusoids >for the purpose of determining the relative circuit delays between the >sources and me. I have no control over the sources, but they are highly >stable fixed frequencies. The measurement technique I use would be done at >the sources themselves, and simultaneously at my receiving point, with the >change in relative timing representing relative circuit delay. > > If the sources are at the same frequency I can do simple relative phase > measurements at the sources and at my receiving point. Unfortunately they > are at slightly different (0.01%) frequencies, which makes their relative > phases time-dependent. > > One possible solution I have in mind is to compute the average zero > crossing times of the two sinusoids over the same measurement interval, > and compare those averages. I imagine that even though the zero crossing > times are changing on a relative basis during the measurement interval due > to the frequency differences, the averaged zero crossing times will still > give a unique answer for relative timing determination. > > Another way might be to shift one of the frequencies in my test equipment > so the two frequencies are equal, then make a relative phase comparison. > However, is the effect of this frequency shift on signal phase > predictable? > > I'm out of my comfort zone here and will be grateful for any advice. > > >
Wally wrote:
> Thanks guys for the above replies. Let me clarify: > > I can measure the relative phases at the sources and the relative phases at > my receiving point using the same instrumentation with the same internal > clock in the same measurement interval. I'm looking for the change in > relative phase between the sources and the receiving point to determine > relative circuit delay between the sources and my receiving point. BUT, I > don't know how to do this if the sources are at slightly different > frequencies. > > I'm stuck with taking the sources as I find them. They're sinusoidal. True > there is a 2 pi periodicity but the wavelength is long compared to possible > circuit delays so there is no danger of ambiguity. > > It just seems intuitively that I should be able to average the zero crossing > times across the same measurement interval and compare the two averages. > But I don't see how to prove that.
Deal with the sources one at a time. For each, determine the phase difference -- hence the path delay -- between the sources and the receiving point. Subtract. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
On Jul 9, 4:12&#4294967295;pm, Jerry Avins <j...@ieee.org> wrote:
> Wally wrote: > > Thanks guys for the above replies. &#4294967295;Let me clarify: > > > I can measure the relative phases at the sources and the relative phases at > > my receiving point using the same instrumentation with the same internal > > clock in the same measurement interval. &#4294967295;I'm looking for the change in > > relative phase between the sources and the receiving point to determine > > relative circuit delay between the sources and my receiving point. &#4294967295;BUT, I > > don't know how to do this if the sources are at slightly different > > frequencies. > > > I'm stuck with taking the sources as I find them. &#4294967295;They're sinusoidal. &#4294967295;True > > there is a 2 pi periodicity but the wavelength is long compared to possible > > circuit delays so there is no danger of ambiguity. > > > It just seems intuitively that I should be able to average the zero crossing > > times across the same measurement interval and compare the two averages. > > But I don't see how to prove that. > > Deal with the sources one at a time. For each, determine the phase > difference -- hence the path delay -- between the sources and the > receiving point. Subtract. > > Jerry > -- > Engineering is the art of making what you want from things you can get. > &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;- Hide quoted text - > > - Show quoted text -
Jerry, That approach assumes that the delay is less than 1 period of the waveform otherwise there is ambiguity by an integer number of periods of the waveform. Has this assumption been established? It seems like it might be possible if the OP has a really good idea of what the delay is before the measurement (to somewhat less than the period of the waveform), and wants to get a better estimate. Or, assuming the time delays for the two frequencies are the same, if you use the time delay computed for each frequency f1, f2 computed assuming a phase difference in [0,2*pi), getting delays d1 and d2 respectively, you may be able to compute integers N and M s.t. N/f1+d1=M/f2+d2 then N/f1+d1 or M/f2+d2 would be an estimate of the actual delay. It is possible that there may be multiple integer solutions for the pair (M, N), but if so, you may be able to rule out pairs based on prior knowledge, from the delays they would imply. Dirk Bell DSP Consultant
Dirk Bell wrote:
> On Jul 9, 4:12 pm, Jerry Avins <j...@ieee.org> wrote: >> Wally wrote: >>> Thanks guys for the above replies. Let me clarify: >>> I can measure the relative phases at the sources and the relative phases at >>> my receiving point using the same instrumentation with the same internal >>> clock in the same measurement interval. I'm looking for the change in >>> relative phase between the sources and the receiving point to determine >>> relative circuit delay between the sources and my receiving point. BUT, I >>> don't know how to do this if the sources are at slightly different >>> frequencies. >>> I'm stuck with taking the sources as I find them. They're sinusoidal. True >>> there is a 2 pi periodicity but the wavelength is long compared to possible >>> circuit delays so there is no danger of ambiguity. >>> It just seems intuitively that I should be able to average the zero crossing >>> times across the same measurement interval and compare the two averages. >>> But I don't see how to prove that. >> Deal with the sources one at a time. For each, determine the phase >> difference -- hence the path delay -- between the sources and the >> receiving point. Subtract. >> >> Jerry >> -- >> Engineering is the art of making what you want from things you can get. >> &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;- Hide quoted text - >> >> - Show quoted text - > > Jerry, > > That approach assumes that the delay is less than 1 period of the > waveform otherwise there is ambiguity by an integer number of periods > of the waveform. Has this assumption been established?
To quote the OP: "True there is a 2 pi periodicity but the wavelength is long compared to possible circuit delays so there is no danger of ambiguity."
> It seems like it might be possible if the OP has a really good idea of > what the delay is before the measurement (to somewhat less than the > period of the waveform), and wants to get a better estimate.
He seems to.
> Or, assuming the time delays for the two frequencies are the same, if > you use the time delay computed for each frequency f1, f2 computed > assuming a phase difference in [0,2*pi), getting delays d1 and d2 > respectively, you may be able to compute integers N and M s.t. > > N/f1+d1=M/f2+d2 > > then N/f1+d1 or M/f2+d2 would be an estimate of the actual delay. > > It is possible that there may be multiple integer solutions for the > pair (M, N), but if so, you may be able to rule out pairs based on > prior knowledge, from the delays they would imply.
It seems that's the case. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
On Jul 9, 8:50&#4294967295;pm, Jerry Avins <j...@ieee.org> wrote:
> Dirk Bell wrote: > > On Jul 9, 4:12 pm, Jerry Avins <j...@ieee.org> wrote: > >> Wally wrote: > >>> Thanks guys for the above replies. &#4294967295;Let me clarify: > >>> I can measure the relative phases at the sources and the relative phases at > >>> my receiving point using the same instrumentation with the same internal > >>> clock in the same measurement interval. &#4294967295;I'm looking for the change in > >>> relative phase between the sources and the receiving point to determine > >>> relative circuit delay between the sources and my receiving point. &#4294967295;BUT, I > >>> don't know how to do this if the sources are at slightly different > >>> frequencies. > >>> I'm stuck with taking the sources as I find them. &#4294967295;They're sinusoidal. &#4294967295;True > >>> there is a 2 pi periodicity but the wavelength is long compared to possible > >>> circuit delays so there is no danger of ambiguity. > >>> It just seems intuitively that I should be able to average the zero crossing > >>> times across the same measurement interval and compare the two averages. > >>> But I don't see how to prove that. > >> Deal with the sources one at a time. For each, determine the phase > >> difference -- hence the path delay -- between the sources and the > >> receiving point. Subtract. > > >> Jerry > >> -- > >> Engineering is the art of making what you want from things you can get. > >> &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;- Hide quoted text - > > >> - Show quoted text - > > > Jerry, > > > That approach assumes that the delay is less than 1 period of the > > waveform otherwise there is ambiguity by an integer number of periods > > of the waveform. &#4294967295;Has this assumption been established? > > To quote the OP: "True there is a 2 pi periodicity but the wavelength is > long compared to possible circuit delays so there is no danger of > ambiguity." > > > It seems like it might be possible if the OP has a really good idea of > > what the delay is before the measurement (to somewhat less than the > > period of the waveform), and wants to get a better estimate. > > He seems to. > > > Or, assuming the time delays for the two frequencies are the same, if > > you use the time delay computed for each frequency f1, f2 computed > > assuming a phase difference in [0,2*pi), getting delays d1 and d2 > > respectively, you may be able to compute integers N and M s.t. > > > N/f1+d1=M/f2+d2 > > > then N/f1+d1 or M/f2+d2 would be an estimate of the actual delay. > > > It is possible that there may be multiple integer solutions for the > > pair (M, N), but if so, you may be able to rule out pairs based on > > prior knowledge, from the delays they would imply. > > It seems that's the case. > > Jerry > -- > Engineering is the art of making what you want from things you can get. > &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;- Hide quoted text - > > - Show quoted text -
Hi Jerry, I missed the first quote, so I overcomplicated the problem. You are correct. Simple should work. Dirk Bell DSP Consultant
On Jul 9, 11:18&#4294967295;am, "Wally" <nos...@nospamm.com> wrote:
> I have a requirement to measure the relative timing between two sinusoids > for the purpose of determining the relative circuit delays between the > sources and me. &#4294967295;I have no control over the sources, but they are highly > stable fixed frequencies. &#4294967295;The measurement technique I use would be done at > the sources themselves, and simultaneously at my receiving point, with the > change in relative timing representing relative circuit delay. > > If the sources are at the same frequency I can do simple relative phase > measurements at the sources and at my receiving point. &#4294967295;Unfortunately they > are at slightly different (0.01%) &#4294967295;frequencies, which makes their relative > phases time-dependent. > > One possible solution I have in mind is to compute the average zero crossing > times of the two sinusoids over the same measurement interval, and compare > those averages. &#4294967295;I imagine that even though the zero crossing times are > changing on a relative basis during the measurement interval due to the > frequency differences, the averaged zero crossing times will still give a > unique answer for relative timing determination. > > Another way might be to shift one of the frequencies in my test equipment so > the two frequencies are equal, then make a relative phase comparison. > However, is the effect of this frequency shift on signal phase predictable? > > I'm out of my comfort zone here and will be grateful for any advice.
Wally, From what I read, it appears that you can measure the phase diffrence of the two signals at the source, and the phase difference of the two signals at the receiver, but you can NOT measure the phase difference at the receiver relative to the source. The ONLY measurement you have is the phase difference of the two signals either at the source or the receiver. Is this correct? Maurice Givens