Understanding Dynamic Signal Analysis AN1405-2
Understanding Dynamic Signal Analysis AN1405-2
Understanding
Dynamic Signal Analysis
Application Note 1405-2
Table of Contents
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
Section 1: FFT Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4
Section 2: Sampling and Digitizing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8
Section 3: Aliasing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9
Section 4: Band-Selectable Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13
Section 5: Windowing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14
Section 6: Network Stimulus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .20
Section 7: Averaging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23
Section 8: Real-Time Bandwidth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .25
Section 9: Overlap Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .28
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .29
Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .29
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .30
Introduction
Figure 1.1. The FFT samples in both the time and frequency domains
Time Records
A time record is defined to be
N consecutive, equally spaced
samples of the input. Because it
makes our transform algorithm
simpler and much faster, N is
restricted to be a multiple of 2,
for instance 1024.
Figure 1.4. A new time record every sample after the time record is filled
Figure 1.5. The relationship between the time and frequency domains
What is the
Frequency Range of the FFT?
We can now quickly determine
that the highest frequency we can
measure is:
f max = N
2
1
(Period of Time
Record )
Figure 1.9. Frequency range of dynamic signal analyzers is determined by sample rate.
* You can skip this section and the next if you are not
interested in the internal operation of a dynamic signal
analyzer. However, if you specify the purchase of
dynamic signal analyzers, you are especially encouraged
to read these sections. The basic knowledge you gain
from these sections can insure you specify the best
analyzer for your requirements.
8
Figure 2.2. The sampler and ADC must not introduce errors.
Section 3: Aliasing
Aliasing in the
Frequency Domain
This completely erroneous result
is due to a phenomena called
aliasing.* Aliasing is shown in the
frequency domain in Figure 3.4.
Two signals are said to alias if the
difference of their frequencies falls
in the frequency range of interest.
This difference frequency is always
generated in the process of sampling.
In Figure 3.4, the input frequency
is slightly higher than the sampling
frequency so a low frequency alias
term is generated. If the input
frequency equals the sampling
frequency as in our small part
example, then the alias term falls
at DC (zero Hertz) and we get the
constant output that we saw above.
Aliasing is not always bad. It is
called mixing or heterodyning in
analog electronics, and is commonly
used for tuning household radios
and televisions as well as many
other communication products.
However, in the case of the missing
temperature variation of our small
part, we definitely have a problem.
How can we guarantee that we
will avoid this problem in a
measurement situation?
Figure 3.5 shows that if we sample
at greater than twice the highest
frequency of our input, the alias
products will not fall within the
frequency range of our input.
Therefore, a filter (or our FFT
processor, which acts like a filter)
after the sampler will remove the
alias products while passing the
desired input signals if the sample
rate is greater than twice the
highest frequency of the input. If
the sample rate is lower, the alias
products will fall in the frequency
range of the input and no amount
of filtering will be able to remove
them from the signal.
Figure 3.5. A frequency domain view of how to avoid aliasing - sample at greater than twice the highest input
frequency
11
Digital Filtering
Fortunately, there is an
alternative that is cheaper, and
when used in conjunction with
a single analog anti-alias filter,
always provides aliasing protection.
It is called digital filtering,
because it filters the input signal
after we have sampled and digitized
it. To see how this works, let us
look at Figure 3.8.
In the analog case we already
discussed, we had to use a new
filter every time we changed the
sample rate of the analog-to-digital
converter (ADC). For digital
filtering, the ADC sample rate is
left constant at the rate needed for
the highest-frequency span of the
analyzer. This means we need not
change our anti-alias filter. To
get the reduced sample rate and
filtering we need for the narrower
frequency spans, we follow the
ADC with a digital filter.
This digital filter is known as a
decimating filter. It not only filters
the digital representation of the
signal to the desired frequency
span, it also reduces the sample
rate at its output to the rate
needed for that frequency span.
Because this filter is digital, there
are no manufacturing variations,
aging or drift in the filter. Therefore,
in a two-channel analyzer, the
filters in each channel are identical.
It is easy to design a single digital
filter to work on many frequency
spans so the need for multiple
filters per channel is avoided.
All these factors taken together
mean that digital filtering is
much less expensive than
analog anti-aliasing filtering.
12
Section 5: Windowing
Figure 5.1. FFT assumption time record repeated throughout all time
14
a)
b)
c)
d)
15
What is Windowing?
In Figure 5.5 we have again
reproduced the assumed input
wave form of a sine wave that is
not periodic in the time record.
Notice that most of the problem
seems to be at the edges of the
time record; the center is a good
sine wave. If the FFT could be
made to ignore the ends and
concentrate on the middle of the
time record, we would expect to
get much closer to the correct
single-line spectrum in the
frequency domain.
If we multiply our time record by
a function that is zero at the ends
of the time record and large in the
middle, we would concentrate the
FFT on the middle of the time
record. One such function is shown
in Figure 5.5c. Such functions are
called window functions because
they force us to look at data
through a narrow window.
Figure 5.6 shows us the vast
improvement we get by windowing
data that is not periodic in the time
record. However, it is important
to realize that we have tampered
with the input data and cannot
expect perfect results. The FFT
assumes the input looks like
Figure 5.5d, something like an
amplitude-modulated sine wave.
This has a frequency spectrum
which is closer to the correct
single line of the input sine wave
than Figure 5.5b, but it still is not
correct. Figure 5.7 demonstrates
that the windowed data does not
have as narrow a spectrum as an
unwindowed function which is
periodic in the time record.
16
Figure 5.7. Windowing reduces leakage but does not eliminate it.
a) Unwindowed trainsients
* There is another way to avoid this problem using bandselectable analysis. We illustrate this in Agilent
Application Note 1405-3.
** It will, in fact, be periodic in the time record.
18
Passband Shapes or
Window Functions?
In the proceeding discussion we
sometimes talked about window
functions in the time domain.
At other times we talked about
the filter passband shape in the
frequency domain caused by
these windows. We change our
perspective freely to whichever
domain yields the simplest
explanation. Likewise, some
dynamic signal analyzers call
the uniform, Hanning and flat-top
functions windows and other
analyzers call those functions
pass-band shapes. Use whichever
terminology is easier for the
problem at hand, as they are
completely interchangeable,
just as the time and frequency
domains are completely
equivalent.
As we explained in Agilent
Application Note 1405-1, we can
measure the frequency response
at one frequency by stimulating
the network with a single sine
wave and measuring the gain and
phase shift at that frequency.
The frequency of the stimulus
is then changed and the measurement repeated until all desired
frequencies have been measured.
Every time the frequency is changed,
the network response must settle
to its steady-state value before a
new measurement can be taken,
making this measurement process
a slow task.
Many network analyzers operate
in this manner and we can make
the measurement this way with
a two-channel dynamic signal
analyzer. We set the sine wave
source to the center of the first
filter as in Figure 6.1. The
analyzer then measures the gain
and phase of the network at this
frequency while the rest of the
analyzers filters measure only
noise. We then increase the source
frequency to the next filter center,
wait for the network to settle and
then measure the gain and phase.
We continue this procedure until
we have measured the gain and
phase of the network at all the
frequencies of the filters in our
analyzer.
Noise as a Stimulus
A single sine wave stimulus does
not take advantage of the possible
speed the parallel filters of a
dynamic signal analyzer provide.
If we had a source that put out
multiple sine waves, each one
centered in a filter, then we could
measure the frequency response
at all frequencies at one time.
Such a source, shown in Figure
6.2, acts like hundreds of sine
wave generators connected
together. Although this sounds
very expensive, just such a source
can be easily generated digitally.
It is called a pseudo-random noise
or periodic random noise source.
20
Band-Limited Noise
Before leaving the subject of
network stimulus, it is appropriate
to discuss the need to band limit
the stimulus. We want all the
power of the stimulus to be
concentrated in the frequency
region we are analyzing. Any
power outside this region does not
contribute to the measurement
and could excite non-linearities.
This can be a particularly severe
problem when testing with random
noise since it theoretically has the
same power at all frequencies
(white noise). To eliminate this
problem, dynamic signal analyzers
often limit the frequency range of
their built-in noise stimulus to the
frequency span selected. This
could be done with an external
noise source and filters, but every
time the analyzer span changed,
the noise power and filter would
have to be readjusted. This is done
automatically with a built-in noise
source so transfer function
measurements are easier and
faster.
Section 7: Averaging
a) Random noise
b) Digital data
RMS Averaging
When we watch the magnitude of
the spectrum and attempt to guess
the average value of the spectrum
component, we are doing a crude
RMS* average. We are trying to
determine the average magnitude
of the signal, ignoring any phase
difference that may exist between
the spectra. This averaging
23
Linear Averaging
However, there is a technique for
improving the signal-to-noise ratio
of a measurement, called linear
averaging. It can be used if a
trigger signal is available that is
synchronous with the periodic
part of the spectrum. Of course,
the need for a synchronizing
signal is somewhat restrictive,
although there are numerous
situations in which one is
available. In network analysis
problems, the stimulus signal
itself can often be used as a
synchronizing signal.
Linear averaging can be
implemented many ways, but
perhaps the easiest to understand
is where the averaging is done in
the time domain. In this case, the
synchronizing signal is used to
trigger the start of a time record.
Therefore, the periodic part of the
input will always be exactly the
same in each time record we take,
whereas the noise will, of course,
vary. If we add together a series of
these triggered time records and
divide by the number of records
we have taken, we will compute
what we call a linear average.
24
Real-Time
Bandwidth Requirements
How wide a real-time bandwidth
is needed in a dynamic signal
analyzer? Let us examine a few
typical measurements to get a
feeling for the considerations
involved.
Adjusting Devices
If we are measuring the spectrum
or frequency response of a device
that we are adjusting, we need to
watch the spectrum change in
what might be called psychological
real time. A new spectrum every
few tenths of a second is sufficiently
fast to allow an operator to watch
adjustments in what he or she
would consider to be real time.
However, if the response time of
the device under test is long, the
speed of the analyzer is immaterial.
We will have to wait for the device
to respond to the changes before
the spectrum will be valid, no
matter how many spectrums we
generate in that time. This is
what makes adjusting lightly
damped (high Q) resonances
tedious.
RMS Averaging
A second case of interest in
determining real-time bandwidth
requirements is measurements
that require RMS averaging. We
might be interested in determining
the spectrum distribution of the
noise itself or in reducing the
variation of a signal contaminated
by noise. There is no requirement
in averaging that the records
must be consecutive with no gaps.
Therefore, a small real-time
bandwidth will not affect the
accuracy of the results.
However, the real time bandwidth
will affect the speed with which
an RMS averaged measurement
can be made. Figure 8.5 shows
that for frequency spans above the
real-time bandwidth, the time to
complete the average of N records
is dependent only on the time to
compute the N transforms. Rather
than continually reducing the time
to compute the RMS average as we
increase our span, we reach a
fixed time to compute N averages.
Transients
The last case of interest in
determining the needed real-time
bandwidth is the analysis of
transient events. If the entire
transient fits within the time
record, the FFT computation time
is of little interest. The analyzer
can be triggered by the transient
and the event stored in the time
record buffer. The time to
compute its spectrum is not
important.
However, if a transient event
contains high-frequency energy
and lasts longer than the time
26
27
Adjusting Devices
We saw in the last section that we
need a new spectrum every few
tenths of a second when adjusting
devices. Without overlap processing
this limits our resolution to a few
Hertz. With overlap processing
our resolution is unlimited. But
we are not getting something for
nothing. Because our overlapped
time record contains old data
from before the device adjustment,
it is not completely correct. It does
indicate the direction and the
amount of change, but we must
wait a full time record after the
change for the new spectrum to
be accurately displayed.
RMS Averaging
Transients
28
Summary
Bibliography
29
Glossary
Aliasing a phenomenon that
can occur when a signal is not
sampled at greater than twice
the maximum frequency
component; high-frequency
signals appear as low-frequency
components; avoided by
filtering out signals greater than
1/2 the sample rate
Anti-alias filter a low pass filter
installed before the sampler
and analog-to-digital converter
to limit the input frequency
range of a signal to prevent
aliasing; designed to filter out
frequencies greater than 1/2 the
sample rate (typically 1/2.56 to
allow for filter rolloff)
Band-selectable analysis an
analysis capability that allows
you to zoom in for a highresolution close-up shot of the
frequency spectrum by
concentrating filters in the
frequency range of interest.
Digital filter a decimating filter
that filters the digital
representation of the input
signal (after it has been
sampled and digitized) to the
desired frequency span. It also
reduces the sample rate at its
output to the rate needed for
that frequency span.
Fast Fourier Transform (FFT)
an algorithm used in computers
and DSAs to compute discrete
frequency components from
sampled time data; invented by
Cooley and Tukey
Flat-top window a windowing
function that minimizes
amplitude error for off-center
input-signal components
30
Pseudo-random noise a
mathematically generated
random noise whose period is
matched to time record length,
thus eliminating leakage
31
www.agilent.com
32