Author Topic: Making accurate low frequency measurements with your scope  (Read 9979 times)

0 Members and 1 Guest are viewing this topic.

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 12033
  • Country: us
Making accurate low frequency measurements with your scope
« on: December 06, 2015, 04:51:16 pm »
I was thinking about this after someone had posted a comment on my AC power measurement video.   

The LeCroy scopes have a fairly deep buffer and I was going to try and over sample the the crap out of the signal I want to measure and a precision reference to remove the drift (assuming the channels track).   

Not knowing anything about the ADCs they used in these, I was going to just try it and see how far I could push it.

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 20040
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Making accurate low frequency measurements with your scope
« Reply #1 on: December 06, 2015, 05:26:34 pm »
Accurate what? Voltage? Time? Noise? Statistics?

Accurate in the sense of precision, or resolution, or repeatability?
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 12033
  • Country: us
Re: Making accurate low frequency measurements with your scope
« Reply #2 on: December 06, 2015, 07:42:18 pm »
All of the above!   :-DD   

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 20040
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Making accurate low frequency measurements with your scope
« Reply #3 on: December 06, 2015, 08:19:41 pm »
OK, to don't even have a wish list, nor even a requirement definition, let alone a specification.

Come back when you have an answerable question
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 12033
  • Country: us
Re: Making accurate low frequency measurements with your scope
« Reply #4 on: December 06, 2015, 08:35:50 pm »
Did I ask a question?     That is a question.     :-DD

Online vk6zgo

  • Super Contributor
  • ***
  • Posts: 7654
  • Country: au
Re: Making accurate low frequency measurements with your scope
« Reply #5 on: December 07, 2015, 01:30:31 am »
What does your 'scope's sample rate reduce to when you are looking at one,or several cycles at 60Hz?
Can you force your 'scope to use a higher sample rate?

Wuerstchenhund is very knowledgeable on all things Lecroy--he can probably give you all the information you need on using one of their 'scopes to do what you want to do.
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 12033
  • Country: us
Re: Making accurate low frequency measurements with your scope
« Reply #6 on: December 07, 2015, 01:54:47 am »
What does your 'scope's sample rate reduce to when you are looking at one,or several cycles at 60Hz?
Can you force your 'scope to use a higher sample rate?

Wuerstchenhund is very knowledgeable on all things Lecroy--he can probably give you all the information you need on using one of their 'scopes to do what you want to do.

I plan to stay with the 64Xi and have control over the sample rate.   The scope presents the data as 8-bits.  I am not sure how they arrange them.  For example, the old NSC ADC (now TI) would run 4 ADCs in a package to get the sample rate up.   Non-linearity between the ADCs inside the chip are easily measurable.    My old LeCroys used 4 ADCs that have adjustments to trim their offsets.   Similar to the NSC parts but very old....

After looking at the IEC 61000-3-2 standard, they look at 40 harmonics out.   We use 60Hz, so 2400Hz on the high end.  Just thinking, say to add six bits, that's  4096 * 4800ish or just under 20MHz.     

When I made that little demo, I was looking at 10 cycles to calculate the power.  Well under 15 million data points (current, voltage and reference).  I think the 64Xi has gigabit Ethernet but I have not tried to pull anything off it.  It may be slow compared with the WM.     

Then I don't know what the ADC is doing.   My plan was to just try some things out and see if I could improve the measurement.

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 12033
  • Country: us
Re: Making accurate low frequency measurements with your scope
« Reply #7 on: December 07, 2015, 03:47:23 am »
There are lots of cheap MCU with built in 12 bit 1Msps ADC, achieving at least true 11 bit accuracy at full speed. You can add some noise and oversample at 64x, which gives you true 14 bit accuracy at 16ksps.

Or, just check if your scope has 12 bit mode. Many modern scopes have 12 bit mode, which is literally 4 bit oversampled from 8 bit ADC. There are some true 12 bit scopes, but neither of them are cheap enough to be considered a one time use tool.

Agree and I think if I wanted to make something people could replicate, this would be the way to go and forget the scope.   The 64Xi does support their ERES mode.

For this little exercise, I would like to use the scope with just the raw data.  It's just for fun. 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 12033
  • Country: us
Re: Making accurate low frequency measurements with your scope
« Reply #8 on: December 08, 2015, 05:01:36 am »
With the scope set to 10V/div, 80V full scale (313mV/count for 8-bit raw data), plot showing the DSO collecting 10.0V from my Fluke standard for about 20 minutes.    The DSO had been running about 2 hours before I collected this data.   

I used 3X over the 2400Hz (40th harmonic) with 12-bits, or about 1.8MHz, and set it to 2.  I have not tried to push it out another bit yet.  10MHz, for a half second seems very doable.   

The transfer rates are no problem with it.  I am collecting about about a half second of data, or 30 cycles.  This is the whole delay, waiting for the next half second.     

My plan was to use this to compensate for the drift. 

Anyway, looks like I could improve on my initial measurements somewhat. 


Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 12033
  • Country: us
Re: Making accurate low frequency measurements with your scope
« Reply #9 on: December 09, 2015, 03:33:09 am »
If I use two channels set to the same gain with one input attenuated then watch the gain and offset drift, appears most of the drift is offset.   Really don't care about the DC drift for this 60Hzish stuff,  so plan to just calibrate it and call it good.   Attempting to stay with the 7200ish Hz, and going to 5 bits with the same 30 cycles brings things to a crawl.   Need to get a good programmable source on it next.   

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 20040
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Making accurate low frequency measurements with your scope
« Reply #10 on: December 09, 2015, 07:43:47 am »
Simple way to measure frequency offset is to apply an accurate 60Hz to one axis, the unknown frequency to the other axis, and time how long it takes for the lissajous pattern to return to its original shape.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline SL4P

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
  • There's more value if you figure it out yourself!
Re: Making accurate low frequency measurements with your scope
« Reply #11 on: December 09, 2015, 08:13:47 am »
Just my 2c worth, and I say this as I have never had to work with very low frequencies...

There is probably an arbitrary threshold where 'frequency' becomes less relevant - in favour of 'wavelength' (period) as a more meaningful meaasure...

Anything with too low a frequency will create problems to accurtely identify the sampling points - so a 'best guess' of the peak-to-peak sample points will be somewhat more meaningful. ??

If you really need to know the 'frequency', then do the math from the period - being aware that the precision to the right of the decimal is going to be pretty loose compared to higher frequencies / shorter wavelengths with clearly defined / sharp peaks.
Don't ask a question if you aren't willing to listen to the answer.
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 12033
  • Country: us
Re: Making accurate low frequency measurements with your scope
« Reply #12 on: December 10, 2015, 12:48:22 pm »
The DSO's sample clock is more than stable enough to determine the fundamental.  The FFT is ran on the oversampled/decimate  data w/ Hanning.   Next time I have it running, I'll pull some data.   Next thing is to setup a precision source to the ADC. 

Online vk6zgo

  • Super Contributor
  • ***
  • Posts: 7654
  • Country: au
Re: Making accurate low frequency measurements with your scope
« Reply #13 on: December 11, 2015, 01:18:28 am »
Just my 2c worth, and I say this as I have never had to work with very low frequencies...

There is probably an arbitrary threshold where 'frequency' becomes less relevant - in favour of 'wavelength' (period) as a more meaningful meaasure...

Anything with too low a frequency will create problems to accurtely identify the sampling points - so a 'best guess' of the peak-to-peak sample points will be somewhat more meaningful. ??

If you really need to know the 'frequency', then do the math from the period - being aware that the precision to the right of the decimal is going to be pretty loose compared to higher frequencies / shorter wavelengths with clearly defined / sharp peaks.

Period (1/f) is not synonymous with wavelength.

Wavelength is the distance in metres which an electromagnetic wave will travel in one second,in free space (strictly speaking,in a vacuum,but air is near as dammit) between a reference point on one cycle of the waveform & the same point on the following cycle (zero crossings,for instance).

This is c/f where c is the speed of light (approx 300,000,000 metres/s)

Just as an example,the wavelength of the US 60Hz Mains is approx 16.667km.
 

Offline rch

  • Regular Contributor
  • *
  • Posts: 168
  • Country: wales
Re: Making accurate low frequency measurements with your scope
« Reply #14 on: December 11, 2015, 02:05:47 am »
I think you mean distance travelled in 1/f seconds.  And while the same point in the cycle is reached simultaneously at both ends of the wavelength it is only easy to measure this with a standing wave of some sort (but that a bit of an old-fashioned method).
 

Offline seabell

  • Contributor
  • Posts: 10
  • Country: tt
Re: Making accurate low frequency measurements with your scope
« Reply #15 on: December 11, 2015, 02:27:54 am »
Just as an example,the wavelength of the US 60Hz Mains is approx 16.667km.

 :o Might want to double-check your maths there, vk6zgo ;)

Not trying to be obnoxious, as I'm learning a lot from you guys here, but even a relative simpleton like me can see that's not right. Isn't it almost 5000km?
« Last Edit: December 11, 2015, 02:33:59 am by seabell »
Be VERY wary of Siglent. They foist firmware that's barely past alpha stage on their customers, then expect YOU to cover the costs when your shiny new Sigbox turns tits-up.
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 12033
  • Country: us
Re: Making accurate low frequency measurements with your scope
« Reply #16 on: December 11, 2015, 02:49:53 am »
Frequency plot of the fundamental using the 64Xi after a 2 hour warmup with no changes to the sampling (2MHz, accumulated, decimated, fft windowed......).   

Also was able to get a good source hooked to the thing tonight and collected a few hours of data to nail down the gain/offset drift.       




Online vk6zgo

  • Super Contributor
  • ***
  • Posts: 7654
  • Country: au
Re: Making accurate low frequency measurements with your scope
« Reply #17 on: December 11, 2015, 03:16:49 am »
Just as an example,the wavelength of the US 60Hz Mains is approx 16.667km.

 :o Might want to double-check your maths there, vk6zgo ;)

Not trying to be obnoxious, as I'm learning a lot from you guys here, but even a relative simpleton like me can see that's not right. Isn't it almost 5000km?

Of course,you are right-----that's what comes of miskeying a calculator & not checking the results.
 

Online vk6zgo

  • Super Contributor
  • ***
  • Posts: 7654
  • Country: au
Re: Making accurate low frequency measurements with your scope
« Reply #18 on: December 11, 2015, 03:31:05 am »
I think you mean distance travelled in 1/f seconds.  And while the same point in the cycle is reached simultaneously at both ends of the wavelength it is only easy to measure this with a standing wave of some sort (but that a bit of an old-fashioned method).

I haven't exactly covered myself with glory,have I?

Some times it doesn't pay to be a smart-a*se.  :-[

Yes,it is the distance travelled in the period.
The theoretical construct seems to be of an observer at a point in space watching the signal pass by,but yes,the classic method would be to look at it with a standing wave,using Lecher lines or similar.
Measuring frequency (or period)  is a lot easier,these days.
 

Offline rch

  • Regular Contributor
  • *
  • Posts: 168
  • Country: wales
Re: Making accurate low frequency measurements with your scope
« Reply #19 on: December 11, 2015, 11:12:16 am »
It's easy to writes something straightforward down wrong if one isn't concentrating!   i only made the correction in case any newcomers were mystified.
 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 12033
  • Country: us
Re: Making accurate low frequency measurements with your scope
« Reply #20 on: December 11, 2015, 11:16:45 pm »
Looked at the data I collected from the 64Xi last night.  Basically using three voltage levels to look at the gain and offset for two channels.  It's really stable once it's warmed up.  This is the second test I have ran now looking at the drift.     Next I need to look at the linearity of the ADC.   A little more Labview code to get this setup.

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 12033
  • Country: us
Re: Making accurate low frequency measurements with your scope
« Reply #21 on: December 12, 2015, 02:28:55 am »
I added the control for the precision DAC to the program to allow it to step.

Picture shown is with 64Xi set to 2V/division scale.   Normally, 8 divisions or 16V/2^8 or 62.5mV / count.   Shown using 256 X oversample and decimation.  Or 16/4096 or 4mV/count.   The DSO was not warmed up yet, notice the offset after autocal. 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 12033
  • Country: us
Re: Making accurate low frequency measurements with your scope
« Reply #22 on: December 12, 2015, 02:31:11 am »
Same data but with the Labview plot zoomed in to 5mV/division. 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 12033
  • Country: us
Re: Making accurate low frequency measurements with your scope
« Reply #23 on: December 12, 2015, 03:08:00 am »
Current (red) trace set to 1V/division.    Voltage (white) trace set to 2V/division.   Both channels in parallel, 256X oversample.   Note that it appears that the red trace begins to go nonlinear about a volt below saturation.   

Looks good.  I'll run a fit on it. 

Offline joeqsmithTopic starter

  • Super Contributor
  • ***
  • Posts: 12033
  • Country: us
Re: Making accurate low frequency measurements with your scope
« Reply #24 on: December 15, 2015, 12:45:35 am »
Least squares fit.  INL looks pretty bad.   


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf