**Processors/DSPs??**

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

**Keywords:components spectral?
signal quadrature?
tutorial domain?
**

**Negative frequency**

The notion of negative frequency is often troubling to engineers who've spent so much time examining the spectra displayed on analog spectrum analyzers. Some engineers think of frequency, by its very nature, as something that cannot be negative. Such as, starting your car and driving minus ten miles. Well, we can give negative frequency a solid physical meaning by defining it properly in the context of complex or quadrature signals. Let's do that now.

Returning to Figure 4, we can also think of another complex exponential *e ^{¨Cj2¦Ðfot}*, the white dot, orbiting in a clockwise direction because its phase angle ¦Õ = ¨C2¦Ð

*f*

_{o}

*t*becomes more negative as time increases. Again, if the frequency

*f*

_{o}= 2Hz, the white dot would rotate around the circle two times or two cycles per second in the clockwise direction. By definition, we call that rotational frequency minus two cycles per second. Those two complex exponentials in Figure 4 are of great interests to us because of what is obtained when they're summed algebraically. For example, what is the sum of the positive-frequency counterclockwise rotating

*e*and the negative-frequency clockwise rotating

^{j2¦Ðfot}*e*when we add their real and imaginary parts separately? That's right. The sum is an oscillating function, whose imaginary part is always zero. That real-only sum is a cosine wave whose peak amplitude is 2. If the magnitudes of the complex exponentials in Figure 4 had been 0.5, instead of 1, they would graphically depict another important Euler identity:

^{¨Cj2¦Ðfot}Equation 3 |

**Equation 3** allows us to represent a real cosine wave as the sum of positive-frequency and negative-frequency complex exponentials. By our definitions, a positive-frequency complex exponential's exponent is positive, and a negative-frequency complex exponential has a negative exponent.

Another Euler identity, **Equation 4**, gives the relationship of a real sinewave as the sum of positive-frequency and negative-frequency complex exponentials.

Equation 4 |

Those *j*?operators in Equation 4 merely describe the relative phase of the complex exponentials at time *t* = 0, as illustrated in **Figure 7**.

Figure 7: The two complex exponentials, at time t = 0, that comprise a sinewave. |

At time *t* = 0, Equation 4 becomes

Equation 5 |

complying with our knowledge that a sinewave's amplitude is zero at time *t* = 0. Don't worry if these concepts of the *j*?operator and complex exponentials seem a little perplexing at this point. You'll get used to them. (Even the great Karl Gauss struggled with these ideas at first. He called the *j*?operator the "shadow of shadows".)

Our ultimate goal is understand the nature of the spectral diagrams used in DSP. In doing so, we had to define the notion of negative frequency, and that definition is inherent in the complex-valued (real and imaginary) representation we use for discrete spectra in DSP. Unlike the amplitude-only results seen when you use an analog spectrum analyzer, in the world of DSP our spectrum analysis provides complex-valued results. That is, discrete spectra show the relative phase shifts between spectral components.

Let's look at the complex spectra of a few simple sinusoids, from the viewpoint of Euler's identities, as shown in **Figure 8**. The time-domain waveform and the complex spectra of a sinewave defined by sin(2¦Ð*f*_{o}*t*) is shown in **Figure 8a**. Shifting that sinewave in time by 90¡ã gives us a cosine wave shown in **Figure 8b**. Another shift in time by ¦Õ¡ã results in a arbitrary-phase cosine wave in **Figure 8c**.

Remember now, the positive and negative-frequency spectral components of the sinewave rotated counterclockwise and clockwise, respectively, by 90¡ã in going from Figure 8a to Figure 8b. If those cosine wave spectral components continued their rotation by ¦Õ¡ã, we'd have the situation shown in Figure 8c. We show these 3D frequency-domain spectra, replete with phase information, because in the world of DSP we're often interested in spectral phase relationships. We use the FFT algorithm to measure spectral magnitude and phase the way an analog engineer uses a network (vector) analyzer. (In case you hadn't noticed, Figure 8 illustrates a very important signal processing principle. A time-domain shift of a time-periodic signal results only in phase shifts in the frequency domain, spectral magnitudes do not change.)

Figure 8: Complex frequency domain representation of three sinusoids. |

The top portion of Figure 8 illustrates Equation 3, and the center portion is a graphical description of Equation 4. Thankfully, we've almost reached our goal. Figure 8 reminds us that one legitimate way to show the spectrum of a real cosine wave is to include both positive and negative-frequency spectral components.

With this thought in mind, we could draw the spectral magnitude (ignoring any phase information) of a continuous 400Hz sinusoid, as shown in **Figure 9a** showing the inherent spectral symmetry about 0Hz when we represent real signal spectra with complex exponentials. By "real signal," we mean an *x*(*t*) signal having a non-zero real part but whose imaginary part is always zero. (Our convention is to treat all signals as complex and to think of real signals as a special case of complex signals.) **Figure 9a** is another graphical representation of Euler's identity in Equation 3.

Figure 9: The spectral magnitude plot of (a) a 400Hz continuous sinusoid and (b) a discrete sequence of a 400Hz sinusoid sampled at a 2kHz sample rate. |

If we apply our convention of "spectral replications due to periodic sampling," we can illustrate the spectral magnitude of discrete samples of a 400Hz sinusoid, sampled at an *f*_{s} = 2kHz sampling rate, as that in **Figure 9b**. And so there you are.

**Figure 9b** is typical of the spectral magnitude representations used in the DSP literature. It combines the spectral replications (centered about integer multiples of *f*_{s}) due to periodic sampling as well as the use of negative frequency components resulting from representing real signals in complex notation.

To review the spectrum of another discrete sequence, **Figure 10a** shows the spectral magnitude of a continuous *x*(*t*) signal having four components in the range of 100Hz to 700Hz, where dark and light squares distinguish the positive and negative-frequency spectral components. **Figure 10b** shows the spectral replication for a discrete *x*(*n*) sequence that's *x*(*t*) sampled at 2kHz. The sole purpose of this article is to show the meaning, relevance and validity of Figure 10b in representing the spectrum of discrete samples of a real sinusoid in the complex-valued world of DSP. This figure reminds us of the following important properties: continuous real signals have spectral symmetry about 0Hz; discrete real signals have spectral symmetry about 0Hz and ¡À*f*_{s}/2Hz.

Figure 10: Spectrum of a signal with four components in the range of 100Hz to 700Hz. (a) Spectral magnitude of the continuous signal. (b) Spectrum of a sampled x(n) sequence when f_{s} = 2kHz, and (c) spectrum of the x'(n) sequence when f_{s} = 1.3kHz. |

**Figure 10** illustrates why the *Nyquist Criterion* for low pass signals¡ªsignals whose spectral components are centered about 0Hz¡ªstates that the *f*_{s} sampling rate must be equal to or greater than twice the highest spectral component of *x*(*t*). Because *x*(*t*)'s highest spectral component is 700Hz, the *f*_{s} sample rate must be no less than 1.4kHz. If *f*_{s} were 1.3kHz as in Figure 10, the centers of the spectral replications would be too close together and spectral overlap would occur. We see that the spectrum in the range of -1kHz to +1kHz in Figure 10c does not correctly represent the original spectrum in Figure 10a. This unfortunate situation is typically called aliasing, and it results in *x'*(*n*) sample values that contain amplitude errors. For real-world, information carrying, signals there is no way to correct for those errors.

For clarity, let's describe this situation using different words. Given the proper sampling shown in Figure 10b, we could apply the *x*(*n*) samples to a DAC, followed by high-performance analog filtering and exactly regenerate (reconstruct) the original analog *x*(*t*) signal. With the improper sampling in Figure 10c, there is no way to generate the original analog *x*(*t*) signal using the corrupted *x'*(*n*) samples.

In Figure 10c, we can see that the spectral overlap is centered about *f*_{s}/2, and that particular frequency is important enough to have its own name; it's sometimes called the folding frequency, but more often it's called the Nyquist frequency. We can make the following very important statement relating continuous and discrete signals, "Only continuous frequency components as high as the Nyquist frequency (*f*_{s}/2) can be unambiguously represented by a discrete sequence obtained at an *f*_{s} sampling rate." Figure 10c also reminds us of another fundamental connection between the worlds of continuous and discrete signals. All of the continuous *x*(*t*) spectral energy shows up in the discrete *x'*(*n*) sequence's spectral frequency range of - *f*_{s}/2 to + *f*_{s}/2.

The purpose for showing replicated spectra as we did in Figure 10 is not to cause complication or confusion, but to provide a straightforward explanation for the effects of overlapped spectra due to aliasing. (Drawing replicated spectra is also useful in illustrating the spectral translation that takes place in bandpass sampling and describing the result of frequency translation operations such digital down-conversion.) With that said, we conclude this article with an explanation of the various¡ªand sometimes puzzling¡ªnotations used for frequency-axis labeling in the DSP literature.

Related Articles | Editor's Choice |

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