Oscilloscope Sample Processing, Record Length and Waveform Memory
Oscilloscope - An Electronic Test Equipment that graphically displays varying signal voltages, usually as a calibrated two-dimensional plot of one or more signals as a function of time. They are an important tool in the armory of an Electronics Engineer or tester. The oscilloscope enables the signals to be seen as a function of time thereby making it effortless for the Engineer to understand the behavior of the signal at different conditions over time and to troubleshoot the problems that might occur in the circuit.
Engineers are usually familiar with the fundamentals of Oscilloscope Voltage / Current Measurement, Probe settings, Trigger controls and Acquisition modes. So, in this article, we’ll examine some lesser talked features in a digital oscilloscope which might be a good starting point to understand how an oscilloscope performs its task. Understanding these parameters would also be of great assistance at times when our expected signal waveform does not match with the signal waveform captured by the oscilloscope.
We will focus on - Analog Bandwidth, Oscilloscope Sample Processing, Record Length and Waveform Memory.
Let's start with the simplified block diagram of a digital oscilloscope.
Figure 1. Basic Block Diagram of a Digital Oscilloscope
The analog signal comes into the front end. The signal is given to the analog to digital converter which takes snapshots of the voltage over time. Those digital snapshots are sent to the sample processing hardware along with the trigger to determine what gets placed into the Waveform Memory (RAM). Once the data is in the RAM, there is some additional processing on what gets displayed on the screen in terms of waveform and measurement.
Before we talk about sample processing and waveform memory, let's understand about the Analog Bandwidth of the Oscilloscope and the Sampling Rate.
Analog Bandwidth
The bandwidth of a digital oscilloscope, often called analog bandwidth, refers to the bandwidth of the front-input amplifier of the oscilloscope and is equivalent to a low pass filter. Oscilloscope bandwidth is defined as the frequency at which the amplitude of the observed signal drops by -3dB (or drops to 70.7% of its actual value) as the test signal’s frequency is increased.
Figure 2. Amplitude-Frequency Characteristic Curve of Oscilloscope
For non-sinusoidal waveforms (square waves, pulses, digital communications, etc.,) a bandwidth of 5 or more times the fundamental frequency is an adequate starting point.
Figure 3. 5 Times Rule
An oscilloscope selected using the 5 Times Rule, provides less than ±2% error in the measurements. However, as signal speeds increase, it may not be possible to achieve this rule of thumb. Without adequate bandwidth, an oscilloscope cannot resolve high-frequency changes. Amplitude is distorted. Edges vanish. Details are lost. All the features, bells and whistles in your oscilloscope will mean nothing.
Sampling Rate
The Oscilloscope Sample rate determines how quickly the voltage snapshots of the input analog signals are taken. The faster an oscilloscope samples (i.e., the higher the sample rate), the greater the resolution and detail of the displayed waveform and the less likely that critical information or events is lost.
Figure 4. Sampling Rate of Oscilloscope
Now, that we have covered Analog Bandwidth and Sampling Rate, we can now move to the crux of the article.
Sample Rate, Record Length and Waveform Memory
These three parameters are intimately linked together
Figure 5. Relation between Record Length, Sampling Rate and Time base
The overall waveform record length is the product of the Sampling Rate and the Horizontal time scale.
Record Length = Sample Rate * Time duration
Different manufactures will provide different controls for controlling the record length.
Example:
Sample Rate = 2.5GS/s
Horizontal Time Scale = 20μs/div
Record Length = 2.5GSamples/sec * 20μs/div * 10div = 0.5M
So, with a sample rate of 2.5GS/s and a time scale of 20μs/div, a record length of 0.5Million sample points is obtained.
From the above equation and result, it is observed that if the horizontal time scale is adjusted, the amount of memory will vary. On the other hand, if the amount of memory is adjusted, then either the sample rate or the horizontal time scale has to be adjusted.
It is also noted that at longer time durations (slower time/div), a lot of memory is required for a given sample rate. So, at these longer time durations, the sample rate is reduced.
Question: How is the sample rate reduced?
Figure 6. Analog Input Signal
The sample rate is reduced by any one of the following sample mode settings in most of the digital oscilloscopes:
All the below sample modes will work on Single-shot situations where the oscilloscope does a single acquisition and displays the data.
Sample (Normal) Mode : In the sample mode setting, the oscilloscope takes only one point from the desired sample interval and throws out the rest of the sample points. The disadvantage in this setting is that the glitches between the sample points will be missed.
Peak Detect Mode : In this mode, the high and low values within the desired sample intervals are captured and displayed. In this mode, the glitches which may not have been captured while using the sample mode setting are captured.
Hi-Resolution Mode : In this mode, all the samples occurring within the desired sample intervals are captured and averaged to a single point for each sample interval. The result of averaging all those points to a single point is essentially a low pass filter and some enhanced vertical resolution.
For multiple acquisitions of the input analog signal, there are 2 other additional sample modes:
Envelope Mode : It is actually the peak detect mode but it updates the minimum and maximum value with every new acquisition.
Average Mode : It is the sample mode, but averages the values of multiple acquisitions.
The controls to control the sample rate, record length, sample mode etc., will vary by oscilloscope and the manufacturer. Some manufactures may not show these information to the end user.
Question: How is the waveform record displayed on the screen?
Suppose, for a record length of say, 20k samples, there would not be 20k points across the oscilloscope display. The waveform record usually has more points than the number of pixels in the display, horizontally. The oscilloscope horizontal display, may probably only have a 1000 pixels. But the oscilloscope has to somehow manage to display the 20k sample points with 1000 pixels. Each oscilloscope will handle this differently.
For example, Tektronix oscilloscopes will take all the sample points from the waveform memory and will take a look at the number of points that need to be displayed on the screen. It then takes all the points and plots them in the columns. The more overlap of the points, the brighter that intensity of the waveform would be on those overlapping sections of the waveform when compared to other places on the waveform capture when there is no overlap of sample points.
Question: What samples are used for the rise/fall time, frequency measurements and etc.?
Is it using the waveform record sample points? Is it using only the displayed sample points or something else entirely? Based on which samples are taken, there could be accuracy issues while making the measurements. Each oscilloscope manufacturer handles this differently and may have different algorithms to do so. It is very important to understand how our oscilloscope processes the data from the waveform record to the measurements. On selecting the inbuilt rise and fall time measurements from the measurements menu of the oscilloscope for measuring the rise and fall time of our analog signal at a low sample rate, say like 10k samples for a 2kHz square wave, some oscilloscopes would indicate “Low resolution” or would display a blank value under the rise and fall time measurements. It essentially means that the oscilloscope hasn’t sampled enough data points to put it along the rise and fall edge of the analog signal to make that measurement accurate. In this case, the number of samples has to be increased, which essentially increases the waveform record length (without increasing or decreasing the time base). Alternatively, one can maintain the same waveform record length and increase the time base to take a proper measurement.
Below is an example of waveform under-sampling:
The below measured signal is a 5V peak PWM Signal with a frequency of 120kHz.
Figure 7. 120kHz 5V PWM signal measured with a sample rate of 2.5MS/s
On a 100ms/div time base scale and a sample rate of 2.5MS/s, a waveform record length of 2.5M sample points is obtained. As mentioned earlier, the frequency measurement is not displayed and the peak voltage of the signal is displayed as 4V, which is incorrect. The number of sample points is not sufficient to display the 120kHz 5V Peak PWM waveform. The signal is essentially lost with this time base and the sample rate setting.
Figure 8. 120kHz 5V PWM signal measured with a sample rate of 50MS/s
Upon increasing the Sample rate to 50MS/s, with the same time base setting, the oscilloscope has sampled enough data points due to increased sample rate and is now able to display the proper PWM waveform with no change in the time base setting of the oscilloscope.
With this brief tour on waveform processing and sample processing, you might have a good idea on how the processing flows through the instrument and the considerations you need to keep in mind while setting up the scope to make accurate measurements with the waveform data you have in memory. It is imperative that the end-user knows this information so that the user can have full control and understanding of the captured signals.
Very informative.