This is only a preview of the February 1997 issue of Silicon Chip. You can view 25 of the 96 pages in the full issue, including the advertisments. For full access, purchase the issue for $10.00 or subscribe for access to the latest issues. Items relevant to "Computer Controlled Dual Power Supply; Pt.2":
Items relevant to "Control Panel For Multiple Smoke Alarms; Pt.2":
Articles in this series:
Articles in this series:
Articles in this series:
Purchase a printed copy of this issue for $10.00. |
Part 6: Interpreting Digital Oscilloscope Displays
We must learn to interpret what we see
on the digital oscilloscope screen. The
display is only a reconstructed image of the
waveform which is sampled during a very
small fraction of the total signal time. And
incorrect operation can introduce alias
“ghosts” – signals which don’t exist at all.
By BRYAN MAHER
While digital oscilloscopes are
powerful instruments, they take some
getting used to, particularly for peo
ple who have used analog scopes for
many years.
In reality, there are significant
differences between displays of the
same signal seen on a digital or analog
oscilloscope. And both displays are
likely to be different from the real
live signal.
Each scope shows a different
image, neither of which is a true
representation of the actual electri
cal waveform. For anyone who has
used an analog scope for many years,
there must first be the realisation that
the screen display is not reality and
that both analog and digital scopes
66 Silicon Chip
give different “filtered” views of real
signals.
All of which is an admission that
the signal seen on a digital scope can
look quite different to the same signal
on an analog instrument. Moreover,
on a digital scope, it will probably
look much noisier. Is that noise really
there? Well, yes, in many cases it is
and it is just not seen on the analog
instrument.
These noisy traces are in sharp con
trast to the smooth traces of an analog
scope. Together with the complexities
of screen menus, they make some longtime analog scope users reluctant to
invest in a digital storage scope. This
aversion is unfortunate, for it denies
those people access to the great signal
processing advantages of the digital
instrument.
Why the trace wriggles
The wriggly nature of the trace hits
you in the eye, even on large amplitude
signals, such as that shown in Fig.1.
By contrast, the same signal displayed
on an analog scope is likely to be as
clean as whistle.
What happens when we photo
graphically enlarge a portion of the
baseline trace seen in Fig.1? The result
of an 8-times magnification is shown
in Fig.2. The wriggles are a form of
noise. But their large amplitude, even
on signals as big as 8V, indicates some
source other than random noise at the
scope input. And because of the dig
itising process the digital scope trace
tends to have a characteristic “jaggy”
appearance.
This is very different from the nat
ural random noise generated in high
gain preamplifiers which we see on
analog scopes. But some noise im
pulses are too fast to generate enough
light in the phosphor and so are not
visible unless we turn up the bright
ness. This means we are never sure of
the true amount of noise when using
an analog scope.
The jaggies on all digital scope
displays operating in simple mode
Fig.1: a digital scope can find an elusive glitch but the trace is wriggly,
even on 8V signals.
Fig. 2: photographically enlarging the trace of Fig.1 shows an artificial
jaggy waveform, characteristic of digital scopes used in simple mode. This
jaggy waveform is independent of signal amplitude.
stem from four sources. The first and
predominant cause is inherent noise
within the analog to digital (A/D)
converters.
Digitising rates
Designers face great problems when
digitising rates from 100MS/s up to
8GS/s are required. At this rate, even
flash A/D converters are inadequate,
because their speed is ultimately
limited by the slew rate of the analog
comparators used. A new technology
is needed.
In many Tektronix digital scopes an
extra component is added. At a very
fast sampling rate, one complete re
cord (collection) of samples is passed
into a proprietary line of special sem
iconductor analog storage elements.
Then the sampler pauses, while this
temporarily stored analog record is
shifted out at a slower rate to an A/D
converter. The digital data so produced
is concurrently recorded in the mem
ory. This double shuffle achieves the
complete digitisation at an apparent
rate extending up to 5GS/s.
Other manufacturers combine many
digitising paths to achieve high speed.
The Hewlett Packard HP54720/10
model contains 16 500MS/s 8-bit
flash A/D converter channels. All the
data outputs can be interleaved to
produce an equivalent 8GS/s rate of
A/D conversion, with an extremely
short effective sampling period of one
picosecond.
Such speeds are way beyond the
capabilities of any direct single stage
A/D converter technology currently
in existence. Digitisation in multiple
stages, though necessary to achieve
the required speed, unfortunately does
generate noise. This is the dominant
cause of the wriggly baseline and trace
observed when any digital storage
scope is used in simple mode.
Digital oscilloscope manufacturers
admit that the displayed baseline and
trace always contains wriggles of two
to three pixels in amplitude. One pixel
is the smallest possible increment in
vertical amplitude of the display and
is equal to 1/256 or 0.4% of the screen
height.
Because the digitising section comes
after the preamplifier and attenuator
stages, this noise introduced by A/D
conversion is the same at all signal
levels. In stark contrast, analog scopes
only show baseline noise on tiny
signals, of much less than a millivolt.
Averaging mode
One way to reduce the apparent
noise on a digital scope waveform
is to operate in averaging or High
Resolution mode. Averaging means
the digital data from a number of suc
cessive recurrent sweeps is averaged
before being displayed. HighRes is an
ingenious method wherein averaging
can be done even on a oneshot. Be
cause random noise averages out to
Fig.3: to
demonstrate
quantisation noise,
the lower trace
sinewave signal
was sampled,
digitised and
immediately
reconverted back
to analog, then
displayed in the
upper trace. Any
imperfections not
noticed in the lower
trace are enlarged
in the upper trace
by the digitisation.
February 1997 67
zero, the trace then seen on the screen is much smoother.
We will investigate averaging and high resolution modes
in the next chapter.
Quantisation noise
A second cause of the wriggly trace in digital scopes is
the quantisation noise described in the previous chapter.
Readers will recall that the A/D converter breaks down
the continuous analog signal into 256 or more discrete
decision levels. The A/D converter output data is a digital
code representing the nearest decision level below the
voltage of the analog sample.
Quantisation noise arises from the difference between
the actual voltage of each sample and the smaller voltage
values represented by the corresponding digital words.
A steadily rising analog voltage into an A/D converter
produces a digital output rising in a staircase of discrete
steps. The same applies for falling slopes. So the trace
displayed on any digital scope is fundamentally a series
of small increments, rather than a smooth continuous
line.
Quantisation also results in a secondary source of
noise. If an analog signal is just below some particular
decision level, any tiny fluctuation or noise spike can
push the signal momentarily above that decision level.
Thus the next higher digital data is generated by the A/D
converter, lifting the display up one whole pixel each
time this occurs.
It is possible to demonstrate quantisation noise. In
the analog scope photo of Fig.3, the lower trace shows
a sinewave which was also fed into a sampler and A/D
converter.
The resulting digital data was immediately converted
back to analog form by a digital/analog (D/A) converter
and the result shown as the upper trace.
Small irregularities are present in the lower sinewave
but are too fast or too small to be noticed. And some
noise exists in the reference voltage of the A/D convert
er. Each fast noise impulse momentarily lifts the analog
amplitude up into the next decision level, so producing
a higher digital word. Thus lots of small step errors are
produced.
Pulse stretching
This sequence of scope waveforms shows a
sinewave signal at 10kHz displayed on a digital
and an analog scope. The top waveform is from a
Tektronix TDS 360 digital scope in sample mode at
2 megasamples/second while the middle waveform
is at the same sample rate but in average mode
(128 waveforms averaged). Finally, the bottom
waveform is from an analog scope. Note the very
smooth trace.
68 Silicon Chip
A third effect which makes quantisation noise worse
could be called “interference pulse stretching”. Many
noise pulses are too fast to be seen on an analog scope
but when captured by a digital scope’s sampler, it
holds the signal voltage steady until the next sample
is taken. Hence the sampler stretches fast noise pulses
out to equal the sampling period, so they can be more
clearly seen.
A fourth very important contribution to the wobbly
trace displayed on any digital scope is directly related
to the waveform capture rate and screen update rate.
This points up the vital difference between the dis
play on any scope and the real live signal we wish to
investigate.
Using an analog scope, in many circumstances you
will never see noise impulses, for two reasons, as illus
trated in Fig.4.
Firstly, they are usually not in synchronism with the
scope’s horizontal sweep and so occur on a different part
Fig.4: an analog scope may update
its display every five microseconds,
with about 500 sweeps superimposed.
Individual asynchronous noise pulses
do not overlay, so they are usually not
seen.
of the trace each sweep.
Secondly, and this is of the utmost
importance, very often the display on
an analog scope is an overlay of hun
dreds or thousands of superimposed
sweeps.
Suppose for example that you are
looking at the 3MHz signal shown
in Fig.4(a), with the sweep speed set
to 0.1µs/div. The forward trace takes
1µs and the retrace and holdoff might
occupy 2µs each, as illustrated in
Fig.4(b). That is 5µs for each complete
display cycle. Therefore, your scope
trace will sweep across the screen
200,000 times each second.
This is your update rate, the num
ber of times your display is renewed
each second. All these traces are being
drawn on your screen, each one on top
of the last.
You are capturing and displaying
only one out of every five microsec
onds of the live signal. You could say
your waveform capture rate is 200,000
waveforms/second, which in this case
is 20% of the live signal.
If you have turned up the brightness
(intensity) such that the effective per
sistence time of the screen phosphor is
2.5 milliseconds, then the display you
see is the overlay of about 500 traces
superimposed, each showing the same
signal pattern.
The display is really the average of
500 views of the input signal, with
the noise averaging towards zero.
Therefore you will never notice the
noise that is present and the trace and
baseline will be the smooth clean lines
which analog scope users have come
to expect.
But this means that analog scope us
ers are blissfully ignorant of noise and
interference which could be playing
Fig.5: a conventional digital scope may sample the real live signal for only one microsecond, then display
that segment for perhaps 33,000us. You see only 0.003% of the live signal.
February 1997 69
Fig.6: a 2kHz
sinewave was
sampled at 2200S/sec.
This too-slow rate
generated a 200Hz
alias frequency which
modulated the input
sinewave, producing
the false waveform
displayed.
havoc with the circuit or equipment
they are measuring.
When those same signals and inter
ferences are fed to a digital scope as
illustrated in Fig.5, the display will be
quite different. Because of the effects
listed above, noise pulses are recorded
along with the wanted signal.
Even though these interference
pulses may be only nanoseconds in
duration, they are liable to be dis
played. That might be regarded as a
disadvantage of the digital scope. But
many digital scopes also have a big
advantage – they can be programmed
to find glitches.
The scope waveform of Fig.1 is such
a case. The scope was programmed to
search for and trigger the scope display
on any pulse which had a duration
between 0.5 and 4.5µs.
The instrument found one interfer
ence pulse having a duration of 2.01µs
within a collection of thousands upon
thousands of clean signals. With the
scope triggered on this glitch you can
see and analyse it.
Some digital scopes can be set up
to be triggered on runt pulses or on
specified glitches as short as 2 nano
seconds. This is just not possible with
analog scopes.
sinewave you will see about two cycles
of that signal, indicating a frequency of
only 50Hz! But if you raise the sweep
speed to 20ns, the scope will sample
at 2GS/s. Then a little more than two
cycles of the same input signal will
be displayed, indicating the true fre
quency, 13MHz.
We should always use the scope
to achieve the fastest sample rate
possible, otherwise the display may
show the wrong frequency reading.
Or in other cases we may observe
distortion on fast edges in a complex
waveform, with the low harmonics re
produced larger and out of proportion
to the high harmonics. In other cases
a signal may seem to drift across the
screen untriggered, like some weird
apparition.
Alternatively the screen may
display a signal component at a fre
quency which does not exist at the
scope’s input terminals, as illustrated
in Fig.6.
Here the input signal is a 2kHz
sinewave and the digital scope is in
correctly operated with an effective
sampling rate of 2200 samples/second.
The display of the 2kHz signal ap
pears to be modulated with a slower
component, which has a period of
5ms, representing a frequency of
200Hz. Yet no 200Hz signal was ap
plied to the scope. Where is it coming
from?
We say the 2kHz real signal is also
masquerading under an “alias” (a false
name) at a lower frequency, 200Hz.
You can see an apparent modulation
pattern which has a 5ms period. It is
important to understand what causes
these strange phenomena and how to
prevent them.
Picturing voltage signals
Normally, when we draw a signal
waveform, we get something like
Fig.7(a) which depicts a 1kHz sine
wave signal. We say that this is drawn
in the frequency domain because the
horizontal axis of the diagram is time
which can be seconds, milliseconds,
microseconds or whatever.
But there is another way of depict
ing the same 1kHz sinewave signal
and that is the frequency domain, as
shown in Fig.7(b).
In this case, the horizontal axis of
the diagram is frequency and since we
only have one frequency it is depicted
as a vertical line at the 1kHz spot on
the axis. The height of the vertical line
is measure of the amplitude, just as it
is in the time domain.
When you connect a 1kHz signal
to a digital scope it will be sampled
at some rate, which we will call the
effective sampling frequency, fs.
Any sampling process generates
harmonics and so the sampler output
will contain the 1kHz input frequen
Aliasing
A completely different type of error
is sometimes seen on a digital scope
when incorrectly used. The effective
sample rate achieved is approximately
proportional to the sweep speed you
select.
For example, a scope which is ad
vertised to sample at 2GS/s will only
achieve that rate when you select the
fastest sweep speed.
But the same scope, when switched
to a sweep speed of 5ms/div has an
effective sampling rate of only 10kS/s!
That difference is crucial.
At that setting, if you apply a 13MHz
70 Silicon Chip
Fig.7: a 1kHz sinewave (a) can be represented in the frequency domain
(b) as a vertical line on the horizontal frequency axis. Its height shows its
amplitude. Sampling (c) at rate fs produces extra frequencies at fs ±1kHz.
Fig.8: complex waveforms (a) can be depicted in the frequency domain (b) by a sequence of vertical lines representing
the fundamental and all significant harmonics. The sampler (c) generates extra copies of all harmonics at the sum
and difference of the sample rate fs and each harmonic frequency.
cy, the sampler frequency fs, plus the
sum frequency (fs + 1kHz) and the
difference frequency (fs - 1kHz). These
frequencies are shown graphically in
Fig.7(c).
If the sampling frequency is 1MHz,
then the diagram of Fig.7(c) will show
the input at 1kHz, sampling frequency
at 1MHz, and the sum and difference
frequencies:
(1MHz + 1kHz) = 1,001kHz; and
(1MHz - 1kHz) = 999kHz
This description is a simplification,
for the sampling process also generates
an almost infinite number of other
multiples at still higher frequencies,
which we choose to ignore.
But most real life waveforms, espe
cially digital signals, are more com
plex and might be like the example
depicted in Fig.8(a). Squarish wave
forms like this can be represented as
the sum of a fundamental frequency
sinewave plus many harmonics.
And each harmonic is a sinewave
with an appropriate amplitude and
a frequency which a multiple of the
fundamental.
So the waveform shown in the time
domain diagram of Fig.8(a) might be
described in the frequency domain of
Fig.8(b) as a fundamental frequency of
1kHz plus many harmonic multiples at
frequencies 2kHz, 3kHz, 5kHz, 7kHz .
. . 21kHz, etc.
We have stopped at the 21st harmon
ic on the assumption that harmonics
beyond 21kHz will be insignificant.
We say that the input signal occu
pies a frequency spectrum extending
from zero to the highest significant
harmonic.
In this case the bandwidth B ex
tends up to 21kHz. We refer to 21kHz
as fB, the highest frequency in the
input signal. We imagine an envelope
shown as a dotted line in Fig.8(b) as
the boundary of this spectrum B.
When the complex waveform
shown in Figs.8(a & b) is sampled, the
sampler output looks something like
Fig.8(c). Here we arbitrarily chose the
sampling rate fs = 1MHz, so that fs is
much larger than fB.
The sum components generated by
the sampler include the frequency fs
added to the fundamental and to each
harmonic of the input. These extend
from fs up to the frequency (fs + fB).
The difference components extended
from fs down to the frequency (fs - fB).
That is, the spectrum of the sampling
products extends from (fs - fB) up to
(fs + fB).
Low pass filter
The A/D converter must only see the
spectrum of the input signal up to fB
but none of the products of sampling;
ie, above 21kHz in this case.
To achieve this rejection, digital
scopes include a programmable dig
ital low pass filter (LPF) between the
sampler and the A/D converter. The
lower part of Fig.8(c) shows this filter
and its passband, drawn here just a
smidgen wider than fB.
This filter passes the input signal
spectrum on to the A/D converter but
blocks all other frequencies above fB.
That desirable result depends on the
sampling rate fs being much higher
than the highest significant harmonic
(fB) in the input signal. That point is
vital!
Just how much higher is enough?
And what happens if fs is not high
February 1997 71
Fig.9: if the sampling rate is too low (a) the spectrum (fs - fB) overlaps the filter passband, so alias frequencies are
displayed. But (b) if fs > 2fB, all terms generated by the sampler are rejected by the filter LPF, so preventing aliasing.
enough? Fig.9(a) illustrates a case
where the input signals extend 21kHz
but the sampling rate is only 22.5kHz;
much too low.
This could occur if you operate the
digital scope at too slow a sweep rate.
This figure shows just the outline of
Fig.10: this diagram
explains the alias
frequency component
seen mixed with the
2kHz signal in Fig.5.
The alias frequency
is: (fs - f(in)) = (2.2kHz 2kHz) = 200Hz.
72 Silicon Chip
each spectrum instead of depicting
each and every harmonic.
The vital point
Now here is the vital point. Because
fs is so low, the sampler products in
trude into the spectrum of the input
signal. More importantly, many of
those sample frequencies will pass
through the low pass filter (LPF). So
they pass to the A/D converter and are
displayed on the screen!
Frequencies generated by the sam
pler which overlap the LPF passband
include (fs - fB) = (22.5kHz - 21kHz)
= 1.5kHz; then (22.5kHz - 19kHz) =
3.5kHz; then 5.5kHz, etc in steps up
to 20.5kHz. These “false” signals will
appear on the screen, mixed in with
the real signal.
With all those false frequency com
ponents mixed into the input signal,
the waveform displayed on the screen
will be nothing like the true shape.
Aliasing can make a signal look like
something it is not!
Nyquist criterion
So what is the minimum sampling
frequency needed to avoid aliasing?
Fig.9(b) shows the situation where
aliasing is just avoided.
Here the lowest frequency produced
by the sampler, (fs - fB), is just a smid
gen higher than fB. The frequency
clearance between fB and (fs - fB) pre
vents any overlap of the two spectra.
So under this condition aliasing is
avoided.
To put that into figures, we need:
(fs - fB) > fB; meaning that fs > (fB + fB)
or ultimately, fs > 2fB.
In plain English, that means that
the sampling frequency must be more
than twice the highest frequency com
ponent in the input signal.
This requirement is called the
Nyquist Criterion, which is invoked to
prevent aliasing errors in any system
which uses sampling.
The foregoing discussion supposes
that the response of the filter drops like
a rock to zero at the end of its nominal
passband; ie, a “brick-wall” filter.
But the response of real low pass
filters is never as steep as that and
some harmonic components beyond
the nominal passband will always
pass through.
Hence, to prevent aliasing distor
tions, we prefer the sampling frequen
cy to be at least five or even 10 times
the input signal bandwidth.
Weird modulation explained
We can now explain the weird mod
ulation of the waveform seen in Fig.6.
As Fig.10 shows, the input in Fig.6 was
a single frequency sinewave at 2kHz
but the sampling rate was too low at
2.2kHz. Sampling generates the extra
frequencies: (fs - fB) = (2.2kHz - 2kHz)
= 200Hz and also: (fS + fB) = (2.2kHz
+ 2kHz) = 4.2kHz.
200Hz is the alias frequency which
intrudes into the passband of the
low pass filter and mixes with the
2kHz input signal. This produces
the amplitude modulated waveform
seen in Fig.6 even though no 200Hz
component was present in the input
signal.
At very slow sweep speeds, you
might only see the 200Hz signal, noth
ing else; a real trap for young players!
To avoid alias problems when using
a digital scope, keep the sampling rate
high by using either the auto setup
facility or the highest possible sweep
speed. To determine if a signal seen is
an alias, raise the sweep speed or use
the Peak Detect mode.
Lastly, we observe that analog
scopes, because of their linear vertical
deflection systems, cannot produce
SC
aliasing errors.
Acknowledgements
Thanks to Tektronix Australia, Philips
Scientific & Industrial and Hewlett Packard for data and illustrations.
February 1997 73
|