You are on page 1of 4

Understanding DSP's Frequency

Domain, Part 1
By Richard Lyons
This series is drawn from the course "DSP Made Simple for
Engineers." For more information, see
http://www.besserassociates.com/outlinesOnly.asp?CTID=27

–π –π/2 0 π/2 π

The problem
One of the major obstacles engineers encounter while learning digital
signal processing (DSP) is understanding how spectral components are
defined and illustrated in the frequency domain. When people begin to
read DSP literature they encounter strange new terminology describing
discrete spectra such as folding frequency, aliasing, orthogonal,
images, Nyquist, spectral replications, and negative frequency. Typical
DSP spectral diagrams initially seem peculiar because they often show
negative frequency spectral components and what appear to be replicated
spectral components.
Making matters worse for the inquisitive engineer, various DSP
authors use different, and sometimes puzzling, notation in labeling
frequency axis in their spectral plots; often the frequency dimension of
hertz is not used at all in discrete spectral diagrams. For example,
many university DSP textbooks actually label the discrete frequency-axis
covering a range from –π to +π! The perplexing frequency-domain
terminology and notation originate from a kind of frequency ambiguity
inherent in discrete (sampled) systems and the fact that in DSP we
sometimes describe all signals as if they were complex-valued (with real
and imaginary parts). Understanding the differences between analog and
discrete spectra is one of the reasons DSP has the reputation of being
difficult to learn. Fortunately several books have been published that
ease the engineer's burden of learning DSP.[1–3]
For our short journey to understanding the mathematics and notation
of discrete spectra we start by discussing the frequency-domain
ambiguity associated with discrete signals, and arrive at our
destination of understanding the subtle aspects, the notation, and the
language of the discrete frequency domain of DSP. However, as we proceed
we'll make briefs stops to review complex signals, negative frequency,
and discrete spectrum analysis using the fast Fourier transform (FFT).

Frequency-domain ambiguity
We begin by reviewing the source of one unpleasant aspect of sampled-
data systems: the frequency-domain ambiguity that exists when we
digitize a continuous (analog) signal x(t) with an analog-to-digital
(A/D) converter as shown in Figure 1.
Continuous x(t) A/D x(n)
Converter Computer
[Coax cable] [Ribbon cable]

Squarewave whose
Clock frequency is fs Hz.
Generator

Figure 1: Periodic sampling of (digitizing) a continuous signal.

This process samples the continuous x(t) signal to produce the x(n)
sequence of binary words that are stored in the computer for follow-on
processing. (Variable 'n' is a dimensionless integer that we use as our
independent time-domain index in DSP, just as the letter 't' is used in
continuous-time equations.) The x(n) sequence represents the voltage of
x(t) at periodically spaced instants in time, and so we call the Figure
1 process "periodic sampling." We’ll designate the time period between
samples as ts, measured in seconds, and define it as the reciprocal of
the sampling frequency fs, i.e., ts = 1/fs. In the literature of DSP the
fs sampling frequency is given the dimensions of ‘samples/second’, but
sometimes we indicate its dimension as Hz because fs shows up on the
frequency axis of our spectral diagrams.
Looking at an example, consider the effect of sampling a 400 Hz
sinusoidal x(t) waveform at a sampling frequency fs = 1 kHz shown in
Figure 2(a). The x(n) discrete-time samples from the A/D converter are
plotted as the dots, and they’re separated in time by ts = 1
millisecond. The first three samples of the x(n) sequence are x(0) = 0,
x(1) = 0.59, and x(2) = –0.95.

400 Hz 1400 Hz
1 x(1) 1

0 0

x(0)

–1 –1
0 1 2 3 4 5 Time 0 1 2 3 4 5 Time
(ms) (ms)
ts = 1/fs (a) (b)

-600 Hz
1

–1
0 1 2 3 4 5 Time
(ms)
(c)

Figure 2: Frequency-domain ambiguity shown while digitizing


sinusoids whose frequencies are (a) 400 Hz; (b) 1400
Hz, dashed curve; and (c) –600 Hz dashed curve.

The frequency-domain ambiguity of sampled systems we’re demonstrating


here is illustrated in Figure 2(b) where the x(n) samples would be
unchanged if the A/D converter’s analog x(t) input was a 1400 Hz
sinusoid. We see another example in Figure 2(c) where the continuous
x(t) is a –600 Hz sinusoid, again resulting in x(n) samples identical
with those in Figure 2(a). This means that, given the x(n) samples
alone, we can’t tell if the continuous x(t) sinewave’s frequency was 400
Hz, 1400 Hz, or –600 Hz. That uncertainty is what we're calling
"frequency-domain ambiguity." (If the notion of negative frequency
bothers you, don't worry, we’ll justify that concept later. For now,
we’ll merely define a –600 Hz sinewave as one whose phase is shifted by
180o relative to a +600 Hz sinewave.)
As you might imagine, there are an infinite number of other
frequencies that a sinusoidal x(t) could have and still produce the same
x(n) samples in Figure 2. Those other frequencies, that we’ll call
images, having frequencies fi(k), can be identified by:

fi(k) = 400 ± k.fs Hz (1)

where k is an integer, and the 'i' subscript means image. Equation (1)
tells us that, in the world of DSP, sampled values of any continuous
sinewave whose frequency differs from 400 Hz by an integer multiple of
fs are indistinguishable from sampled values a 400 Hz sinewave. A few of
the images of 400 Hz, when fs = 1 kHz, are listed in Figure 3(a).

k f i (k)
Plot of fi(k) frequencies.
... ...
–2 –1600 Hz
–1 –600 Hz
... ...
0 400 Hz
1 1400 Hz
–2 –1 0 1 2 Freq
2 2400 Hz (kHz)
(fs )
... ...

(a) (b)

Figure 3: Examples of image frequencies of 400 Hz when fs is


1 kHz, (a) a few examples, (b) one possible
frequency-domain depiction.

When the pioneers of DSP encountered and understood this frequency-


domain ambiguity, they were faced with the questions of what terminology
to use in its description, and just how should discrete spectral
diagrams be drawn. One common frequency-domain depiction of this
situation is shown in Figure 3(b), where we can say, the spectrum of our
discrete x(n) sequence is an infinite set of spectral impulses
periodically spaced in the frequency domain. (Mathematical proofs
justifying Figure 3(b) are available.[4,5])
Please keep three thoughts in mind here. First, the notion that the
spectrum of the discrete x(n) sequence appears to comprise an infinite
set of spectral impulses does not imply that x(n) has infinite spectral
energy. Those multiple impulses in Figure 3(b) merely indicate that x(n)
could be a sampled (discrete-time) version of any one of infinitely many
continuous sinewaves having different frequencies. Second, please resist
the temptation to call those spectral impulses harmonics. The word
harmonic has a specific meaning in the analog world—related to spurious
tones generated by nonlinear hardware components—that is not implied by
Figure 3(b). For now, let's call those frequency-domain impulses
spectral replications. Third, notice that the spacing between the
spectral replications is the sampling rate fs Hz, as indicated by Eq.
(1).
OK, now we are ready to make our discrete spectral diagram more
complete, and consistent with real-world signals, by tackling the
concepts of quadrature (complex) signals and negative frequency.
Actually, we're forced to do this because so much of DSP deals with
complex numbers; such as the complex-valued (magnitude and phase)
spectra of discrete time-domain sequences, the complex-valued frequency
responses of digital filters, and the complex-valued signals needed to
build modern digital communications systems.
Part 2 of this material provides a brief introduction to quadrature
(complex) signals; leading us to our goal of understanding the nature,
and notation, of the spectral diagrams used in DSP.

REFERENCES
[1] S. Smith, The Scientist and Engineer's Guide to Digital Signal
Processing, http://www.dspguide.com/.

[2] R. Lyons, Understanding Digital Signal Processing, 2/E, Prentice


Hall, Upper Saddle River, New Jersey, 2004.

[3] D. Glover and J. Deller, Digital Signal Processing and the


Microcontroller, Prentice Hall, Upper Saddle River, New Jersey,
1999.

[4] A. Oppenheim, et al, Discrete-Time Signal Processing, Prentice Hall,


Upper Saddle River, New Jersey, 1999, Section 4.2.

[5] J. Proakis and D. Manolakis, Digital Signal Processing-Principles,


Algorithms, and Application, Prentice Hall, Upper Saddle River, New
Jersey, 1996, Section 4.2.9.

ABOUT THE AUTHOR


Richard (Rick) Lyons is a consulting Systems Engineer and lecturer with
Besser Associates in Mountain View, California. He is the author of
"Understanding Digital Signal Processing 2/E" (Prentice-Hall, 2004), and
Editor of, and contributor to, "Streamlining Digital Signal Processing,
A Tricks of the Trade Guidebook" (IEEE Press/Wiley, 2007). He is also an
Associate Editor for the IEEE Signal Processing Magazine.

You might also like