Oversampling - What should I look for? - Page 1
Forum section: electronics / projects

author: UncleBillVT
author_rank: Newbie
timestamp: October 10, 2013, 06:12:02 am
content: I know that Nyquist says that you need at least twice your highest frequency of interest for a sinusoidal waveform but what is the rule of thumb/really needed for a logic analyzer or DSO? I've seen from 4 times to 10 times mentioned and I'm sure that infinitewould be preferable...-Bill W.

author: Rerouter
author_rank: Super Contributor
timestamp: October 10, 2013, 06:54:23 am
content: 4 times lets you identify an approximation of a square wave, 10-20 times lets you identify what the the waveform actually looks like,

author: Kremmen
author_rank: Super Contributor
timestamp: October 10, 2013, 07:34:01 am
content: Forget the minimum criterion, that is not useful at all for a practical instrument. The minimum 2 samples per, only lets you recover the fundamental sine wave - just. Real life waveforms are anything but simple sines.To get any idea of a waveshape you need many ( >> 2) points along the cycle. As stated, 10-20 is a minimum, more does not hurt. For a reference, check the specs of some digital oscilloscopes. They may quote a bandwidth in the low 100s of MHz while advertising sample rates in the GHz.

author: grumpydoc
author_rank: Super Contributor
timestamp: October 10, 2013, 12:44:13 pm
content: QuoteBut only if you have the analogue bandwidth to deliver a square wave to the ADC, and if you have a 200MHz square wave fed into a "200 Mhz oscilloscope" you probably don't.The original question strikes me as slightly odd - most modern mainstream 'scopes in the 100MHz-1GHz range oversample by 5x-10x, they do so to avoid aliasing artifacts which can be a big problem if you are only sampling at the "nyquist rate" and don't watch the bandwidth of your input signal.If the signal is repetitive then most 'scopes allow the sampling to be adjusted relative to the trigger to synthesise a much higher sampling rate by building up a picture over several waveforms so it's only important for single shot events.That said I'd avoid really old 'scopes which have very low capture rates which are way below the nyquist rate for their analogue bandwidth.Muchmore important is the sample memory length - this can be quite short on older DSOs and that limits the amount of "digital zoom" you can have - I wouldn't go for anything with less than 50k points of storage and the more the better.

author: JoeyP
author_rank: Frequent Contributor
timestamp: October 10, 2013, 06:30:28 pm
content: You've asked about DSO's and logic analyzers. The answer is different for these two instruments.For a DSO, it's mostly about how accurately you want to be able to visualize the waveform. Even with an analog scope, you might choose to view a square wave which has components far beyond its analog bandwidth. The analog scope would round the corners of the square wave, but still give you a useable waveform. Similarly (but for different reasons) with a digital scope, as long as your sample rate is well beyond Nyquist, you'll get a useable waveform, but the higher you sample the more time-domain detail you'll get about the actual waveform. There's no drop-dead ratio. It's just about how much you're willing to pay to get the extra detail.For a logic analyzer, Nyquist simply is not a helpful number because you're not talking about reconstructing a sine wave. 4 to 1 will get you a useable waveform in most cases, but the more important question is how much precision you actually need in the time domain. Usually, with a logic analyzer you're looking at relationships between signals. For example, lets say you're looking at signals clocked by a 10MHz master clock. You can certainly visualize those waveforms sampling at just 50MHz, but that yields a time-domain precision of just 20ns. However, what if you want to look at the setup and hold relationship for some logic those signals are driving? Hold times tend to be very short (much shorter than 20ns), so sampling at 50MHz won't allow you to know with any certainty that you're meeting the hold time requirement. If you bump the sample rate up to 500MHz, you improve the precision to 2ns, which in most cases would allow you to confirm the signals are meeting the logic's hold requirement.

author: Unknown
author_rank: Unknown
timestamp: October 10, 2013, 07:45:19 pm
content: People seem to be confused about what the Nyquist frequency means. The Nyquist-Shannon sampling theorem states that a bandlimited signal with bandwidth f needs to be sampled with a sampling rate of at least 2f. They don't discuss fundamental frequency, that's irrelevant. A 1 MHz square wave bandwidth limited to 1 MHz is identical to a 1 MHz sine, so can be sampled at >= 2 MHz and accurately reconstructed. A 1 MHz square wave bandwidth limited to 10 MHz looks like a decent approximation of a square wave, and can be written as a sum of 1, 3, 5, 7 and 9 MHz (think Fourier analysis). Each of these can be faithfully reconstructed when sampling at 20 MHz. The 11 MHz and higher harmonics would not be present in the bandwidth-limited signal. So oversampling has nothing to do with whether the signal is a sine or square wave.This Wolfram demonstrationshows sampling and reconstruction for various signals and sampling rates.There are two problems with applying the Nyquist-Shannon theorem to DSOs. The sampled signal requires sinc(x) reconstruction. Scopes only use a finite approximation of sinc(x) interpolation, which requires more information than ideal interpolation. The second problem is that the signal from a 100 MHz scope front-end is not bandlimited to 100 MHz. A bandlimited signal requires a brick wall filter with infinite attenuation beyond 100 MHz. A 200 MHz might be attenuated by -9 dB, or about a factor 3. This attenuated 200 MHz signal causes aliasing if sampled at 200 MHz. Sampling at a higher sampling rate reduces this problem. Scopes with a maximally flat response suffer less from this effect, so need a lower sampling rate for the same bandwidth.This Agilent appnotediscusses the Gaussian and maximally flat response and their effects on aliasing. Both effects get better with higher sampling rates, and apparently a sampling rate of 4-10x BW turns out to be a decent compromise.

author: Kremmen
author_rank: Super Contributor
timestamp: October 11, 2013, 05:53:12 am
content: The band limitation extracts the fundamental. You are stating that yourself: A 1 MHz sine from a 1 MHz square wave is the fundamental, whether the wording of the theorem explicitly says so or not. If you then sample that (or indeed the original square wave) with a rate of 2 MHz you get a sample array with 2 alternating constant values (same amplitude, opposite sign assuming a balanced AC signal). No amount of sample accumulation will increase the information in the signal - all you can do is reconstruct a 1 MHz sine with an arbitrary amplitude no less than your sample value.Once you increase the sampling frequency you can reconstruct the signal over time of course. To do so in a reasonable time benefits from reasonable oversampling and that is what i tried to answer without going into technical details of any possible implementation. Certainly the instrument mfgs spend a considerable effort to minimize the memory needed to process a given signal, or conversely offer better performance for the same memory.