scopes to measure phase shift

We want to measure the phase shift of a pair of sine waves in the roughly audio sort of range. Our Rigol scopes measure phase shift automatically, and we're going to do some tests to verify accuracy.

I wonder how oscilloscopes do the math. Anybody know? Any experience with this?

--

John Larkin         Highland Technology, Inc 

lunatic fringe electronics
Reply to
John Larkin
Loading thread data ...

Probably by simple subtraction of their real and imaginary parts. Pretty much what we humans used to do in the Lissajous mode.

I used Lissajous at a client some years ago and quickly had several engineers staring at the scope. "What *IS* this?" ... "Lissajous figures, I want to see if the phase relationship has flutter on it and how much" ... "Lissa_what?"

--
Regards, Joerg 

http://www.analogconsultants.com/
Reply to
Joerg

torsdag den 25. oktober 2018 kl. 16.51.02 UTC+2 skrev John Larkin:

zero crossings, cross correlation or curve fit, I'd guess

Reply to
Lasse Langwadt Christensen

No idea, I guess I'd try and 'break' it. Different time bases, traces off scale, some distortion, what happens if there are two slightly different frequencies?

George H.

Reply to
George Herold

Complex FFT?

Here's an article that mentions correlation, which makes sense. Cross-correlate and look for the peak or maybe the zero crossing?

formatting link

Like most EDN content, it's kind of goofy about units and details.

--

John Larkin         Highland Technology, Inc 
picosecond timing   precision measurement  

jlarkin att highlandtechnology dott com 
http://www.highlandtechnology.com
Reply to
John Larkin

torsdag den 25. oktober 2018 kl. 21.53.19 UTC+2 skrev John Larkin:

formatting link

Reply to
Lasse Langwadt Christensen

Zero crossing is not reliable on a noisy signal, correlation is. In the background you can see that they are displaying the Lissajous result, the oval trace (magenta?). My color vision isn't all that great. Sez SWMBO, who picks my clothes for more formal events because I'd mess that up.

It's essentially feeding one signal into the Y axis, the other into the X-axis. No time base. Lissajous, a blast from the past :-)

There are many ways to do it and maybe they use correlation. Processing power is almsot "free" these days.

--
Regards, Joerg 

http://www.analogconsultants.com/
Reply to
Joerg

Good stuff there. If we don't like or don't understand the Rigol measurement, we can suck out the waveforms and do the math ourselves.

We'll be using sine waves and really want the phase shift of the fundamentals, namely ignore any harmonics or DC offsets.

Correlating the sines, or correlating each waveform against a perfect sine of the same frequency, might be good. Compare the zero crossings of the correlation.

At our low frequency, we could have long records of massively oversampled sines and a lot of windowing on the ends.

A windowed complex FFT wouldn't be out of the question either.

I want a fraction of a degree in the roughly audio range.

--

John Larkin         Highland Technology, Inc 
picosecond timing   precision measurement  

jlarkin att highlandtechnology dott com 
http://www.highlandtechnology.com
Reply to
John Larkin

My color vision is excellent. It's just my taste in colors that's awful.

--

John Larkin         Highland Technology, Inc 
picosecond timing   precision measurement  

jlarkin att highlandtechnology dott com 
http://www.highlandtechnology.com
Reply to
John Larkin

You took the words right out of my mouth... I'm the same way.

I remember a description of a character in a story... he had a habit of "wearing a tie that would frighten a newspaperman." I can only infer that reporters tend to have a fashion sense about as bad as mine.

Reply to
Dave Platt

Hmm, if you had both quadratures you could do a lockin type thing.

George H.

Reply to
George Herold

scary, if they're the engineers. I suspect things may be all that way in 30 years time.

NT

Reply to
tabbypurr

All the kids are busy typing code. Learning about electricity is hard work.

I found a guy who lives a mile or so away, who is typing code (gig web page design) who says he is passionate about electronics. I signed him up as an intern; we'll see.

It occurrs to me that one has to learn an enormous amount of stuff to become a good electronics designer. Coding is a lot more "pure."

--

John Larkin         Highland Technology, Inc 
picosecond timing   precision measurement  

jlarkin att highlandtechnology dott com 
http://www.highlandtechnology.com
Reply to
John Larkin

One approach that can work pretty well is a Hilbert transform implemented with an STFT filter, basically an FFT/IFFT combo with appropriate windowing and overlapping to handle buffered data. The Hilbert transform turns the real data into an analytic signal and atan2() does the rest. If you need less noise, you can shift the I/Q signal down to near DC and LPF it before the phase detection.

There is an STFT_FILTER class in my random collection of DSP function

formatting link
that I use for this sort of thing. Or there's probably an easy way to rig up a suitable filter in MATLAB if you aren't looking to write any low-level code.

The scope is almost certainly just looking at zero crossings and calling it a day.

-- john, KE5FX

Reply to
John Miles, KE5FX

We'll have volts of clean signal, so s/n should be good. This is to test our fuel level gauge simulator box, which simulates a 3-wire coaxial capacitive level sensor, with both capacitive (jet fuel) and resistive (crud) components.

Thanks, I'll pass that on to my math types. We'll be doing the math in Python; we already have a bunch of libraries for the 500 MHz Rigol scope, so we could add some more code.

We just bought some C0G caps and put them into little BNC connectorized Pomona boxes and sent them to IET. They will measure them for us to something better than 0.02%. We'll use those to cal our test set that tests the level simulators.

IET is the inheritor of the standards and measurement parts of General Radio.

formatting link

They seem awfully nice.

--

John Larkin         Highland Technology, Inc 
picosecond timing   precision measurement  

jlarkin att highlandtechnology dott com 
http://www.highlandtechnology.com
Reply to
John Larkin

Do you worry about things like temp, humidity, some other weird thing I'm not thinking of?

Oh dear, I love general radio. My first time in the lab some gen rad frequency generator broke. The manual had everything, and inside a week (I was doing other things too.) I found the signals that weren't right, tweaked the bias on a transistor a bit, and never had another problem.

George H.

Reply to
George Herold

Zero crossing throws away most of the data. Cross correlation would be messy.

I'd go for curve fit myself, but I got immersed in least square fittings of data to non-linear multiparameter model when I was a graduate student.

Fitting a pair of sine waves to two different sets of data and comparing the phase and frequency parameters is a linear fitting problem and essentially trivial, though you'd have to crunch quite a few numbers to do it precisely.

--
Bill Sloman, Sydney
Reply to
bill.sloman

It's no Lissajous explaining it to them.

Tim

--
Seven Transistor Labs, LLC 
Electrical Engineering Consultation and Design 
Website: https://www.seventransistorlabs.com/
Reply to
Tim Williams

My TDS460 says in the manual:

-=-=-

Phase Timing measurement. The amount of phase shift, expressed in degrees of the target waveform cycle, between the /MidRef/ crossings of two different waveforms. Waveforms measured should be of the same frequency or one waveform should be a harmonic of the other.

Phase is a dual waveform measurement; that is, it is measured from a target waveform to a reference waveform. To get a specific phase measurement, specify the target and reference sources.

Phase is determined in the following manner:

  1. The first /MidRefCrossing (MCross1Target)/ and third (/MCross3/) in the source (Target) waveform are found.
  2. The period of the target waveform is calculated (se "Period" above).
  3. The first /MidRefCrossing (MCross1Ref)/ in the reference waveform crossing in the same direction (polarity) as that found /MCross1Target/ for the target waveform is found.
  4. The phase is determined by the following: /Phase = ((MCross1Ref - MCross1Target) / Period) x 360/ If the target waveform leads the reference waveform, phase is positive; if it lags, negative.

Phase is not available in the Snapshot display.

-=-=-

Ref levels (thresholds) are set in a menu, typically 50% between max and min (and 10 and 90% for rise/fall measurements). Crossings are counted starting from time 0, or from the left of the window of a gated measurement. A 10% (of amplitude) hysteresis is applied after the first crossing, and so on.

The accompanying diagram seems to suggest that the result is calculated in floating point, so has sub-sample accuracy for rapidly changing signals (presumably, following whatever interpolation is set?).

So, just a basic edge detector method. Fragile, but general enough not to care what the waveform is, and to work in most cases. (Noisy waveforms usually give an "unstable histogram" warning but remain useful, except when an unstable trigger or incomplete acquisition in EQ sampling mode happens...)

Tim

--
Seven Transistor Labs, LLC 
Electrical Engineering Consultation and Design 
Website: https://www.seventransistorlabs.com/ 

"John Larkin"  wrote in message  
news:irl3tdp7lfdik4fb7ji2haahe3n6o1lbgg@4ax.com... 
> We want to measure the phase shift of a pair of sine waves in the 
> roughly audio sort of range. Our Rigol scopes measure phase shift 
> automatically, and we're going to do some tests to verify accuracy. 
> 
> I wonder how oscilloscopes do the math. Anybody know? Any experience 
> with this? 
> 
> 
> --  
> 
> John Larkin         Highland Technology, Inc 
> 
> lunatic fringe electronics 
>
Reply to
Tim Williams

C0Gs, used at low voltages, are very stable. We'll check them once a year and see how they're doing.

GR somehow never made it into the digital age. They did have an automated test system, a Teradyne sort of thing, but I don't know what happened to that.

Their decade resistor and K-V divider boxes were (still are) great.

--

John Larkin         Highland Technology, Inc 

lunatic fringe electronics
Reply to
John Larkin

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.