**Processors/DSPs??**

# Frequency domain tutorial: Understanding spectral components (Part I)

**Keywords:components spectral?
frequency discrete?
signals discrete ambiguity?
**

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.

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 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 ADC (**Figure 1**).

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 *t _{s}*, measured in seconds and define it as the reciprocal of the sampling frequency f

_{s}, i.e.

*t*= 1/

_{s}*f*. In the literature of DSP, the

_{s}*f*sampling frequency is given the dimensions of "samples/second," but sometimes we indicate its dimension as Hz because

_{s}*f*shows up on the frequency axis of our spectral diagrams.

_{s}Looking at an example, consider the effect of sampling a 400Hz sinusoidal *x(t)* waveform at a sampling frequency *f _{s}* = 1kHz shown in

**Figure 2a**. The

*x(n)*discrete-time samples from the ADC are plotted as the dots, and they're separated in time by

*t*= 1ms. The first three samples of the

_{s}*x(n)*sequence are

*x*(0) = 0,

*x*(1) = 0.59, and

*x*(2) = -0.95.

Figure 2: Frequency-domain ambiguity shown while digitizing sinusoids whose frequencies are (a) 400Hz; (b) 1,400Hz, dashed curve; and (c) -600Hz dashed curve. |

The frequency-domain ambiguity of sampled systems we're demonstrating here is illustrated in **Figure 2b**, where the *x(n)* samples would be unchanged if the ADC's analog *x(t)* input was a 1,400Hz sinusoid. We see another example in **Figure 2c**, where the continuous *x(t)* is a -600Hz sinusoid, again resulting in *x(n)* samples identical with those in **Figure 2a**. This means that, given the *x(n)* samples alone, we can't tell if the continuous *x(t)* sinewave's frequency was 400Hz, 1,400Hz or -600Hz. 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 -600Hz sinewave as one whose phase is shifted by 180¡ã relative to a +600Hz 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 *f _{i}(k)*, can be identified by:

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 400Hz by an integer multiple of *f _{s}* are indistinguishable from sampled values a 400Hz sinewave. A few of the images of 400Hz, when

*f*= 1kHz, are listed in

_{s}**Figure 3a**.

Figure 3: Examples of image frequencies of 400Hz when f is 1kHz, (a) a few examples (b) one possible frequency-domain depiction._{s} |

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 3b**, 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 3b** are available.)

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 3b** merely indicate that *x(n)* could be a sampled (discrete-time) version of any one of infinitely many continuous sinewaves having different frequencies. Second, 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 3b**. For now, let's call those frequency-domain impulses spectral replications. Third, notice that the spacing between the spectral replications is the sampling rate *f _{s}* Hz, as indicated by

**Equation 1**.

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 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.

*This is the first part of a two-part series.*

**Richard Lyons Besser Associates**

Related Articles | Editor's Choice |

Visit Asia Webinars to learn about the latest in technology and get practical design tips.