Author Topic: Zooming *IN* [actually: signal reconstruction]  (Read 4334 times)

0 Members and 1 Guest are viewing this topic.

Offline balnazzarTopic starter

  • Frequent Contributor
  • **
  • Posts: 417
  • Country: it
Zooming *IN* [actually: signal reconstruction]
« on: October 21, 2022, 05:43:12 pm »
Zooming IN with the scope can be dangerous too, if done carelessly...:

https://youtu.be/W4twnd-YQQ4

Note that the KS, having *less* memory depth, automatically turns Sinc interpolation off...

But an interesting thing I'd like experienced people to clarify (or our host hisself), is that Dave gives us some numbers (position 8:10 circa): "sinc int. works well when we have more than a 4 samples per period".
Note that the scope is sampling at 2.5:1 ratio, and indeed the signal's reconstruction is far from perfect. This seems to give credit to Dave's rule of thumb, and, as he turns off the 2nd channel, the signal looks virually perfectly reconstructed (5 samples per period), while linear interpolation still sucks.

But look at this: https://www.tek.com/en/documents/application-note/real-time-versus-equivalent-time-sampling

Basically it says that Tek scopes can reconstruct the signal with just 2.5 samples per period.

This seems to be confirmed by Chris Rehorn at KS, who in https://siglent.fi/data/technical-common/Sin(x)x_Agilent.pdf says:

In reality, as long as the rules of Nyquist are not violated, an oscilloscope can reconstruct a user’s signal identically. This reconstruction process is often referred to as sin(x)/x interpolation. Whether the sample rate is 25x the Nyquist frequency, or 2.5x the Nyquist frequency, interpolation can be used to reproduce the waveform exactly as it appeared at the oscilloscopes input connector, removing all doubt about a signal’s behaviour between samples.

And:

Nyquist’s most famous theoremproposes that a signal can be reconstructed perfectly from discrete samples if the following two rules are observed:
1. The highest frequency component sampled must be less than half the sampling frequency and
2. Samples must be acquired in equally spaced intervals


Note that nothing is said about an infinite number of samples, presumably because he wants to talk about oscilloscopes (hence not 2X, but just 2.5X).

I'd like to know which of these hypotheses did the scope in Dave's video violate. Maybe the front end was ineffective at discarding the high frequency components due to roll off from being at maximum (3 db) frequency, as he seems to hint? If so, would you elaborate upon this particular point? Thanks.
« Last Edit: October 21, 2022, 05:59:26 pm by balnazzar »
 

Offline Fungus

  • Super Contributor
  • ***
  • Posts: 17518
  • Country: 00
Re: Zooming *IN* [actually: signal reconstruction]
« Reply #1 on: October 21, 2022, 06:13:14 pm »
Note that the scope is sampling at 2.5:1 ratio, and still the signal reconstruction is far from perfect.

I'd like to know which of these hypotheses did the scope in Dave's video violate.

At around 7:30-8:00 in the video?

I think the problem is that sin(x)/x is an infinitely wide function and oscilloscopes have to be practical so they only apply a small window of it (the central part of the sinc curve) in their reconstructions. Some manufacturers will have a wider window than others.

ie. 2.5x is correct in theory but putting it into practice can be difficult.

Dave's "4x" number doesn't come from theory, it's pulled out of thin air based on practical experience working with that particular 'scope (and maybe some others), hence the overlayed comment at 8:20 that starts with "In practice..."

Maybe the front end was ineffective at discarding the high frequency components due to roll off from being at maximum (3 db) frequency, as he seems to hint?

The 'scope's bandwidth rolloff doesn't apply when the input is a pure sine wave, there's no harmonics to break Nyquist.
« Last Edit: October 21, 2022, 06:15:14 pm by Fungus »
 
The following users thanked this post: balnazzar

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 6401
  • Country: es
Re: Zooming *IN* [actually: signal reconstruction]
« Reply #2 on: October 21, 2022, 06:20:58 pm »
How in earth is this dangerous? Innacurate, yes.

Try zooming a 1MHz wave sampled at 50us/div with any average scope, good luck with that!
Only high-end equipment will be able to zoom-in so much with accuracy, definitely not the average sub-$600 scope, though these devices are getting better each year and I could be wrong.
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline tautech

  • Super Contributor
  • ***
  • Posts: 29808
  • Country: nz
  • Taupaki Technologies Ltd. Siglent Distributor NZ.
    • Taupaki Technologies Ltd.
Re: Zooming *IN* [actually: signal reconstruction]
« Reply #3 on: October 21, 2022, 06:29:46 pm »
How in earth is this dangerous? Innacurate, yes.
Youtuber clickbaiters just don't care, they only want views.
Avid Rabid Hobbyist.
Some stuff seen @ Siglent HQ cannot be shared.
 
The following users thanked this post: Someone

Online bdunham7

  • Super Contributor
  • ***
  • Posts: 8175
  • Country: us
Re: Zooming *IN* [actually: signal reconstruction]
« Reply #4 on: October 21, 2022, 06:30:33 pm »
I have a problem with any statement that refers to Nyquist and to 'perfect' reconstruction.  The reconstruction is never, ever perfect.  There are always errors such as mathematical truncation (you can't compute everything to an infinite number of decimal places...), quantization (8-bits has its limitations), noise, input amplifier distortion and group delay, width of signal memory and the sinc function as applied, and probably more things.  The more samples you have, the less the reconstruction depends on any one sample or calculation so it becomes easier and easier to get a good (again--not perfect, ever!) result.

As a practical matter, reconstruction from 2.01 samples per cycle would only be practical for on-paper mathematical examples calculated to many decimal places, whereas reconstruction from 100 samples per cycle will work no matter how bad the method--even just showing the dots would obviously work fine.  In between those two extremes you have practical limits.  With ideal conditions 2.5X is possible, but even a little bit of noise will make the results distorted and jumpy.  4-5X typically gives good results under most conditions, although again it is never perfectly correct.   I don't know exactly what caused the result in the video that you mention, but I think if he had done continuous acquisition instead of a single shot you'd see a noisy, jumpy signal.
A 3.5 digit 4.5 digit 5 digit 5.5 digit 6.5 digit 7.5 digit DMM is good enough for most people.
 
The following users thanked this post: egonotto, balnazzar

Offline tautech

  • Super Contributor
  • ***
  • Posts: 29808
  • Country: nz
  • Taupaki Technologies Ltd. Siglent Distributor NZ.
    • Taupaki Technologies Ltd.
Re: Zooming *IN* [actually: signal reconstruction]
« Reply #5 on: October 21, 2022, 06:36:35 pm »
I have a problem with any statement that refers to Nyquist and to 'perfect' reconstruction.  The reconstruction is never, ever perfect.  There are always errors such as mathematical truncation (you can't compute everything to an infinite number of decimal places...), quantization (8-bits has its limitations), noise, input amplifier distortion and group delay, width of signal memory and the sinc function as applied, and probably more things.  The more samples you have, the less the reconstruction depends on any one sample or calculation so it becomes easier and easier to get a good (again--not perfect, ever!) result.

As a practical matter, reconstruction from 2.01 samples per cycle would only be practical for on-paper mathematical examples calculated to many decimal places, whereas reconstruction from 100 samples per cycle will work no matter how bad the method--even just showing the dots would obviously work fine.  In between those two extremes you have practical limits.  With ideal conditions 2.5X is possible, but even a little bit of noise will make the results distorted and jumpy.  4-5X typically gives good results under most conditions, although again it is never perfectly correct.   I don't know exactly what caused the result in the video that you mention, but I think if he had done continuous acquisition instead of a single shot you'd see a noisy, jumpy signal.
Yep this is all scope newbie stuff learned shortly after getting a scope and AWG and pushing limits like we do.

Can't afford a HF AWG then get some old RF gen and start pushing the limits and learn all this basic stuff first hand.
Avid Rabid Hobbyist.
Some stuff seen @ Siglent HQ cannot be shared.
 
The following users thanked this post: balnazzar

Offline balnazzarTopic starter

  • Frequent Contributor
  • **
  • Posts: 417
  • Country: it
Re: Zooming *IN* [actually: signal reconstruction]
« Reply #6 on: October 21, 2022, 06:47:40 pm »

I think the problem is that sin(x)/x is an infinitely wide function and oscilloscopes have to be practical so they only apply a small window of it (the central part of the sinc curve) in their reconstructions. Some manufacturers will have a wider window than others.


Understood, thanks.


The 'scope's bandwidth rolloff doesn't apply when the input is a pure sine wave, there's no harmonics to break Nyquist.

But no awg is capable of providing a true pure sine wave...
 

Offline balnazzarTopic starter

  • Frequent Contributor
  • **
  • Posts: 417
  • Country: it
Re: Zooming *IN* [actually: signal reconstruction]
« Reply #7 on: October 21, 2022, 06:50:06 pm »
How in earth is this dangerous? Innacurate, yes.

Dangerous not in physical sense, of course. I poses a danger to measurements, up to the point that you see a completely different signal. That's a bit worse than just inaccurate.
 

Offline Fungus

  • Super Contributor
  • ***
  • Posts: 17518
  • Country: 00
Re: Zooming *IN* [actually: signal reconstruction]
« Reply #8 on: October 21, 2022, 06:50:37 pm »
How in earth is this dangerous? Innacurate, yes.
Youtuber clickbaiters just don't care, they only want views.

Relax, this one wasn't an anti-Siglent video.
 

Offline Fungus

  • Super Contributor
  • ***
  • Posts: 17518
  • Country: 00
Re: Zooming *IN* [actually: signal reconstruction]
« Reply #9 on: October 21, 2022, 06:53:46 pm »
How in earth is this dangerous? Innacurate, yes.

Dangerous not in physical sense, of course. I poses a danger to measurements, up to the point that you see a completely different signal. That's a bit worse than just inaccurate.

This is where (eg.) the Rigol MSO5000s 8GHz sample rate is a big advantage. It's 6x Nyquist where most scopes aim for 2.5x.

It's not always about "noise". Other numbers matter, too.
 
The following users thanked this post: balnazzar

Offline tautech

  • Super Contributor
  • ***
  • Posts: 29808
  • Country: nz
  • Taupaki Technologies Ltd. Siglent Distributor NZ.
    • Taupaki Technologies Ltd.
Re: Zooming *IN* [actually: signal reconstruction]
« Reply #10 on: October 21, 2022, 07:23:00 pm »
How in earth is this dangerous? Innacurate, yes.
Youtuber clickbaiters just don't care, they only want views.

Relax, this one wasn't an anti-Siglent video.
FFS Fungus, that's kids stuff. Maybe you need get a RF gen and find this stuff out for yourself.
Avid Rabid Hobbyist.
Some stuff seen @ Siglent HQ cannot be shared.
 

Offline balnazzarTopic starter

  • Frequent Contributor
  • **
  • Posts: 417
  • Country: it
Re: Zooming *IN* [actually: signal reconstruction]
« Reply #11 on: October 21, 2022, 09:30:03 pm »

Dangerous not in physical sense, of course. I poses a danger to measurements, up to the point that you see a completely different signal. That's a bit worse than just inaccurate.

This is where (eg.) the Rigol MSO5000s 8GHz sample rate is a big advantage. It's 6x Nyquist where most scopes aim for 2.5x.

It's not always about "noise". Other numbers matter, too.
[/quote]

True.

...But if it had been just a bit less noisy...  ;D
 

Online bdunham7

  • Super Contributor
  • ***
  • Posts: 8175
  • Country: us
Re: Zooming *IN* [actually: signal reconstruction]
« Reply #12 on: October 21, 2022, 09:36:05 pm »
This is where (eg.) the Rigol MSO5000s 8GHz sample rate is a big advantage. It's 6x Nyquist where most scopes aim for 2.5x.

It's not always about "noise". Other numbers matter, too.

Sure, it's probably better if you happen to need a solid response to 350MHz on more than two channels at once. 
A 3.5 digit 4.5 digit 5 digit 5.5 digit 6.5 digit 7.5 digit DMM is good enough for most people.
 

Online Bud

  • Super Contributor
  • ***
  • Posts: 7275
  • Country: ca
Re: Zooming *IN* [actually: signal reconstruction]
« Reply #13 on: October 21, 2022, 09:47:23 pm »
Nyquist’s most famous theoremproposes that a signal can be reconstructed perfectly from discrete samples if the following two rules are observed:
1. The highest frequency component sampled must be less than half the sampling frequency and
2. Samples must be acquired in equally spaced intervals

There is a flaw in this statement because it gives no guidellines as to how low the amplitude of a high frequency component is considered practically sufficient for satisfactory visual reproduction of the waveform on the oscilloscope screen. Based on the  rules quoted above, a 20GHz s scope would not be able to perfectly reconstruct my 1kHz square wave because the spectrum of my square wave is infinite.
Facebook-free life and Rigol-free shack.
 
The following users thanked this post: balnazzar

Offline tautech

  • Super Contributor
  • ***
  • Posts: 29808
  • Country: nz
  • Taupaki Technologies Ltd. Siglent Distributor NZ.
    • Taupaki Technologies Ltd.
Re: Zooming *IN* [actually: signal reconstruction]
« Reply #14 on: October 21, 2022, 10:07:11 pm »
How in earth is this dangerous? Innacurate, yes.

Dangerous not in physical sense, of course. I poses a danger to measurements, up to the point that you see a completely different signal. That's a bit worse than just inaccurate.

This is where (eg.) the Rigol MSO5000s 8GHz sample rate is a big advantage. It's 6x Nyquist where most scopes aim for 2.5x.

It's not always about "noise". Other numbers matter, too.
They do.
Turn on all 4 channels and look what happens to your 8GSa/s.
Avid Rabid Hobbyist.
Some stuff seen @ Siglent HQ cannot be shared.
 

Offline Fungus

  • Super Contributor
  • ***
  • Posts: 17518
  • Country: 00
Re: Zooming *IN* [actually: signal reconstruction]
« Reply #15 on: October 21, 2022, 10:18:13 pm »
Based on the  rules quoted above, a 20GHz s scope would not be able to perfectly reconstruct my 1kHz square wave because the spectrum of my square wave is infinite.

Correct, although whether or not you'd be able to see the difference on screen is another matter.

PS: If it's an 8-bit ADC then you can only ever show 128 harmonics of a square wave so a 20Mhz, 8-bit DSO would show the same as a 20GHz, 8-bit DSO.  :)
 
The following users thanked this post: balnazzar

Offline Fungus

  • Super Contributor
  • ***
  • Posts: 17518
  • Country: 00
Re: Zooming *IN* [actually: signal reconstruction]
« Reply #16 on: October 21, 2022, 10:19:31 pm »
This is where (eg.) the Rigol MSO5000s 8GHz sample rate is a big advantage. It's 6x Nyquist where most scopes aim for 2.5x.

It's not always about "noise". Other numbers matter, too.
They do.
Turn on all 4 channels and look what happens to your 8GSa/s.

Umm... I get 2Ghz per channel?

ie. 6x Nyquist, the number I already posted above.
 

Offline switchabl

  • Frequent Contributor
  • **
  • Posts: 445
  • Country: de
Re: Zooming *IN* [actually: signal reconstruction]
« Reply #17 on: October 21, 2022, 11:55:15 pm »
PS: If it's an 8-bit ADC then you can only ever show 128 harmonics of a square wave so a 20Mhz, 8-bit DSO would show the same as a 20GHz, 8-bit DSO.  :)

I would suggest that you measure the rise-time with both scopes and then you may want to reconsider this statement...
 

Offline balnazzarTopic starter

  • Frequent Contributor
  • **
  • Posts: 417
  • Country: it
Re: Zooming *IN* [actually: signal reconstruction]
« Reply #18 on: October 22, 2022, 12:05:28 am »
Nyquist’s most famous theoremproposes that a signal can be reconstructed perfectly from discrete samples if the following two rules are observed:
1. The highest frequency component sampled must be less than half the sampling frequency and
2. Samples must be acquired in equally spaced intervals

There is a flaw in this statement because it gives no guidellines as to how low the amplitude of a high frequency component is considered practically sufficient for satisfactory visual reproduction of the waveform on the oscilloscope screen. Based on the  rules quoted above, a 20GHz s scope would not be able to perfectly reconstruct my 1kHz square wave because the spectrum of my square wave is infinite.

Good point.. I'm looking forward to reading more people's comments on that...
 

Online bdunham7

  • Super Contributor
  • ***
  • Posts: 8175
  • Country: us
Re: Zooming *IN* [actually: signal reconstruction]
« Reply #19 on: October 22, 2022, 12:25:16 am »
PS: If it's an 8-bit ADC then you can only ever show 128 harmonics of a square wave so a 20Mhz, 8-bit DSO would show the same as a 20GHz, 8-bit DSO.  :)

I don't think that makes sense mathematically.  At the rising and falling edges all of the (odd) harmonics add, although they don't add at their peaks so it gets complicated and hard to visualize or make up simple hand-wavy explanations..  You don't see the individual harmonics, you see their sum.  So harmonics 127 + 129 add up to more than 1 LSB, as do harmonics 247-265, even though individually they wouldn't. 
A 3.5 digit 4.5 digit 5 digit 5.5 digit 6.5 digit 7.5 digit DMM is good enough for most people.
 
The following users thanked this post: rf-loop, egonotto, 2N3055

Offline noisyee

  • Contributor
  • Posts: 45
  • Country: cn
Re: Zooming *IN* [actually: signal reconstruction]
« Reply #20 on: October 22, 2022, 01:48:01 am »
I'd like to know which of these hypotheses did the scope in Dave's video violate. Maybe the front end was ineffective at discarding the high frequency components due to roll off from being at maximum (3 db) frequency, as he seems to hint? If so, would you elaborate upon this particular point? Thanks.

It seems Dave feeding some not so ideal sine wave to the scope so it cause artifact by interpolation.
To my own experience, you can hardly benefit from interpolation if you push to the 2.5X ratio limit since in reality pure sine wave don't exist, needless to say the front end itself will distort your signal. At 2X analog BW, attenuation is usually less 20dB. 2nd harmonic can easily cause aliasing and ultimately cause that kind of twisting effect in the video by interpolation.
Dave's rule of thumb is more practical while other statement is true mathematical.
A good practice is always use a little bit "over-killed" instrument if possible. You will save a lot of time by no needing to carefully verify your test setup.
 
The following users thanked this post: balnazzar

Offline noisyee

  • Contributor
  • Posts: 45
  • Country: cn
Re: Zooming *IN* [actually: signal reconstruction]
« Reply #21 on: October 22, 2022, 02:21:45 am »
Nyquist’s most famous theoremproposes that a signal can be reconstructed perfectly from discrete samples if the following two rules are observed:
1. The highest frequency component sampled must be less than half the sampling frequency and
2. Samples must be acquired in equally spaced intervals

There is a flaw in this statement because it gives no guidellines as to how low the amplitude of a high frequency component is considered practically sufficient for satisfactory visual reproduction of the waveform on the oscilloscope screen. Based on the  rules quoted above, a 20GHz s scope would not be able to perfectly reconstruct my 1kHz square wave because the spectrum of my square wave is infinite.
That's correct because ideal square wave have zero rise and fall time while 20 GHz scope doesn't. In signal integrity, frequency is not that important than rise and fall time.
This statement is mathematical correct but not particularly useful.

Based on the  rules quoted above, a 20GHz s scope would not be able to perfectly reconstruct my 1kHz square wave because the spectrum of my square wave is infinite.
PS: If it's an 8-bit ADC then you can only ever show 128 harmonics of a square wave so a 20Mhz, 8-bit DSO would show the same as a 20GHz, 8-bit DSO.  :)
I don't think so because:
a. harmonics of a square adds together to form the edge which is far larger than 1LSB
b. you can see less than 1 LSB signal in FFT because of the noise floor can do the dither for you
 
The following users thanked this post: balnazzar

Offline Fungus

  • Super Contributor
  • ***
  • Posts: 17518
  • Country: 00
Re: Zooming *IN* [actually: signal reconstruction]
« Reply #22 on: October 22, 2022, 12:27:19 pm »
PS: If it's an 8-bit ADC then you can only ever show 128 harmonics of a square wave so a 20Mhz, 8-bit DSO would show the same as a 20GHz, 8-bit DSO.  :)

I don't think that makes sense mathematically.  At the rising and falling edges all of the (odd) harmonics add, although they don't add at their peaks so it gets complicated and hard to visualize or make up simple hand-wavy explanations..  You don't see the individual harmonics, you see their sum.  So harmonics 127 + 129 add up to more than 1 LSB, as do harmonics 247-265, even though individually they wouldn't.

Yeah, you're right. Those tiny harmonics can add up to a lot if there's a large number of them and they're all in phase (which they will be on the edge of a step input).

Mental model adjusted.
 

Offline 2N3055

  • Super Contributor
  • ***
  • Posts: 7462
  • Country: hr
Re: Zooming *IN* [actually: signal reconstruction]
« Reply #23 on: October 22, 2022, 01:22:41 pm »

Dangerous not in physical sense, of course. I poses a danger to measurements, up to the point that you see a completely different signal. That's a bit worse than just inaccurate.

This is where (eg.) the Rigol MSO5000s 8GHz sample rate is a big advantage. It's 6x Nyquist where most scopes aim for 2.5x.

It's not always about "noise". Other numbers matter, too.

True.

...But if it had been just a bit less noisy...  ;D
[/quote]

Really, you should read a bit before making completely inaccurate statements.

Max ZOOM ratio (acquired any way) is ratio of available memory. Scopes with same memory and different sample rate will drop at same sample rate after you just change several timebase positions.
Actually we can argue that scope with higher sample rate will see it's higher sample rate only on few fastest timebase positions.


"Just hard work is not enough - it must be applied sensibly."
Dr. Richard W. Hamming
 

Offline Fungus

  • Super Contributor
  • ***
  • Posts: 17518
  • Country: 00
Re: Zooming *IN* [actually: signal reconstruction]
« Reply #24 on: October 22, 2022, 01:28:37 pm »
Max ZOOM ratio (acquired any way) is ratio of available memory. Scopes with same memory and different sample rate will drop at same sample rate after you just change several timebase positions.
Actually we can argue that scope with higher sample rate will see it's higher sample rate only on few fastest timebase positions.

So it's best to start out with as high a sample rate as possible...?

Another point in favor of the MSO5000.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf