Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

Experiment 2: Waveform Spectrum Analysis

Spectrum analysis – Introduction

The purpose of this experiment is to familiarize you with the analysis of signals and networks in the
frequency domain.

It is likely that much of our familiarity with signal representations involves signals that are specified as
functions of time. A time domain signal, such as a sine wave or square wave of a given frequency, is
readily produced in the lab using a function generator and can be easily displayed as a time function
using the oscilloscope. Waveform properties such as period, frequency, amplitude, rise time, etc. can be
measured directly in conjunction with the time domain display capabilities of the oscilloscope for a
signal applied to one of the scope input channels. However, the spectral content of the signal, describing
how the signal energy is distributed in frequency, is not readily apparent except for the simplest of
waveforms.

One way to obtain the spectral content of a time signal is to use a specially designed piece of test
equipment known as a spectrum analyzer [1]. The spectrum analyzer is constructed for the primary task
of measuring and displaying signal magnitude as a function of frequency for the time domain signal
applied to its input.

This experiment will explore methods to obtain spectral content of signals using a different approach -
one based on use of the high bandwidth, math processing capabilities and other advanced features of the
laboratory oscilloscope. For this purpose, the scope may be used primarily alone or in conjunction with
the function generator.

Background

Signal data can be obtained in linear form measured in rms volts or in log form measured in dB (decibel)
where

dB = 20 log10 ( V1/V2 ) . (1)

The decibel scale is commonly used for describing the gain or loss of amplifiers and other
circuits. It is also used for describing the amplitudes of signals. Its advantages over a linear
scale are:

When a signal is amplified or attenuated by a gain “G” in deci-Bells (dB), the output signal
level is the sum of the input signal level and the gain. For example, if the input signal is –13
dB and the gain is +20 dB, the output signal is +7 dB. For example, if a relative determination
were required, then a voltage that is one-half of its original value would be

dB = 20 log10( ½ ) = -6 dB . (2)

Project 2: 3310/331 8/18/2016 1


Measuring Periodic Signal Spectra

The frequency content of signals that are periodic in time can be measured by first acquiring
the time domain signal directly on an oscilloscope input channel and then performing the
spectral analysis using the scope FFT option.
The displayed time domain signal should display “enough” of the waveform amplitude and
duration to be meaningfully analyzed. In working the lab procedures and reviewing scope
options you will develop insight into how much of the wave form needs to be displayed
before performing an FFT, but as a helpful visualization consider the spectral analysis of a
sine wave of constant frequency. In that case it would be desirable to select a vertical scale
setting for the input channel that shows undistorted amplitude variation and a horizontal scale
setting that allows a reasonable number of cycles of the periodic signal to be displayed. A
signal whose amplitude displayed is either clipped off in level or; in the other extreme, too
small to be seen clearly on the scope display, would not have the proper vertical scale setting.
Too few or fractional cycles on the horizontal scale could also indicate a problem.
Once the signal is properly displayed, the oscilloscope FFT frequency analysis can be
performed. Figure 1 below is a spreadsheet generated conceptual example illustrating results
of the spectral analysis of a time domain signal. Spreadsheet processing used to generate
Figure 1 was based on 256 points of a 200 Hz sinusoidal signal that was sampled at 6 kHz,

Figure 1 – Periodic Signal Analysis Notions

Project 2: 3310/331 8/18/2016 2


zero padded to 512 points and scaled to a peak magnitude of one after applying an FFT with a
rectangular window. (Consult the scope manual to determine how to use scope options to
perform the FFT of a signal applied to an input channel.)

Measuring Frequency Response

The frequency response describes the magnitude and phase of a system output, as a function of
frequency, to an input sinusoid at the same frequency.

Figure 2 below illustrates an oscilloscope based measurement approach that could be used to
obtain the voltage frequency response magnitude and phase relative to an input sinusoid. In this
case a unit amplitude signal from a function generator, over a frequency range of interest, is
input to the system being measured. The corresponding output magnitude and phase is measured
using the scope amplitude and phase measurement capabilities for each frequency input. The
recorded data values can then be used to produce magnitude or phase plots vs frequency using
plotting software.

Figure 2 – Scope Measurement of Frequency Response Magnitude/Phase at a Single Frequency

The approach indicated above, though somewhat time consuming if many frequencies are
measured, is capable of yielding magnitude and phase data that can be accurately plotted and
formatted for analysis and presentation purposes.

When a quick estimate of the frequency response magnitude alone would be adequate, another
approach may be used.

Whereas the Figure 2 approach requires a separate oscilloscope measurement at each frequency
in the frequency range of interest, the approach to be described in Figure 3a below uses the
frequency sweep option of the AFG 2021 Arbitrary Function Generator to sweep through the
range of frequencies. The AFG output signal is input to the system being tested and the system
output is displayed on the oscilloscope. See the application examples in the AFG 2021 Manual
for more specific details. The resulting oscilloscope display, when scope and function generator
parameters are set appropriately, yields a time domain waveform in which the time corresponds
to the frequency currently being input. The parameters must be set to ensure the Nyquist

Project 2: 3310/331 8/18/2016 3


sampling rate is met and to provide a stable display on the oscilloscope. When this objective is
achieved, the frequency response magnitude can be read from the waveform envelope on the
scope display with the time value appropriately scaled to represent frequency.

Figure 3a –A Setup for Measuring Frequency Response Magnitude Using Scope & Function Generator

Scope mathematical functions can be used to process the waveform to obtain other plot formats,
such as providing a dB vertical scale. Also, the scope waveforms can be saved to data files and
evaluated more thoroughly using data analysis and plotting software. Figure 3b below was
created from scope display data that was generated using Figure 3a parameters and saved to a
data file. The system under test was an LC network(L=47 mH and C= 0.0022 uF) having
theoretical resonance frequency of approximately 15.6 kHz. The voltage across the capacitor
was the signal applied to the scope input channel. The data was then organized and plotted in a
spreadsheet. The Figure 3b plot has a “filled-in” appearance due to the large number of data
points in the file - the record length was 10000. For this measurement the sampling rate used was
100 kS/s and the sample acquisition mode was SAMPLE. (See the scope manual.)

Figure 3b – Spreadsheet Generated Display of Data Obtained from Figure 3 Measurement Approach

Project 2: 3310/331 8/18/2016 4


Fourier Analysis Theoretical Background

In signal analysis it is well known that an arbitrary periodic signal can be represented as a sum of
frequency components

 a n e jnt
n  

(5)

where  = 2f and f = 1/T is the fundamental frequency, and T is the period. The complex
coefficient, an , is obtained from T

 x ( t )e
0
 jnt
dt

T
1
an 
T0 x ( t )e  jnt dt (6)

This compact formulation of Fourier analysis implies negative frequencies and complex
voltages. The spectrum analyzer measures the magnitude of an, and gives no information about
the phase. It should be noted that the magnitudes of the Fourier components as given by (6) are
peak values while the spectrum analyzer measures rms values.

To relate the complex coefficients, an , to measurable values, let


n (7)
an  a ne j Then a  n  a *n  a n e  j n

where an is the magnitude of the complex coefficient and n is the phase angle of that
coefficient. Using equation (7), equation (5) becomes

x(t )  a0   a n [e j ( nt  n )  e  j ( nt  n ) ] (8)
n 1

x(t )  a0   2an cos( nt  n ). (9)
n 1

Comparing equation (9) to a periodic signal voltage



v( t )  V0   2Vn cos( nt   n ) (10)
n 1

where V0 is the average or “dc”component and Vn is the rms value (that value measured by the
spectrum analyzer) of the n-th harmonic

T T (12)
2
 v( t )e
1  jnt
V0   v( t )dt (11) Vn  dt .
T0 T 0

Project 2: 3310/331 8/18/2016 5


Sine Wave

As a simple example of the comparison of calculated Fourier coefficients to experimental


rms values from the spectrum analyzer, let
v (t )  cos( t ) (13)

Equation (11) simply represents the area under a cosine curve over the period T, so the dc
component of V0 is just zero as expected. The rms values from equation (12) are

T
2

Vn  cos(t )e  jn t dt (14)
T 0

T
2
T 0
Vn  [cos( t ) cos( nt )  j cos( t ) sin( nt )]dt (15)

In equation (15) the cosine-sine term integrates to zero for all values of n, so there is no
imaginary component of Vn and the magnitude signs are redundant. The cosine-cosine term
integrates to zero for all values of n except n=1. For n=1 the cosine-cosine term integrates to a
value of T/2. So
2 1 (16)
V1    0.707
2 2
which is the expected rms value for a sinusoidal signal with peak value of unity.

Periodic Exponential Decay

As a more complicated example consider a periodic exponential decay with period T of


the form

t
v(t )  exp( ) where   T.

From equation (11)


T
       
T t t T
1 
V0   e dt   e   1  e  . (18)
T0 T  T 
 0  

Since by assumption the period T is much greater than the characteristic decay time , then

V0 =  / T . (19)

Using equation (12)

Project 2: 3310/331 8/18/2016 6


T t T 1 
2    jnt 2    jn  t
T 0 T 0
Vn  e e dt  e dt (20)

1 
2   jn  T
  (21)
Vn  [1  e ].
1 
  jn T
 

Since T is much greater than , the exponential term in equation (21) is strongly damped and

2 2 1
Vn    (22)
T T 1  jn
 jnT

 1
Vn  2 .
T 1  n 2 2  2 (23)

Equation (23) yields the rms values of voltage that we would expect to measure on a spectrum
analyzer. These voltages also correspond to correct FFT processing of the periodic exponential
decay time function. In this case the FFT amplitude would be displayed in units of dBV and the
quantities in eqn (23) would be converted to dBV for the comparison.

The phase angle of each harmonic component can be determined from the real and imaginary
components in equation (22).

Project 2: 3310/331 8/18/2016 7


Experiment 2: Waveform Spectrum Analysis - Lab Procedures
General Instructions:

For safety to yourself and the equipment, be certain that power is not applied while making
circuit connections. For instance the dc power supply should be off (use the output ON/OFF
button as needed) and the function generator ON/OFF button should be set to disable output until
after the configuration has been wired and checked for correctness.
Experiment:

Equipment List

1 Tektronix MDO 3024 Oscilloscope with TPP0250 Probe with Probe Tip to BNC Adapter
1 Tektronix AFG 2021 Arbitrary/Function Generator
1 Screwdriver
1 Schottky Pulse Circuit Minibox (Labeled Schottky)
1 Solderless Wiring Fixture
1 47 mH Inductor (In drawer labeled Waveform Analysis Experiment)
3 Capacitors (See Procedure (c) below.)

Procedure

The objective of this experiment is to familiarize you with oscilloscope based measurement
techniques that can be used to determine both the properties of periodic signals in the frequency
domain and the frequency response of electrical networks.
(a) Periodic Waveforms. Using the Oscilloscope Math/FFT options, examine the
amplitudes and frequencies of the first 10 harmonics of square, triangular, and sine waves from
the AFG 2021 function generator. First set the output impedance to High Z. Apply a 1 kHz, 2 V
peak-to-peak, square wave to a scope input channel using the TPP0250 Probe with Adapter
connected to the Output BNC connector of the function generator. Use FFT controls to measure
the amplitude and frequency of harmonics 1 through 10 using both linear and dB modes. Your
primary interest here is the relative amplitude of each higher harmonic (2 through 10) to the
fundamental on a linear and a log scale.
Repeat these measurements for triangular and sine waves of the same frequency and amplitude.
For these two cases, appropriate FFT measurements in the dB mode alone should be adequate.

(b) Solitary Pulse Train. Connect the Schottky Pulse Circuit Minibox in the circuit
shown in Figure 4. Drive it with a 2 V peak to peak, 50 Hz, square wave from the function
generator and observe the shape of the square wave from the function generator and pulses from
the Schottky Pulse Circuit on the oscilloscope per Figure 4. Record the amplitude and time decay
of the Minibox output pulses. This will allow you to determine the time constant of the
exponential decay which is used in eqn (23) to determine the theoretical frequency content. Use
FFT processing of the Minibox output to determine the dBV amplitude of the frequency content
from dc to the 20th harmonic.

Project 2: 3310/331 8/18/2016 8


To scope

AFG 2021 .47 F


SCOPE
To scope
1N5822 1.8 k

Figure 4 - Schottky Pulse Circuit

(c) Bode Plot. Using the Figure 3a based approach described in the Measuring Frequency
Response section, examine and record the frequency response up to 100.0 kHz of the circuit
shown in Figure 5 above. For C use capacitance values of 0.02 F and 220 pF and record the
resonant frequency for each value. Use as input to the circuit the AFG 2021 sine wave having
peak to peak voltage of 282.8 mV (THIS IS A SMALL VOLTAGE). This voltage should be
swept from 0-100 kHz in 100 ms. The AFG 2021 output impedance should be set to 50 ohms.
Save the data for each of the two cases so that you can later make Bode plots – magnitude in dB
vs log(frequency).

AFG 2021
Sine Wave Input to
47 mH
Scope
C

Figure 5 - Bode Plot Circuit


Report

(a) For the square wave data calculate the relative amplitudes of harmonics 2 through 10
to the fundamental frequency in both linear(%) and log(dB) form. Calculate the theoretical
values expected from a Fourier analysis of the square wave and compare these to the
experimental data in a table. Discuss and explain any differences between theory and
experiment.
Repeat this process for the triangular and sine waves using a separate table for each wave form.
(b) For the train of exponential pulses use the expressions for the expected spectrum to
calculate the expected amplitudes from dc to the 20th harmonic and compare these values to the
experimental data in a table. Discuss and explain any differences between theory and
experiment.

(c ) On a single xy-axis, plot the two Bode plots. That is, plot the magnitude in dB vs log
frequency over the frequency range from 0.1 – 100 kHz. Explain qualitatively the significant
features and differences among the plots. Compare the experimental resonant frequencies to
those expected theoretically in a table and discuss any differences.

Project 2: 3310/331 8/18/2016 9


Suggested Reading

Tektronix MDO3000 Series Mixed Domain Oscilloscopes User Manual


Tektronix AFG2021 Arbitrary/Function Generator Quick Start User Manual

REFERENCES

[1] C. R. Paul, Introduction to Electromagnetic Compatibility, (John Wiley & Sons, Inc, 2006),
pp. 142-148.

[2] Alan V. Oppenheim and Alan S. Willsky. Signals and Systems, (Prentice Hall, Upper
Saddle River, 1996)

Project 2: 3310/331 8/18/2016 10

You might also like