Ettos wrote:> I'm trying do determine the phase shift between two sine waves (actual > frequency is 1kHz) sampled at 62.5MHz and 8 bit. > I calculated the phase shift between the fundamentals of the two signals > using FFT.???> Is there a more accurate way to measure the phase shift in > this particular situation (oversampled signal and poor vertical > resolution)?A * B cos fi = -------- |A| |B|
Online · Live + on demand
February 9-11, 2027
Price goes up Jan 1: register now to lock in today's rate
Register Now →
Enhancing resolution of an oversampled signal
Started by ●January 28, 2012
Reply by ●January 29, 20122012-01-29
Reply by ●January 29, 20122012-01-29
On 1/29/2012 4:10 AM, Ettos wrote:> On 29/01/2012 3.16, glen herrmannsfeldt wrote: > >> Well, another way is to watch for the zero crossing, possibly after a >> filter if there is too much noise. You didn't say how close it needs >> to be, or much else about the source. >> >> With 62500 samples per cycle, if you know which sample it crossed >> zero on, then you have a 1 in 62500 phase accuracy. Doesn't sound >> bad to me. Then you count the samples between when one crosses and >> when the other crosses, divide by 62500. (Adjust depending on phase >> units.) > > Other details: I acquire signals with a digital oscilloscope (Tektronix > DPO2014), so the signals are clock synchronized.What does "clock synchronized" mean? Synchronizing the oscilloscope to one of the signals while acquiring both provides the needed synchronicity. Synchronizing each acquired waveform on the signal being acquired does not.> In my measurement system I'm bound to acquire only one cycle of the sine > wave so I've got only 62500 samples (I'm doing spectroscopy measurements > on soil samples). For the noise, I apply a digital low pass filter > implemented on the oscilloscope. > Sometimes happens that one of the sine wave I record is distorted, so I > must look for the phase shift between the fundamentals of the two > signals. Do you think the zero-crossing method is good even in this > situation?Harmonics can (and usually will) displace the zero crossing. The signals are simultaneously available. (If they weren't, relative phase would have no meaning.) In the old days, I would display one on the vertical axis in the normal way, and the other on the horizontal axis in place of a time base. For undistorted sinusoids, the resulting ellipse is a good indicator of phase shift, and measurements of horizontal and vertical intercepts yield the tangent of the phase angle to slide-rule (about 10-bit) accuracy.> Thanks to all.Keep us posted. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●January 29, 20122012-01-29
On 29/01/2012 14.53, glen herrmannsfeldt wrote:> > In that case, my next suggestion is non-linear least squares fit > to a sinusoid.Interesting. I tried this technique and it gives me results that are very close (in terms of values of the phase shift between the two signals) as taking FFT. The values calculated with these two techniques are the same up to 3 or 4 significant digits.> Are the two signals the input and output, or two outputs?Two outputs.> It depends on the distortion. Some will move the zero crossing, > others won't. It would seem to me that the distortion would be something > you would want to measure and characterize, but maybe not.I'm interested in measuring distortion but only in terms of THD. For the phase shift I take into account only the two fundamentals. M.
Reply by ●January 29, 20122012-01-29
On 29/01/2012 17.04, Jerry Avins wrote:> > What does "clock synchronized" mean? Synchronizing the oscilloscope to > one of the signals while acquiring both provides the needed > synchronicity. Synchronizing each acquired waveform on the signal being > acquired does not.The two signals are both synchronized (and acquired simultaneously) to an external trigger signal coming from a signal generator. The input signal to my system is provided by the signal generator and with the oscilloscope I measure the two outputs.> Harmonics can (and usually will) displace the zero crossing. The signals > are simultaneously available. (If they weren't, relative phase would > have no meaning.) In the old days, I would display one on the vertical > axis in the normal way, and the other on the horizontal axis in place of > a time base. For undistorted sinusoids, the resulting ellipse is a good > indicator of phase shift, and measurements of horizontal and vertical > intercepts yield the tangent of the phase angle to slide-rule (about > 10-bit) accuracy.I tried that. I get rather distorted Lissajous figures from my signals.
Reply by ●January 29, 20122012-01-29
Jerry Avins <jya@ieee.org> wrote: (snip, someone wrote)>> In my measurement system I'm bound to acquire only one cycle of the sine >> wave so I've got only 62500 samples (I'm doing spectroscopy measurements >> on soil samples). For the noise, I apply a digital low pass filter >> implemented on the oscilloscope. >> Sometimes happens that one of the sine wave I record is distorted, so I >> must look for the phase shift between the fundamentals of the two >> signals. Do you think the zero-crossing method is good even in this >> situation?> Harmonics can (and usually will) displace the zero crossing.Without actually drawing them, it seems to me that even harmonics move the crossing and odd ones don't. Some types of distortion only create odd harmonics.> The signals > are simultaneously available. (If they weren't, relative phase would > have no meaning.) In the old days, I would display one on the vertical > axis in the normal way, and the other on the horizontal axis in place of > a time base. For undistorted sinusoids, the resulting ellipse is a good > indicator of phase shift, and measurements of horizontal and vertical > intercepts yield the tangent of the phase angle to slide-rule (about > 10-bit) accuracy.-- glen
Reply by ●January 29, 20122012-01-29
On 1/29/2012 2:19 PM, Ettos wrote:> On 29/01/2012 17.04, Jerry Avins wrote: > >> >> What does "clock synchronized" mean? Synchronizing the oscilloscope to >> one of the signals while acquiring both provides the needed >> synchronicity. Synchronizing each acquired waveform on the signal being >> acquired does not. > > The two signals are both synchronized (and acquired simultaneously) to > an external trigger signal coming from a signal generator. The input > signal to my system is provided by the signal generator and with the > oscilloscope I measure the two outputs. > > >> Harmonics can (and usually will) displace the zero crossing. The signals >> are simultaneously available. (If they weren't, relative phase would >> have no meaning.) In the old days, I would display one on the vertical >> axis in the normal way, and the other on the horizontal axis in place of >> a time base. For undistorted sinusoids, the resulting ellipse is a good >> indicator of phase shift, and measurements of horizontal and vertical >> intercepts yield the tangent of the phase angle to slide-rule (about >> 10-bit) accuracy. > > I tried that. I get rather distorted Lissajous figures from my signals.Then you have other problems. Pure signals of the same frequency give an ellipse (which can degenerate to a circle or a straight line). Harmonics can make the display lumpy. Lissajous figures in which the curve crosses itself appear only when the axes are excited by different frequencies. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●January 29, 20122012-01-29
On 1/29/2012 3:58 PM, glen herrmannsfeldt wrote:> Jerry Avins<jya@ieee.org> wrote: > > (snip, someone wrote) >>> In my measurement system I'm bound to acquire only one cycle of the sine >>> wave so I've got only 62500 samples (I'm doing spectroscopy measurements >>> on soil samples). For the noise, I apply a digital low pass filter >>> implemented on the oscilloscope. >>> Sometimes happens that one of the sine wave I record is distorted, so I >>> must look for the phase shift between the fundamentals of the two >>> signals. Do you think the zero-crossing method is good even in this >>> situation? > >> Harmonics can (and usually will) displace the zero crossing. > > Without actually drawing them, it seems to me that even harmonics > move the crossing and odd ones don't. Some types of distortion > only create odd harmonics.Odd harmonics that cross zero when the fundamental does don't shift the crossings for the obvious reason that superposition applies. Any signal, harmonic or not, that has non-zero magnitude when the fundamental crosses zero, shifts the composite zero crossing. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●February 1, 20122012-02-01
>On 1/29/2012 3:58 PM, glen herrmannsfeldt wrote: >> Jerry Avins<jya@ieee.org> wrote: >> >> (snip, someone wrote) >>>> In my measurement system I'm bound to acquire only one cycle of thesine>>>> wave so I've got only 62500 samples (I'm doing spectroscopymeasurements>>>> on soil samples). For the noise, I apply a digital low pass filter >>>> implemented on the oscilloscope. >>>> Sometimes happens that one of the sine wave I record is distorted, soI>>>> must look for the phase shift between the fundamentals of the two >>>> signals. Do you think the zero-crossing method is good even in this >>>> situation? >> >>> Harmonics can (and usually will) displace the zero crossing. >> >> Without actually drawing them, it seems to me that even harmonics >> move the crossing and odd ones don't. Some types of distortion >> only create odd harmonics. > >Odd harmonics that cross zero when the fundamental does don't shift the >crossings for the obvious reason that superposition applies. Any signal, >harmonic or not, that has non-zero magnitude when the fundamental >crosses zero, shifts the composite zero crossing.If the harmonics are strong you may have far more zero crossings than you expected. Zero crossings are a pretty woolly test for finding either the pitch or the phase of the fundamental. Steve
Reply by ●February 3, 20122012-02-03
On 2/1/2012 7:10 PM, steveu wrote:>> On 1/29/2012 3:58 PM, glen herrmannsfeldt wrote: >>> Jerry Avins<jya@ieee.org> wrote: >>> >>> (snip, someone wrote) >>>>> In my measurement system I'm bound to acquire only one cycle of the > sine >>>>> wave so I've got only 62500 samples (I'm doing spectroscopy > measurements >>>>> on soil samples). For the noise, I apply a digital low pass filter >>>>> implemented on the oscilloscope. >>>>> Sometimes happens that one of the sine wave I record is distorted, so > I >>>>> must look for the phase shift between the fundamentals of the two >>>>> signals. Do you think the zero-crossing method is good even in this >>>>> situation? >>> >>>> Harmonics can (and usually will) displace the zero crossing. >>> >>> Without actually drawing them, it seems to me that even harmonics >>> move the crossing and odd ones don't. Some types of distortion >>> only create odd harmonics. >> >> Odd harmonics that cross zero when the fundamental does don't shift the >> crossings for the obvious reason that superposition applies. Any signal, >> harmonic or not, that has non-zero magnitude when the fundamental >> crosses zero, shifts the composite zero crossing. > > If the harmonics are strong you may have far more zero crossings than you > expected. Zero crossings are a pretty woolly test for finding either the > pitch or the phase of the fundamental.If a "harmonic" introduces several extra zero crossings, I consider that the dominant frequency and the lowest, a subharmonic. That's probably an idiosyncratic view. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●February 3, 20122012-02-03
On 2/2/12 11:31 PM, Jerry Avins wrote:> On 2/1/2012 7:10 PM, steveu wrote: >>> On 1/29/2012 3:58 PM, glen herrmannsfeldt wrote: >>>> Jerry Avins<jya@ieee.org> wrote: >>>> >>>> (snip, someone wrote) >>>>>> In my measurement system I'm bound to acquire only one cycle of the >> sine >>>>>> wave so I've got only 62500 samples (I'm doing spectroscopy >> measurements >>>>>> on soil samples). For the noise, I apply a digital low pass filter >>>>>> implemented on the oscilloscope. >>>>>> Sometimes happens that one of the sine wave I record is distorted, so >> I >>>>>> must look for the phase shift between the fundamentals of the two >>>>>> signals. Do you think the zero-crossing method is good even in this >>>>>> situation? >>>> >>>>> Harmonics can (and usually will) displace the zero crossing. >>>> >>>> Without actually drawing them, it seems to me that even harmonics >>>> move the crossing and odd ones don't. Some types of distortion >>>> only create odd harmonics. >>> >>> Odd harmonics that cross zero when the fundamental does don't shift the >>> crossings for the obvious reason that superposition applies. Any signal, >>> harmonic or not, that has non-zero magnitude when the fundamental >>> crosses zero, shifts the composite zero crossing. >> >> If the harmonics are strong you may have far more zero crossings than you >> expected. Zero crossings are a pretty woolly test for finding either the >> pitch or the phase of the fundamental. > > If a "harmonic" introduces several extra zero crossings, I consider that > the dominant frequency and the lowest, a subharmonic. That's probably an > idiosyncratic view. >i dunno if i can find a public place for such a file, but a simple AIFF or WAV file of a note from a Wurlitzer model 200 electric piano shows a waveform where the period has two nearly identical looking rounded sawtooths, but one is slightly longer than the other. relatively little percent energy in the odd harmonics, but enough that the fundamental was perceived as the pitch. and it had 4 zero-crossings per period. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."







