Signal Theory Lab 1 - DSO Measurements
Signal Theory Lab 1 - DSO Measurements
Signal Theory Lab 1 - DSO Measurements
Vertical setup. Horizontal setup. Trigger setup. Run control. Automatic time
measurements. Automatic voltage measurements. Cursor measurements.
Reducing random noise on a signal. Frequency-domain measurement.
Aliasing. Windowing.
Introduction
The digital storage oscilloscope (DSO) is a versatile tool for the engineer. It has
the ability to sample and store voltage waveforms, giving it the ability to
“capture” transient waveforms and also the ability to perform mathematical
operations on the sample values. One very important operation is known as the
Fast Fourier Transform (FFT) which gives the DSO the ability to display the
spectral content of a waveform. Like any tool though, it has its limitations, and
careful operation is required to interpret results correctly.
Objectives
1. To become familiar with setting up a DSO.
3. To become familiar with the FFT and aliasing when using a DSO.
Equipment
1 Digital Storage Oscilloscope (DSO) – Agilent DSO-X 2004A with Wave Gen
Signal Theory
L1.2
4mm leads (assorted colours), 2 BNC to 4mm leads, 1 BNC to 4mm
adaptor
Safety
This is a Category A laboratory experiment. Please adhere to the Category A
Cat. A lab
safety guidelines (issued separately).
Basic Setup
Refer to the Lab You will be asked to perform various and wide-ranging tasks with the DSO, so
Equipment Guide
it is important that you have the Lab Equipment Guide (LEG) as a reference.
2. Ensure the DSO has been set to its default setup configuration.
Vertical Setup
2. Press 1 and select each softkey option within the vertical setup menu and
notice that each change affects the status line and information area
differently. Adjust the vertical scale (volts/div) to 1 V/div.
Horizontal Setup
1. Turn the Horizontal knob and notice the change it makes to the status line.
2. Press Horiz . Toggle the Time Ref softkey to see the effect of
moving the trigger point . Return the time reference to the centre.
Signal Theory
L1.3
3. Change the Time Mode to see the effect. Restore the Time Mode to
Normal and set the horizontal scale to 100 s/div.
4. Turn the horizontal delay knob to see the effect. Push the horizontal delay
knob to reset the delay to 0.00 s.
Trigger Setup
1. Turn the trigger Level knob and notice the changes it makes to the display.
2. Press Trigger then use the Source softkey to scroll through each of
the options and notice that each change is shown in the status line.
4. Leave the mode on Normal. Adjust the trigger level so that it is above the
positive peak of the displayed sine wave and notice the change in the status
line. Return the trigger mode to Auto and notice the effect. Move the
trigger level back to 0.0 V.
5. Change the Coupling to LF Reject and observe the display and status
line. Return the Coupling to DC.
6. Change the AWG frequency to 2 Hz. Adjust the time base to 100 ms/div.
Press Horiz and change the Time Mode to Roll.
7. Change the AWG wave shape to square, then ramp, then back to sinusoid.
9. Set the AWG to a 20 kHz sinusoid. Try to adjust the timebase to display
two cycles – note that the timebase setting is restricted in roll mode.
10. Set the Time Mode to Normal and adjust the timebase to 10 s/div.
Signal Theory
L1.4
Run Control
2. Set the AWG for ramp. Does the displayed waveform change?
3. Disconnect the input from DSO channel 1. Does the displayed waveform
change?
Time-domain Measurement
Automatic Time Measurements
1. Press Meas . Notice that measurements for frequency and peak to peak
are automatically displayed for channel 1.
2. Change the AWG wave shape to square. Adjust the duty cycle to the
minimum available.
3. On the DSO, press the Type: softkey. Select Duty Cycle then press
Add Measurement. Note the measured duty cycle.
4. Adjust the duty cycle in steps across its full range using the AWG knob.
Note the maximum duty cycle available.
5. Use the AWG keypad to return the duty cycle to 50%. Set the wave shape
to sinusoid. Set the frequency to 2 kHz.
7. Remove the Phase Shifter module from the TIMS trainer and set the
“Frequency Range” switch to “LO”. Carefully replace the Phase Shifter
module into the TIMS unit.
Signal Theory
L1.5
8. Turn the TIMS trainer on. Connect the earth of the AWG lead to the green The TIMS is turned
on at the back –
GND terminal on the TIMS trainer. You may leave the earth of the DSO when on, you should
see the LEDs in the
lead floating (since it is connected to earth anyway). counter section light
up
9. Connect the AWG output to the Phase Shifter unit’s “IN” terminal. Measure
the Phase Shifter input and output on DSO Channels 1 and 2 respectively.
On the Phase Shifter unit, turn the coarse and fine knobs fully anticlockwise,
and turn the ±180º switch on.
10. Press Meas . Press Type and then select Phase measurement. Press
Settings and then set Source 1 to channel 2 and Source 2 to
3. Note each of the three measurements for a sinusoidal signal then change the
AWG waveform to square, then to ramp, and observe the change in the
measurements.
4. Set the AWG to a sinusoidal wave, and vary the DC offset. Note the effect
on the Vp-p, Vavg and Vrms values. Return the DC offset to 0.00 V.
Signal Theory
L1.6
Cursor Measurements
The cursor keys are useful for making custom time or voltage measurements on
a signal.
1. Connect a 2 V p-p, 200 Hz square wave from the AWG to the TIMS trainer
The RC LPF is
located in the RC LPF input in the Utilities module. The RC LPF is a simple first-order RC
Utilities module
circuit that acts as a “lowpass filter”. Measure the AWG output with
Channel 1. Measure the RC LPF output with Channel 2.
2. Press Horiz . Set the Time Ref softkey to Left. Set the timebase to
50 s/div. Set the vertical scale to 500 mV/div for each channel.
5. Press the Cursors softkey and select Y1 as the active cursor. Move the
Y1 cursor to align with the bottom of the output response by rotating the
cursors knob.
6. Press the Cursors softkey and select Y2 as the active cursor. Move the
Y2 cursor to align with the top (steady-state value) of the output response.
Check that the cursor measurement displays Y2 2.000 V .
7. Press the Units softkey. Press Y Units and select Ratio %. The
cursors will now measure in percent but this measurement needs a reference.
Press Use Y Cursors As 100% to set the current Y cursor positions
as the reference values. Y1 will now show 0%, Y2 100% and Y2 100%.
Signal Theory
L1.7
9. Press . Press the Cursors softkey then select X1 as the active cursor.
Position X1 to align with the vertical edge of the input square wave on
channel 1. (The timescale is the same for all channels!)
10. Select X2 as the active cursor and position it to align with the intersection
of the Y2 cursor and the channel 2 waveform.
v A step-response for
100% a first-order system
steady-state
63.2%
0
t
T
T 48 microseconds
12. Connect the 200 Hz square wave from the AWG to the TIMS trainer
Headphone Amplifier input “A”. Measure the AWG output with Channel 1.
Measure the Headphone Amplifier “LPF” output with Channel 2.
Signal Theory
L1.8
14. Use the cursors to record the following quantities:
A typical step-
response for an
v
underdamped P.O. = percent overshoot
second-order
system
105%
100%
95%
steady-state
0 tp 1/ f d t
ts
16. Disconnect the DSO and AWG leads from the TIMS unit.
Signal Theory
L1.9
Bandwidth Limiting
This method applies the incoming signal to a lowpass filter before it is sampled
Bandwidth limiting
by the DSO. This method works only when the noise has very high frequency will only help if the
signal frequency is
content. The bandwidth limiter “cuts off” frequencies above 20 MHz. less than about
1 MHz.
1. Change the AWG waveform to a sinusoid. Set the amplitude to 20 mV and
the frequency to 20 Hz.
3. Set the vertical scale to 20 mV/div and the horizontal scale to 10 ms/div. If
necessary, press Mode/Coupling and select HF Reject for trigger
coupling. You should see a noisy sinusoid.
Averaging
The second method of reducing noise works when noise is present below the
cutoff frequency of the bandwidth limit filter. First, you stabilize the displayed Averaging can only
be used to clean up
waveform by removing the noise from the trigger path. Second, you reduce the a signal if the noise
is “uncorrelated”
noise on the displayed waveform by averaging the samples.
Signal Theory
L1.10
3. Vary the setting for # Avgs to select the number of averages that best
eliminates the noise from the displayed waveform. In this mode the DSO
calculates the average value of each point over the previous # frames of
acquired data. The higher the number of averages, the slower the displayed
waveform responds to waveform changes. Set # Avgs to 16.
4. Change the AWG wave shape to square, then ramp, then back to sinusoid to
see the effect of averaging.
5. Press the Acq Mode softkey to select “High Resolution”. This mode
averages sequential samples within the same acquisition rather than
corresponding samples from previous acquisitions. At low sweep speeds the
DSO oversamples the signal and the effective resolution is increased by
averaging samples which would otherwise be ignored. The update rate of
the display is not affected.
7. Disconnect the lead from the DSO channel 2 BNC input (i.e. physically
remove the lead from the DSO input).
The DSO
autodetects the
probes attached to 8. Press the DSO’s Auto Scale button. If you did not disconnect the
the inputs, so it is
important to remove lead from channel 2 (which has no signal, apart from noise) the DSO will try
any unwanted
signals before to set the horizontal and vertical scales to view this “interesting” noisy
hitting the Auto
signal, rather than settings the scales for the signal attached to channel 1 (if
Scale button
required, you can undo the effect of the Auto Scale button by choosing the
Undo Autoscale softkey).
9. Set the Channel 1 position to 0.0 V and the trigger level to 0.0 V. These
may have changed due to the Auto Scale feature.
Signal Theory
L1.11
Frequency-domain Measurement
Normally, when a signal is viewed on an oscilloscope, it is viewed in the time-
domain. That is, the vertical axis is voltage and the horizontal axis is time. For
many signals, this is the most logical and intuitive way to view them. But when
the frequency content of the signal is of interest, it makes sense to view the
signal in the frequency-domain. In the frequency-domain the horizontal axis is
frequency and the vertical axis is voltage but is usually scaled in dBV (decibels
relative to 1 V RMS).
g(t )
0 t The frequency-
domain
representation, or
spectrum, is a graph
G (f ) of the sinusoids
present in a signal
0 f
1. Set up a 2.2 kHz, 4 Vp-p sinusoid on the AWG. Set the DSO vertical scale
to 1 V/div and horizontal scale to 100 s/div.
4. Use the shared position knob adjacent to the Math key to adjust the
offset to approximately -30 dBV.
5. Use the shared scale knob to adjust the vertical scale to 10 dB/div.
Signal Theory
L1.12
6. Turn the Horizontal knob and observe the sample rate and FFT Resolution
shown on the display. Set the horizontal scale to 1.000 ms/div.
What is the sample rate at this setting? What is the FFT Resolution?
fs 5 MSa/s fs N 5/22 z
An FFT only
displays frequencies The FFT will only display frequencies from 0 to half the sample rate, f s 2 .
from 0 to half the
sample rate
7. Set the frequency Span to 5 kHz and the Center frequency to 2.5 kHz.
The Span and Center controls can be used to zoom in on a part of the
FFT display.
9. Turn off channel 1 and channel 2 so that only the FFT is displayed. Note
that although the display of the channels is turned off the data acquisition
still takes place and the data is available to calculate the FFT.
10. Note that even though two sinusoids are present in the signal g(t), the DSO
only displays a single “peak”, with a fairly wide side lobe.
The timebase and 11. Change the DSO horizontal scale to 10.00 ms/div, so that the sample rate
sample rate are
inversely changes to 250 kSa/s. The DSO now displays two peaks corresponding to
proportional to one
another the two sinusoids that make up “g(t)”.
12. Note that the side lobes of the “peaks” are reduced and that the difference
between frequencies which can be distinguished on the display is also
reduced. This is a consequence of increasing the frequency resolution by
decreasing the sample rate. Be aware though, that although the frequency
resolution of the FFT is determined by the sample rate and number of points
calculated, the selected display settings may reduce the effective resolution
visible on the display.
Signal Theory
L1.13
Aliasing
The frequency f s 2 is also known as the folding frequency. Frequencies that
would normally appear above f s 2 (and therefore outside the range of the
FFT) are folded back into the normal range of the FFT. These unwanted
To prevent aliasing,
frequency components are called aliases, since they erroneously appear under we have to sample
at greater than twice
the alias of another frequency. To prevent aliasing, the DSO has to sample at the bandwidth of the
signal
greater than twice the highest frequency in the signal being measured (twice the
bandwidth). It is therefore necessary to have some idea of the frequency content
of the signal being measured to interpret the DSO’s FFT results correctly.
1. Set the AWG frequency to a triangle wave of approximately 2.6 kHz (you
will need to change the ramp symmetry to 50%). Observe just the spectrum
(turn off Channel 1) on the following settings.
A triangle wave’s
spectrum with no
aliasing
The leftmost spectral line is the fundamental. The next line is the 3 rd
harmonic. The next is the 5th harmonic and so forth. The higher harmonics
are small in amplitude with the 35th harmonic just visible above the FFT
noise floor. The frequency of the 35th harmonic is 35 x 2.6 kHz = 91 kHz,
Signal Theory
L1.14
which is within the folding frequency of f s 2 (125 kSa/s). Therefore, no
Now the upper harmonics of the triangle wave exceed the folding frequency
and appear as aliases in the display.
A triangle wave’s
spectrum with
aliasing
3. Change the sample rate to 12.5 kSa/s, then 5 kSa/s. The frequency plot is
severely aliased.
Often the effects of aliasing are obvious, especially if you have some idea as to
the frequency content of the signal. Spectral lines may appear where no
frequency components exist.
It is important to Signals that are bandlimited (that is, have no frequency components above a
recognise aliasing
and take steps to certain frequency) can be viewed alias-free by making sure that the effective
prevent it
sample rate is high enough.
Signal Theory
L1.15
Varying Signal with Fixed Sample Rate
3. Increase the AWG frequency in steps of 1 kHz using the cursors and knob.
The spectral peak (representing the AWG sinusoid) should move to the
right as you increase the frequency – this is what we expect. Slowly increase
the frequency to 6 kHz.
4. Continue increasing the AWG frequency slowly. Aliasing occurs as the We’re setting the
measured signal’s
frequency exceeds 6.25 kHz. Slowly increase the frequency from 7 kHz to bandwidth above
the DSO’s folding
10 kHz. The spectral peak moves to the left on the display. frequency
5. Slowly decrease the AWG frequency in steps of 100 Hz so that the spectral
peak returns for the first time to the vertical cursor positioned at 3 kHz.
(The AWG’s frequency should still be greater than 6.25 kHz). The DSO is
now telling us that a frequency component exists at 3 kHz!
State the relation between the DSO’s observed frequency, the sample rate,
and the actual frequency of the sinusoid:
f DSO 3 kHz
Signal Theory
L1.16
7. Turn the Cursors off.
Windowing
The FFT operates on a finite length time record, but assumes that this time
record is exactly one period of an infinitely long periodic signal. With the
waveform shown below, where an integral number of periods fits exactly within
the time record, the infinitely long signal assumed by the FFT is correct.
FFT replicas
producing the
desired waveform t t t
However, we do not normally have control over how the waveform fits into the
time record of the DSO, with the result that discontinuities are introduced by
the replication of the time record by the FFT over all time:
FFT replicas
producing
t t t
discontinuities
real signal assumed signal by FFT
Time Record
This effect is known as leakage, and the effect in the frequency-domain is very
apparent. For the case of a single sinusoid as shown, the normally thin spectral
line will spread out in a peculiar pattern.
The solution to the problem of leakage is to force the waveform to zero at the
ends of the time record so that no discontinuity will exist when the time record
is replicated. This is accomplished by multiplying the time record by a window
function.
The window function modifies the time record and will produce its own effect
in the frequency domain, but for a properly designed window, the effect is a vast
improvement over no window at all.
The Hanning window, and it’s effect in the time-domain, is shown below:
Windowing reduces
spectral leakage
Signal Theory
L1.17
t t t
We normally use the Hanning or Flat Top window. The Rectangular and
Blackman-Harris windows should be considered windows for special situations.
Signal Theory
L1.18
Windows
1. Press Math . Press the More FFT softkey and ensure Window is set to
“Hanning”.
2. Set the AWG frequency to 2 kHz. Observe just the spectrum on the
following settings.
Signal Theory
L1.19
4. Set the following.
Signal Theory
L1.20
Questions
Encircle the correct answer, cross out the wrong answers. [one or none correct]
1. DSO Basics
(i)
A waveform consisting of a 3 V peak-to-peak sinusoidal voltage is
superimposed on a 3 V DC voltage. A DSO measuring the signal using AC
coupling will display the following components:
(ii)
The DSO always takes 50,000 time-domain samples, then zero pads the time
record to 65,536 samples before performing an FFT. By increasing the sample
rate (e.g. from 12.5 kSa/s to 50 kSa/s), the resolution of the FFT will:
(iii)
The spectral leakage of the Rectangular window, compared to the Flat Top
window, is:
NONE of the answers are correct
(a) more (b) less (c) the same
(iv)
The spectrum of a sinusoid on a DSO that uses a rectangular window will in
general look like:
(v)
A DSO’s sample rate is set to 100 kSa/s. The DSO display range will be:
(a) 0 to 200 kHz (b) 0 to 100 kHz (c) -50 kHz to 50 kHz
Signal Theory
L1.21
2. Aliasing
(i)
A signal has bandwidth B and is ideally sampled at a rate of f S . Aliasing will
(ii)
A sinusoid of frequency 13 kHz is sampled at 20 kHz. The DSO display has a
span of 0 Hz to 9.77 kHz. The display will look like:
(a) (b) (c)
(iii)
A 67 kHz sinusoid is ideally sampled at 100 kHz. The ideal spectrum is:
G (f )
G (f )
G (f )
(iv)
A signal has a known bandwidth of 7 kHz. For maximum frequency resolution
without aliasing, the DSO sample rate should be set to:
(a) 12.5 kSa/s (b) 25 kSa/s (c) 50 kSa/s
(v)
A signal is known to be of the form g t cos2f1t cos2f 2t , where
f1 5 kHz and f 2 15 kHz . It is desired to measure the frequency f1 using a
DSO spectrum. For maximum frequency resolution, the DSO sample rate
should be set to:
NONE of the answers are correct
(a) 25 kSa/s (b) 50 kSa/s (c) 100 kSa/s
Signal Theory
L1.22
Signal Theory