Oscilloscope Sin X/x Interpolation can be a trap for young players, find out why.
Forum: http://www.eevblog.com/forum/blog/eevblog-1213-the-oscilloscope-interpolation-trap/'>http://www.eevblog.com/forum/blog/eevblog-1213-the-oscilloscope-interpolation-trap/
#Oscilloscope #Trap #Interpolation
Bitcoin Donations: 38y7DE8HEHNj8fGDtUr4PkCn9nWxiorvvy
Litecoin: ML7oQokTwB38bgzzjLDbRV97HKAHuwRfHA
Ethereum: 0x11AceA38DCA9DbFfB4F35f3F746af65F9dED28ce
EEVblog Main Web Site: http://www.eevblog.com
The 2nd EEVblog Channel: http://www.youtube.com/EEVblog2
Support the EEVblog through Patreon!
http://www.patreon.com/eevblog
AliExpress Affiliate: http://s.click.aliexpress.com/e/c2LRpe8g
Buy anything through that link and Dave gets a commission at no cost to you.
Stuff I recommend:
https://kit.com/EEVblog/
Donate With Bitcoin & Other Crypto Currencies!
https://www.eevblog.com/crypto-currency/
T-Shirts: http://teespring.com/stores/eevblog
Likecoin โ€“ Coins for Likes: https://likecoin.pro/ @eevblog/dil9/hcq3

Hi I Wanted to show you a feature in modern digital scopes that can be a real trap for young players if you don't know what you're doing and you may have actually seen this in the scope before but not really understood what it is. let me show you here: a new fangled deep memory scope here. Obviously got a signal here and we can capture a ton of the signal and then zoom in later with our deep memory. Okay, so let's do our single shot capture here.

Say we're on 50 milliseconds per division here. Let's single shot capture that and then we go zoom in at our data and wow, Look at that. It looks like we've got a pulse there and it's got some ring in and you may be familiar with this sort of ringing as something that you'll get when you got bad probing and things like that. Oh What signal are we actually measure in here? Well, let's single-shot capture it again at this time Base: That's the signal that's actually there.

So what's going on here? So as you can see, what we're capturing is just a digital packet here. and if we go out like this, you can see that there's several packets like that and it's actually a recurring packet of like serial data. But if we go out far enough as I said 50 milliseconds per division in this particular case and then we zoom in, we get what look that actually looks like an absolute classic sine X on X signal because of our sine X on X interpolation and this ringing type overshoot effect that we actually get from sine X on X interpolation is actually known as the Gibbs effect or the Gibbs phenomenon and you can look that one up that has its own history and mathematical relevance for all your math nerds and I'll explain what interpolation is in a minute. But if we go in and go to the acquire menu like this, sync or sine see here this is the interpolation.

If we actually turn that off, we can see that this is what it uses using what's called linear interpolation where it actually our joins the samples like this because in this particular case we're not going to have because we're zoomed in. We're not going to have many sample points on this screen here and we can see that if we actually go over to our display menu and choose instead of vectors which it basically just joins the dots so to speak, we can go dots here and you can maybe see. It might be a bit hard you can see the individual sample dots in there. so how does it go from those dots to an interpreted display like that? Well, it's actually doing what's called interpolation or it's actually post-processing after it's sampled.

which is the reason why that we can actually just modify this after we've actually captured it. Why is it actually doing that? What's the purpose of this sine? X Onix Interpolation. But hopefully as you can see and that can be a real trap for young players. That's our real signal there.

And if you sample at a long enough time base with not enough memory, then you can come a gun sir and think that there's a signal there. Like some sort of weird thing happening when it's actually not. And if we go into our choir menu, you see that our memory depth is only 1.25 Meg points of memory. This one actually has up to 256.
Meg So let's say we changed our memory depth so we get more dots across the screen. We get more samples. When we actually zoom in, you'll find there's that real signal hole. live signal.

Let's go up to say a hundred and twenty-five Meg Now if we go all the way back to our fifty milliseconds per division, doesn't like it just happens to be 50 milliseconds for this particular signal that I'm using. Don't worry about that if we now single-shot capture that and zoom in. Tada. Yeah, we don't get that problem anymore because if we go into dot mode, you'll see we have a lot more dots than what we had before.

So the software when it does that interpolation that in this case it's using a sine C filter. But it's basically let's just say sine X on X That's what most scopes use and what it's generically called it doesn't. It's already got enough sample dots in there that it can display ow X or signal are pretty close to our exact signal. but it's only when you get fewer and fewer sample dots in there does this interpolation take over and try to interpret it as a sinusoidal signal.

So why on earth would you want a scope to do this? Well, It basically makes your waveform look better and it's actually got a good reason behind it as we'll go into. But basically all modern scopes by default have sine X on X interpolation and it's enabled by default, so you have to actually know under what circumstances you should leave it enabled and under what circumstances you should disable it. And of course, you've already noticed that at very long time bases like this. when you do that, that is when you can get a real problem and come a gut.

So depending on how much memory depth you've got on your scope and how much memory depth you've got enabled. which is why some scopes like this say Keysight 3000 here are smart enough to know this is a problem and actually disables that for you by default. is smart enough to know that In fact, with this, with the Keysight Infiniivision scopes, you cannot enable or disable the sine X on X interpolation. It takes care of it for you, so let's single-shot capture that at the same 50 milliseconds.

it's exactly the same signal. This only has 4 Meg of memory maximum. Doesn't have a lot, but you'll notice that there is no sine X Onix Interpolation hasn't tried to, you know. fill in the dots with any sinusoidal signal.

It's using linear interpolation which is what you get if you turn off you sine x on X. Some scopes will call it linear interpolation, others of just ape off. So to demonstrate why they add interpolation to oscilloscopes in particular are sinusoidal or sine X on X interpolation. We need a lower well.

we can do it with any scope, but hey, you can try this at home. if you've got the suitable gear where we'll go down to a 200 megahertz bandwidth scope and we'll feed in a 200 megahertz sine wave. And believe it or not, Tada, that's what I'm feeding in there. That is a 200 megahertz that's a perfect from an RF signal generator and it's kinda sort of sinusoidal.
But look at it, it's all Jaggi Why? Well it's obvious because the sample rate here is only one gig sample per second, which is only five times the bandwidth in sample rate. So we're only getting five samples or five dots per cycle of the sine wave. And obviously you can see it. One two three four five.

you only get in those five dots. That's what it looks. Jaggi And as you should know often with these scopes, when you enable the second channel that our sample rate will have. so in this particular case, it drops down to 500, make samples per second.

and we're trying to sample a 200 megahertz signal with a 500 Meg's sample per second scope. And of course, it looks worse because you've only got two and a half samples per cycle, Looks absolutely awful. That's useless. What is that triangle wave? sawtooth? So if we turn on our interpolation, let's go down here like this and interpolation sine X on X Look at that.

we've got a sign. It's looks like a sinusoidal wave, which is actually what we're feeding in here. and it's only 500 mix samples per second. It's barely above that, what's called the Nyquist frequency limit, which you may have heard of, which is basically half of the sample rates.

So 200 megahertz In theory, to meet our Nyquist requirement, we need 400 Meg samples per second. and we're just meeting that here with our 500 mix samples per second. And if we go, turn off our channel 2 and do it again, we're back up to one gig sample per second. So now we're basically five times our sample rate.

And Bingo! we get a nice beautiful sine wave look at that that's fantastic, but of course that's all smoke and mirrors. If we go to into display here and turn on dots, you can see there's our dots there look little itty bitty dots. like it doesn't look like much, does it You can. It kind of looks like just a random array of dots in there.

but when You turn on the interpolation, it gives you a beautiful sine wave. So what's going on here? Is this cheating? Well, yes and no. This actually is can be mathematically completely valid. So basically, interpolation is just a way to mathematically fill in and predict what the other points would be.

And it's it. Can be mathematically valid because remember, the analog bandwidth of the oscilloscope on the connector here is only 200 megahertz. So any frequency, it's not a brick wall filter. It does actually roll off.

It doesn't just magically stop and not allow any other frequencies beyond 200 megahertz. But remember, like it's starting to roll off at that frequency. So really, if we fit in a 200 megahertz square wave into the input here, what's going into the analog to digital converter is not actually that square wave. It's the rolled off 200 megahertz bandwidth limited signal into the ADC.
So all of those higher frequencies caused by the sharp rise and fall times of your square wave, they're actually filtered out. So the ADC is really seen more of a sine wave. And you can actually sort of mathematically guarantee that for a certain type of input bandwidth filter, then sine X on X Interpolation is a completely valid mathematical technique for reconstructing the waveform that's actually seen by the analog to digital converter inside the scope. Or it would be.

so these points in here are actually valid. And the interesting thing about this is it actually gives you a higher what's called effective sample rate even though we've only got 1 gig sample per second. When you turn on your interpolation down here, when it's filled in the dots, look, we can go in there and more accurately measure with our cursors a what's effectively a much higher sample rate. In fact, we can go up in increments here.

look at this x1 x2 of 20 picoseconds steps there. Wow And if you get your confuse or out and do 20 picoseconds and you invert that on the calculator, what do you get? 50 gig. So we've effectively turned our one gig sample per second sample rate into an effective going to use the quote marks effective sample rate of 50 gig samples per second, and particularly on very high-end scopes you will actually see them advertised. This effective or sometimes called interpolated sample rate of much higher than what the actual ADC sample rate is and it can actually be depending on your input signal, can actually be a very valid mathematically valid method of recreating your signal and actually measuring it at a higher separate.

cool huh? So all that extra data they're coming from just implementing a mathematical filter or what's called a convolution filter on the input data and there's a couple of different ways to do it. But sine X on X is the most popular method for that. But of course, the sine X on X or sometimes simply call a sine X or a sine C filter is only valid if you meet that Nyquist requirement. So you've got to have at least twice the analog bandwidth in sample rate.

But as I said, that's going to be reliant upon what type of roll-off you've gotten your Scylla scope so that 200 megahertz bandwidth roll-off on your front end. Here, if it's like a different type of response, you will have a different resultant waveform when you actually turn on your interpolation here. So if it's got a Gaussian response field, that response can actually make a difference in how the signal is actually interpreted. So as we see, if we have our sample rate again, let's do that one more time.
You'll notice that it didn't give us quite the valid response that we got last time. Because we've halved our sample rate we're only two and a half times more than the actual bandwidth, and because there's higher frequency components when it rolls off, they still sneak through. Then you get little artifacts, so that's not as an accurate recreation of that. And so sine X on X interpolation is only valid if you meet that Nyquist requirement.

If you got a 200 megahertz bandwidth and only a 200 megahertz sample rate, Sine X on X interpolation is completely mathematically invalid doesn't work, so interpolation is great when you're near the maximum time base like this, and you're looking at more like analog, sinusoidal, or analog E-type signals. But if you're way up in the time base as we saw a right at the start of this thing looking at digital signals for example, you can really come a gutter and as we saw at the start, this can happen right at a effectively very low frequencies. If you run out of samples, you can really come a guts alike that when it should look like that and it's just the memory depth of that when it just has so few samples and the you're looking at a different signal, you're looking at a square wave. In this particular case, nothing high frequency.

It's got nothing to do with the bandwidth. You can reduce the bandwidth here to 20 Meg and it's not gonna make a difference. You're still going to. you see those very little difference in their data between the full 200 Meg bandwidth.

If we do that again, we're still screwed because we don't have enough samples because we've only got 14 K points. whereas if go up to enough memory or we choose a lower horizontal value, let's to 1 millisecond instead of 50. We might get away with that. Yep, we can see our digital data there, so just be aware of that.

can be a real trap. When you're looking at you might think this some other problem they might think I've got a probing problem I Know I'm screwed. so you trace a red herring down a rabbit hole because you think that you got something weird, probing thing or something happening when? Nope, you're just using your scope wrong and it's pretty easy to make this mistake. You're using your scope and you're not really keeping in your head.

Well, how many memory points am I using? And when you do, you capture like this and you zoom in, you're not really thinking like doing the mental calculation. that. okay, how many Meg points? How many data points and things like that? you can't see them and you get a nice looking waveform like that? Well, it's very easy to come to the conclusion that that's what's really there when it's nothing of the sort. So there you go.

Just be aware of interpolation that your scope almost always is going to have on by default next time you're using it. just look at the waveforms that you're measuring your memory depth, your sample rate all sorts of things, and don't get tricked into thinking that there's something weird going on aware, needs. It's not the scope, it's you anyway. I hope you found that interesting.
If you did, please give it a big thumbs up. And as always, discuss down below in the comments or over on the Eevee blog forum and I'm sure all the math nerds will of course go to town because this is like a real like. it's actually quite a mathematically involved subject if you really get into this sort of thing. And yes, the ten year old and me C's dick and balls catch you next time.


Avatar photo

By YTB

25 thoughts on “Eevblog #1213 – the oscilloscope interpolation trap!”
  1. Avataaar/Circle Created with python_avatars Tramp C says:

    It seems in signal measurement domain, sinc interpolation is the king and it is not possible for other types of interpolation to contend w/ it, such as spline, polynomial, etc. Is it still the case in 2023 when I'm commenting now?

  2. Avataaar/Circle Created with python_avatars pepe6666 says:

    yuck ๐Ÿ™ i kinda wish that the display just said in red the smoothie line and showed the dots in a different colour. that would be great cos then you can see for yourself the interoperation plus the data points.

  3. Avataaar/Circle Created with python_avatars DAVID GREGORY KERR says:

    Does that scope not have a Kaiser Window function?

  4. Avataaar/Circle Created with python_avatars onur รงayan says:

    In short, it just treads sampled data (represented as dots) as impulses and replaces them with sinc function for better reconstruction.
    This is how basically ADC's work. In a practical situation, sinc function is a square wave. It is called zero order hold. It is widely used in PWM technique. According to Sampling Theorem, data should be sampled with frequency twice time higher than max. freq. component of the signal. If you dont, signal is distorted. That is what happens in the video.

  5. Avataaar/Circle Created with python_avatars alch3myau says:

    scrolling, scrolling, scrolling, dick pic, scrolling, wait what, daves drawing dicks

  6. Avataaar/Circle Created with python_avatars Rodrigo Beltrรกn Politeo says:

    AWESOME. Haha its always nice to learn with you.

  7. Avataaar/Circle Created with python_avatars Evelien Snel says:

    I found the SIN(X)/X setting on my DS1054Z. It says it is "ON", but it is also grayed out. Pushing the button next to it does not change it to "OFF". I must be doing something wrong, but what?

  8. Avataaar/Circle Created with python_avatars PierreAtTek says:

    Good video about an overlooked aspect. The 500GS/s advertised in the data sheet is acquisition interpolated sample rate. These samples can be saved, while display interpolated samples cannot. They are meant to fill up the screen pixels to get a continuous signal.

  9. Avataaar/Circle Created with python_avatars ralph ups says:

    Could the scope, be picking up the un-natural 5G signals through the air waves.๐Ÿ‘‰๐Ÿ‘น๐Ÿ“ฒ๐Ÿ‘ˆ

  10. Avataaar/Circle Created with python_avatars Melkior Wiseman says:

    Interpolation: A fancy word for "Fill in the gaps."
    Extrapolation: A fancy word for "The rest follows the same pattern."

  11. Avataaar/Circle Created with python_avatars ytrewq6789 says:

    Everybody on YT seems to haft to try putting that in there thumbnail at some point?, but i'm more used to seeing it with teen vloggers rather then hear? LOL!

  12. Avataaar/Circle Created with python_avatars illchmann says:

    noobs trap with digital scopes, thia siglent does it perfect, i like it !

  13. Avataaar/Circle Created with python_avatars 2O QP says:

    Oh boy, oh boy. The Shannon Nyquist theorem specifies explicitly that you have to get a ratio of AT LEAST 2:1 of the HIGHEST frequency component of your signal. Else any anomalies at or above the 2:1 ratio in your signal is going to suffer representation with amplitude and phase errors. IMHO Shannon-Nyquist is a base to start from when designing requirements, but far from being the "rule". I actualy never use it as a base to start from. I look at the TDH I can afford and work from there. I am not belittleing the work of those two pioneers which I hold the highest regards but in college and universities, I think their work is misrepresented. I work in telecom.

  14. Avataaar/Circle Created with python_avatars That Goose says:

    You knew what you were doing drawing that penis on your thumbnail… Well I'm here

  15. Avataaar/Circle Created with python_avatars Hola! David Perkins says:

    Great video, Dave!
    Even my lowly audio editing program (Cooledit 2000) employs this Sin(x)/x processing.

  16. Avataaar/Circle Created with python_avatars Scot Johnson says:

    This is probably the most informative video on this subject that's ever been made. Great job and keep up the good work.

  17. Avataaar/Circle Created with python_avatars richb313 says:

    What you are also looking at is the artifact ridden excuse for poor Analog to Digital Conversion, especially in Music. It might be fun to do a side by side comparison of original Analog signal to Processed signal after conversion.

  18. Avataaar/Circle Created with python_avatars ScotchRobbins says:

    Is the interpolation in place to beat aliasing?

  19. Avataaar/Circle Created with python_avatars William Squires says:

    The angle of the dangle = (square root of the (ventilation) holes in the back of the scope) x (the mains frequency) x (the memory depth in bits) all over pi! ๐Ÿคช Yeah, right.

  20. Avataaar/Circle Created with python_avatars David Davidsonn says:

    dat thumbnail

  21. Avataaar/Circle Created with python_avatars Ken Vez says:

    Great presentation – you're a natural teacher..

  22. Avataaar/Circle Created with python_avatars Radoslaw Biernacki says:

    Great video. This is the proper way of explaining what is the bandwidth and sample rate of oscilloscope.

  23. Avataaar/Circle Created with python_avatars Measured Constraints says:

    You are right on the edge of high energy analysis and imaging, just on the other side of "It's Complicated".

  24. Avataaar/Circle Created with python_avatars Justin Spencer says:

    Always trigger again after zooming in on a signal with the desired t/div.

  25. Avataaar/Circle Created with python_avatars AstralStorm says:

    Gotta know your sinc. Your scope at least has zero order hold ("disabled") I hope too, in addition to linear? (Bars instead of tiny dots. Or fat dots.)

    One thing I'd love to see is ZOH with error bars from sinc ringing as estimate, like a blurry overlay. It's a rare case that your clock is perfectly synced with signal. Old analog scopes naturally did that with faded display due to capacitance in memory and display… Though that can lie too, it's exponential interpolation – Laplacian it's called I think?

    Using a scope as a frequency counter over sample rate only works if you average enough samples. (Or take a long Fourier spectrum, similarly.) Not quite what you showed.

Leave a Reply

Your email address will not be published. Required fields are marked *