ChipCenter Questlink
SEARCH CHIPCENTER
Search Type:
Search for:




Knowledge Centers
Product Reviews
Data Sheets
Guides & Experts
News
International
Ask Us
Circuit Cellar Online
App Notes
NetSeminars
Careers
Resources
FAQ
EE Times Network
Electronics Group Sites


DSP Main | Archives | Feedback

FFT interpretation extends far beyond the magnitude plot

by Matt Perry, Cirrus Logic

By far the most widely used tool in DSP is the Fourier transform and its fast implementation, the FFT. The FFT's applications are widespread, and its users aren't restricted to engineers. However, most users have yet to fully exploit the FFT, and this article illustrates some lesser-known ways to interpret results. It also points out instances where users sometimes misinterpret FFT data.

An easy trap to fall into

Unless you're careful, misinterpretations can arise easily. When you compute the FFT on a signal, an interesting decision concerns the best way to display the results. Recall that the FFT's output is complex-valued. Because complex numbers are difficult to display on one graph in two dimensions, we must somehow manipulate them. You can represent complex numbers in two basic ways -- using the real and imaginary parts, or using the phasor representation (magnitude and phase).

People typically graph the magnitude because in engineering that curve is extremely useful for both interpreting and applying the FFT. This preference comes from the fact that when you assume a linear time-invariant system, its output magnitude equals the product of the input magnitude and the system's magnitude. This aspect proves helpful in designing filters because you can create arbitrarily shaped spectra.

And while most engineers examine a signal's frequency-domain magnitude exclusively, a few applications also need the phase. One primary example is in the area of control systems, which requires phase to avoid unwanted positive feedback. As for the second complex-number representation, it doesn't happen often in engineering that the real or imaginary parts of the FFT come into play.

Despite their popularity, though, magnitude and phase might not be the panacea for all FFT-based applications. As an example, Fig 1a shows the FFT magnitude for x1(n) + x2(n) at ω = 1/33 and 1/3 radians, respectively. (To convert these frequencies into the normal frequency domain, you must know the sampling frequency and then apply the formula f (in Hz) = ω · fs/ 2π.)

Fig 1 -- Simply adding two signals and examining the resulting FFT magnitude plot (a) can lead to erroneous interpretations. Fig (b), which shows the magnitude plot of the two signals taken separately, differs from the combined-signal plot as the error analysis in (c) shows.

Looking at the plot, you might assume that the additive signals result in an additive magnitude. However, Fig 1b shows what happens if you instead plot |x3| + |x4| -- a small difference between the two curves arises, which the graph in Fig 1c isolates.

Why does this difference arise? This question is easy to answer. As many readers might've already surmised, given two complex numbers a = Re[a] + j Im[a] and b = Re[b] + j Im[b], you can write them as the sum of two complex numbers, a + b, as either Re[a+b] + j Im[a+b] or as

Of course,

definitely doesn't equal |a| + |b|, so the two representations aren't equal.

Some readers might find this conclusion trivial, but my experience shows that it's a key point that people sometimes forget. How many times have you heard someone mention how they've digitized a signal, run an FFT, examined peaks on the magnitude curve and concluded that they're viewing a signal component plus a strong noise component at the exact frequencies shown? How can they reach that conclusion unless they forget about the nonlinear components that arise when you add two complex numbers? This example also illustrates how phase can affect the magnitude of two summed signals. Specifically, the equations that define the magnitude include phase terms.

Based on these results, I'm not advocating that engineers stop using the FFT magnitude as a frequency-analysis tool. However, I am saying that complicated signals (and thus complicated FFT magnitudes) might not be comprised of what you think.

Magnitude plot alternatives

If the magnitude plot isn't completely accurate, what alternatives are available? Another method is to analyze the FFT's real and imaginary parts with the knowledge that the sum of two signals produces an additive real and imaginary FFT, and then you can work with superposition to make concrete interpretations about the curves you examine.

Again, though, because the real/ imaginary format isn't common in many engineering applications, another possibility is to analyze the FFT's phase. Some DSP applications use that information, but it probably doesn't get used as much as it should.

Indeed, theoretically the phase contains more information about a signal than the magnitude; given the FFT phase, you can generate the original signal without knowledge of the magnitude, but you can't generate the original from the magnitude alone.

One difficulty, however, is that a phase plot contains discontinuities caused by the Y axis cycling between ±π/2 and thereby creating discontinuities. Another example illustrates this effect and also shows what the real and imaginary parts look like. Fig 2a plots an ordinary rectangle function, and when you take its FFT, you get the magnitude, phase, real part and imaginary part in Figs 2b-e, respectively.

Fig 2 -- As a basis for comparison in the analysis that generates the plots in Fig 3, review a rectangle pulse in the time domain (a) along with the four common frequency-domain plots that correspond to it, specifically for the phasor representation (magnitude (b) and phase (c)) along with the complex format (real (d) and imaginary (e) parts).

To get a more intuitive feeling for these quantities, I generated random values for the magnitude, phase, real and imaginary parts in separate trials and worked backwards to see how the original signal would change. I concluded that if a random version of, for instance, the magnitude doesn't significantly affect the original signal's shape, then the magnitude might not be an intuitive way to analyze a signal.

Fig 3 -- Taking a rectangle's magnitude plot, replacing it with a random waveform and performing an inverse FFT generates the time-domain waveform in (a). Doing the same for phase as well as the real and imaginary parts generates the waveforms in (b) through (d), respectively. From these plots you can deduce which of the FFT representations seem to carry the most information about the original and what types of information.

Fig 3a shows the result when you randomize the rectangle signal's FFT magnitude, while Figs 3b-d show how replacing the phase, real part and imaginary part affect the rectangle signal. Random phase (Fig 3b) appears to shift the original signal while it retains the signal's basic shape, whereas random magnitude (Fig 3a) appears to destroy the original signal's shape. Notice in Fig 3a, however, the two peaks located where the rectangle starts and finishes. It appears as though the magnitude doesn't contain the signal's locality information. Finally, the real and imaginary random values appear to significantly disturb the signal, so they seem very important to understanding it. In general, this example tries to show that the magnitude isn't the only way to analyze spectral information. The phase, real part and imaginary part each contain signal information but in their own way.

Another example reinforces the thesis that the magnitude might not be the best way to interpret signals. As an experiment, generate 4096 Gaussian random numbers and compute their FFT. Figs 4a-e show histograms of such a signal along with its FFT magnitude, phase, real part and imaginary part, respectively.

Fig 4 -- The time-series histogram for a 4096-point Gaussian random-number waveform naturally takes on a Gaussian shape. Math shows that the magnitude histogram (b) follows a Rayleigh distribution, while the phase (c) is relatively flat. In the other FFT views, the real and imaginary parts generate histograms that look Gaussian.

Assuming that random-number generators produce white noise, the lack of correlation implies that each signal value is independent from the others. Given this fact and the central limit theorem (which states that if you take a collection of random variables and sum them, their distribution should take on a Gaussian shape), you can prove that FFT real and imaginary parts should also be Gaussian. Further, from another mathematical relationship -- which states that if you take two Gaussian random variables, square each, sum them and take the square root results in a Rayleigh distribution -- you can conclude that having Gaussian-distributed real and imaginary parts forces the magnitude to take on a Rayleigh distribution. Similar math relationships also show that the same Gaussian real and imaginary parts force the phase to be uniformly distributed. The figures bear out these claims.

When interpreting these plots, though, I've found that most people (myself included) have an easier time working with signals that are Gaussian distributed because so much of nature is Gaussian. You can completely describe such a distribution with the mean and standard deviation, and the spread of numbers is simple to understand, such as finding the 3-sigma point. Alternative distributions, such as the Rayleigh, aren't as easy to interpret due to skewness that forces values to one side or another, or due to the lack of simple-to-understand mean/standard deviation relationships. Finally, uniformly distributed numbers are very difficult to understand because that distribution implies randomness.

When discussing these effects with other engineers, they point out the fact that these theoretical distributions are based heavily on the assumption that the samples are independent. As such, they sometimes dismiss the theory upon which the results of Fig 4 are based because we seldom encounter true independence in real life. The answer is that in practice, I've found that the central limit theorem can be quite forgiving to dependent signals; you can often apply the central limit theorem even if the variables aren't truly random. To see why, consider a set of values with a colored-noise distribution, which means that some limited correlation exists among them. Figs 5a-d shows the histograms of 1/f colored noise for its FFT magnitude, phase, real part and imaginary part, respectively. In general, the shapes maintain the forms you'd expect for a random signal as shown in Fig 4.

Fig 5 -- When you replace the truly random waveform from Fig 4 with 1/f colored noise, which exhibits limited correlation between datapoints, the magnitude histogram (a) changes dramatically while the phase plot (b) stays relatively flat. Further, the real and imaginary parts are close to the Gaussian form. Thus, the principles you apply to analyzing a truly random waveform are often applicable in the real world, even if real-world signals aren't totally independent.

What do these distributions say about interpreting FFT data? As I stated earlier, people have trouble dealing with magnitude and phase because they're not Gaussian, so in this case, it appears that the real and imaginary parts statistically might be better ways at interpreting the data.

In summary, this article's purpose isn't to kill the FFT magnitude and replace it with either the phase, real part or imaginary part. It is intended to provoke some thought. Often in engineering, we take at face value methods illustrated in books, lectures and magazines. However, there exists a multitude of undiscovered techniques. I've been playing with phase as well as real and imaginary parts for some time and am pleased with the results. I suggest you do your own experimenting into this new world of FFT interpretation.

Matthew Perry is VP and general manager of Cirrus Logic's Embedded Processors Div (www.cirrus.com); Matt was with Motorola Inc when he wrote this article.

This article originally appeared in Personal Engineering & Instrumentation News, May 1994, pgs 67-73. Reprinted with permission of PEC Inc; all rights reserved.
Click here to get your listing up.

Copyright © 2003 ChipCenter-QuestLink
About ChipCenter-Questlink  Contact Us  Privacy Statement   Advertising Information  FAQ