dmercer

Bandwidth vs Sample Rate and the ADALM1000

Blog Post created by dmercer Employee on Jun 20, 2017

Bandwidth vs Sample Rate and the ADALM1000

The meaning of "bandwidth vs sample rate", especially in relation to a low cost USB based digital oscilloscope like the ADALM1000 is something that can cause a lot of confusion at times. For those familiar with the Nyquist-Shannon Sampling Theorem, it seems strange that an analog to digital convertor (ADC) that has a maximum sample rate of 100 KSPS is able to measure signals beyond the Nyquist limit of one half the sample rate let alone see waveforms that are at even higher frequencies. However, given the right circumstances it is possible to do this and much more. A new version of the ALICE 1.1 desktop software suite for ADALM1000 now includes an option that implements a form of equivalent time sampling or ETS.

Periodic waveforms

The key to understanding how this "magic" works is to realize that many of the kinds of signals that an oscilloscope user might like to measure are periodic. That is, they have a fixed pattern or shape that repeats periodically. Indeed it is almost impossible to see any other type of signal with an ordinary (non-sampling) analog oscilloscope. A digital oscilloscope like ALM1000 can of course capture and store any non-periodic waveform at the base real time sample rate. If we are interested in measuring waveforms with frequency content higher than half the sample rate, as the specification of many ADCs suggest we can, then it will be limited to periodic waveforms.

The ADC used in ALM1000 is designed to exploit this ability by sampling the analog input for a much shorter period of time than a full sample period. That is, they have a very short acquisition time (i.e. time to capture the input signal) but they require additional time to convert the sampled analog value to its encoded digital value.

This short time aperture is what enables the ADC to see frequencies much higher than the sample rate alone might suggest, but there is some work to be done first in order to properly display the waveform.

Sub-sampled waveform capture

If you display a buffer of raw data captured from a signal with a higher frequency than even one tenth the sample rate (10 samples per cycle), you will still see a waveform; just not much detail. The following screen shot is taken with the ALM1000 sampling a 20.050 KHz square wave. As we can see there are only five sample points per cycle and the waveform does not look much like a square wave.

Real time sampling 20 KHz square wave at 100 KSPS

If there are less than 2 samples per cycle you will see an "alias", or frequency shifted version of the waveform.

If certain conditions are met where the samples fall at different points in each cycle of the input signal, the alias is unique, meaning you can "unwrap" or re-sequence the raw data to reveal the true waveform. This process is known as sub-sampling or equivalent time sampling and is a technique used by many digital oscilloscopes to display high frequency signals. It is similar to a radio receiver where two frequencies are "mixed" to produce the "sum and difference" frequencies to shift from a high frequency to a lower one. Indeed, many ADCs ( and DACs ) in the Analog Devices catalog are often used to perform this frequency translation function in systems like cell phone towers and WiFi networks. The next screen shot is taken again with a 20.050 KHz as the input but now with ETS turned on. The 20.05 KHz input frequency is now down converted or shifted to 500 Hz which is a factor of 40.1. This multiplies the 100 KSPS to an effective sample rate of about 4 MSPS. So there are now 40 X 5 or 200 samples per cycle (or you can think of it as the new 500 Hz signal is sampled at 100 KSPS). We can see much more detail in the waveform including the single pole response of the analog inputs.

Equivalent time sampling 20 KHz square wave at 4 MSPS

What's the catch?

A minor digression at this point is in order. Why 20.050 KHz and not exactly 20.000 KHz? 20.000 KHz is a rational fraction of the fixed 100 KSPS sample rate and the sample points will fall at exactly the same point in each cycle so no additional waveform details would be obtained. Unlike this previous Blog where the AD783 SHA and an tunable sample clock was used, with a fixed real time sample rate there are certain frequencies that fall in nulls or no-go zones and can't be used with the ETS as implemented for the ALM1000. This limitation is not so great for a general purpose piece of test equipment but is perfectly acceptable for using the ALM1000 in a teaching situation where the experiments can be tailored to the fixed frequencies allowed due to the fixed real time sample rate.

Another point to note here is that the scheme used in ALICE will down convert the input frequency to the frequency "offset" (or integer multiple of the offset) chosen in the software. These screen shots were taken with the frequency offset set to -500 Hz thus the signal displayed is at 500 Hz.

So, when you read a specification that says "Oscilloscope Y has a 100 MHz bandwidth but a 20 MHz sample rate" you know it means that it is using sub-sampling and the scope can display a periodic waveform with frequency components up to 100 MHz.

In the case of ALM1000, it has an analog bandwidth of slightly more than 100 KHz and a real time sample rate of up to 100 KHz. Using ETS the apparent sample rate could be much higher even into the 10's of MHz.

Sub-Sampling does not free you from the constraints of the Nyquist theorem: the bandwidth of the signal must still be less than half the sample rate to avoid destructive aliasing. However, the signal may appear anywhere in the analog bandwidth of the ADC so long as the bandwidth of the signal remains less than half the sample rate.

For example, if you have a 125 KHz analog capture bandwidth and a up to 100 KSPS sample rate you can measure a signal with a fundamental frequency of 65 KHz and bandwidth of 50 KHz (i.e. you can see any frequencies between 65 KHz and 115 KHz) which especially useful if the software has a build-in spectrum analyzer like ALICE. If the signal is not sufficiently bandlimited, it must be filtered to prevent aliased components in the result. The ALM1000 has a single pole RC low pass filter ahead of the ADC input with a cut-off frequency a little more than 100 KHz.

There is one important exception that frees you from this constraint: if the signal is harmonic (i.e. there are no frequency components that are not integer related to the fundamental frequency) and the sample rate is different from and unrelated to the fundamental, it is possible to unwrap all signal harmonics up to the physical analog bandwidth of the analog input signal chain.

This is how ALICE, and any other digital scope software that can perform equivalent-time sampling, can see waveforms at frequencies much higher than the Nyquist-Shannon Sampling Theorem would otherwise imply.

A sub-sampling example

It must be remembered that the analog signal chain must still have an analog bandwidth sufficient to pass the signal to the ADC. ALM1000's analog inputs have a 3dB analog bandwidth of slightly more than 100 KHz set by a single pole RC filter. It is even possible to "see" signals at higher frequencies if you are not concerned that the signal will be somewhat attenuated. For example, let's try this using an approximately 100 KHz signal generated by a SparkFun MiniGen AD9837 based DDS function generator, captured using an ALM1000.

ALM1000 captures a 100 KHz sine wave at 100 KSPS

In this screen shot we have the analog input as a 100.050 KHz 1 V p-p sine wave. The measured amplitude is 0.84 V p-p which is greater than the -3 dB amplitude which would be 0.707 V p-p. Again we see a nice smooth sine wave shape.

100 KHz sine wave with ETS rate of 20 MSPS

This waveform was captured using equivalent time sampling running the ADC at 100 KSPS. That is, it captured an alias of the actual waveform which was then unwrapped and rescaled to display the down converted waveform at a sample rate equivalent to 20 MSPS. The original real time 0.5 mS/Div time grid was not scaled in this version of ALICE for this new sample rate. The actual time/division is 2.5 uS/Div.

Put another way, each period of the waveform shown here was constructed from roughly 200 samples captured at different points in the real-time trace and resorted to locate them on the display at the correct place. By contrast, a real-time digital scope, sampling at 100 MSPS, would use 1000 samples per cycle period and plot them sequentially and it would be able to capture the waveform even if it was not periodic.

To test the -3 dB bandwidth the input frequency was increased to 150.050 KHz.

150 KHz sine wave with ETS rate of 30 MSPS

The p-p amplitude is now down to 0.707 from the 1.0 p-p or -3 dB.

So in conclusion with equivalent time sampling a relatively low sample rate digital scope like ALM1000 can provide results similar to higher cost instruments that have much higher real-time sampling rates when used with periodic signals.

To enable access to the MiniGen controls add the following line to your alice_init.ini file:

global EnableMinigenMode; EnableMinigenMode = 1

The ETS option in ALICE is still in an early state and the controls are very manual at this point. As the project progresses I hope to make the controls more automatic. I've attached a spreadsheet that lists some of the input frequencies that can be used and the control settings used. There are many more possible than those listed.

To enable access to the ETS controls add the following line to your alice_init.ini file:

global EnableETSScreen; EnableETSScreen = 1

As always I welcome comments and suggestions from the user community out there.

Doug

 

Attachments

Outcomes