34www.rfdesign.comJanuary 2004

Signal Processing

Understanding the Discrete Fourier Transform

DFT equations, without insight into what the summationssignify, often look formidable to many engineers. DFT canbe interpreted in terms of

spot correlation

to understandthe physical meaning of the transform.

By R.N. Mutagi

iscrete Fourier Transform (DFT) is used

D

extensively in signal processing applica-tions such as communications, broadcasting,entertainment and many other areas. The DFTequations often discourage engineers in otherfields from understanding the digital signalprocessing (DSP) literature. With the devel-opment in analog to digital conversion (ADC)and DSP technology, more and more of theanalog circuits are brought into the arena of DSP. For example, in today’s software-de-fined radio, the RF signal leaves the analogdomain in the early stage of the receiver andis converted to digital at intermediate fre-quency (IF) stage. A typical DSP system isshown in Figure 1.The analog signal is sampled and quan-tized in an ADC and fed to a DSP as asequence of numbers. A programmable DSP,with a suitable architecture dealing with dataand instructions simultaneously, does thenumber crunching with hardware, executingsignal processing tasks. Understanding DFTis imperative for RF and analog engineers.The Fourier transform converts a signalrepresentation from time-domain to frequencydomain for frequency analysis.

However, theFourier transform is a continuous function of frequency and is not suitable for computationwith a DSP. DFT representation of the con-tinuous-time signal permits the computeranalysis. Here, we develop DFT, beginningwith a simple concept of correlation.

Spot correlation

Suppose we try to find which among thewaveforms 2 and 3 in Figure 2 match closelyto waveform 1. We may approach the prob-lem intuitively, but we may not always becorrect. However, a method exists for mea-suring the similarity between two functionsor waveforms. In signal processing we call itcorrelation.We use correlation to estimate a receivedsignal with its known characteristics. Forexample, we recover the carrier from a noisyreceived signal by correlating with a locallygenerated ‘clean’ carrier and the clock fromthe noisy data by correlating with a ‘clean’clock. In both cases, the error, the differencebetween the received signal and its estimate,corrects the oscillatorphase and frequency.In spread-spectrum modu-lation, we correlate a lo-cally generated pseudonoise (PN) pattern with thereceived PN pattern andcorrect its phase beforedemodulating the data.In the DSP literature thecorrelation is mathemati-cally described by the equa-tion(1)Equation 1 provides the correlation

y(

)

between two functions

x

1

(t)

and

x

2

(t)

as afunction of the time shift

. For any value of time shift

, the two functions are multipliedand the result is integrated over infinity. Forperiodic functions this equation is modifiedas(2)As you notice, the integration and averag-ing are done over one period

T

p

because thesignals are now power signals. We now in-troduce a simplified version of Equation 2wherein we take away the time shift t and callit as spot correlation.(3)The spot correlation Equation 3, which issimply the average of the product of twoperiodic signals over the period, is the mea-sure of similarity between

x

1

(t)

and

x

2

(t)

, withno time shift

between any of them, i.e. thecorrelation on the spot. Thus, spot correla-tion provides the pattern matching for thetwo functions. This interpretation comes inhandy when we try to understand the DFTequations. While correlation can be viewedas one function searching to find itself inanother, spot correlation can be interpretedas the measure of how much one function isembedded in another. It is the average of theproduct-sum of two functions, or signals,over the period of interest.

Discrete spot correlation

Sampling a continuous signal

x(t)

, shownin Figure 3(a), with a sampling signal at aregular interval

T

as in Figure 3(b) givesdiscrete-time signal with non-zero values atinstants

nT

as shown in Figure 3(c).We can write the spot correlation equa-tion for two discrete-time signals of

N

samplesas(4)Comparing Equation 4 with Equation 2we notice that the integration over theinterval T for the continuous-time signals isreplaced by summation of N terms for dis-crete-time signals. We can drop the samplinginterval T from Equation 4 for simplicity andrewrite it as

Figure 2. Finding similarity among waveforms.Figure 1. Typical DSP system.

36www.rfdesign.comJanuary 2004

(5)The terms

x

1

(n)

and

x

2

(n)

now represent sequences of

N

numbers,and

y

is their product-sum over the interval

T

. Equation 5 representsthe

discrete spot correlation

.

Fourier series

Transformation is an effort to represent an arbitrary signal with aset of signals (called basis functions) with known characteristics likeamplitude, frequency and phase. The sum of all components in the setprovides an approximation of the arbitrary signal. The differencebetween the original and the replica is an error, measured in terms of the mean squared error (MSE).According to Fourier, any arbitrary periodic signal,

x(t),

is formedby adding up an infinite number of sinusoids with frequencies har-monically related to a fundamental frequency

0

, with proper ampli-tude and phase. In other words, any periodic signal can be decom-posed into an infinite number of sinusoids whose frequencies areinteger multiples of the fundamental frequency

0

of the periodicsignal. The Fourier series expansion of

x(t)

is given by(6)Each sine or cosine term has a part, or is embedded, in

x(t)

. Theconstant term

a

0

corresponds to the DC value (zero frequency) of

x(t)

. The coefficient

a

n

and

b

n

tell us the amplitudes of sine andcosines, i.e. how much each is contributing to

x(t)

. How do we findthe values of

a

n

and

b

n

? Since

a

n

is the amplitude of the

n

th

harmonicof the cosine signal that is embedded in the signal

x(t)

,

we recognizethat it is nothing but the spot correlation of the cosine and

x(t)

. Hence,we obtain

a

n

and

b

n

by using Equation 3.(7)and(8)Equation 6 can be written in exponential form as(9)and(10)A continuous, periodic signal can be decomposed into an infiniteset, called the Fourier series, of harmonically related frequencies, thefundamental frequency being equal to the inverse of the period.

Fourier series to transform

Fourier series provides frequency domain representation for onlyperiodic signals. Unfortunately all signals are not periodic. Speech,music or video signals are examples of non-periodic signals. We musthave a method for obtaining frequency domain representation of non-periodic signals. This is precisely what Fourier transform provides.We can get Fourier transform equations from Fourier series equa-tions following the simple steps in Figure 4.We begin with a rectangular pulse train with period

T

p

and width

t

as shown in Figure 4(a). We can obtain the frequency domain repre-sentation for this signal using the Fourier series expression in Equa-tion 10. The Fourier series, shown in Figure 4 (b), has line frequencies

Figure 3(a). Continuous-time signalFigure 3(b). Sampling signalFigure 3(c). Discrete-time signalFigure 4. (a) A periodic pulse train and (b) its Fourier series.Figure 5. (a) As the periodic tends to infinity the periodic signalbecomes aperiodic and (b) the frequency spacing in the Fourier seriesreduces to zero resulting in Fourier transform.

38www.rfdesign.comJanuary 2004

spaced at

1/T

p

Hz and its envelope has the shape of

sin(x)/(x)

, with thenull at

1/t

Hz. This example helps us in developing intuitively theFourier transform from the series when the signal is not periodic. If the time period

T

p

is increased, it is reflected in the Fourier series withreduced frequency spacing because the spacing between the harmon-ics is equal to the fundamental frequency

f

0

= 1/T

. In the limit, if

T

isincreased to infinity the periodic signal becomes aperiodic as shownin Figure 5(a) and the frequency spacing in the spectrum is reduced tozero as shown in Figure 5(b), making it continuous. This is essentiallythe Fourier Transform.The Fourier series in Equation 6 then needs to be modified bychanging the summation to integration and the discrete frequency n

0

to continuous frequency

. Equation 6 reduces to Fourier transformas given in Equation 11.(11)which may be written in exponential form as(12)The coefficient, or the magnitude,

X(

)

of the exponent

(e

j

)

minimizes the error between the actual signal and its approximationthrough the exponents and is again obtained by using the spotcorrelation equation as below,(13)Thus,

X(

)

tells us how much of

e

-j

t

is present in

x(t)

. Equations12 and 13 form the Fourier transform pairs.

Discrete Fourier Transform

Let us take a close look at Equations 12 and 13. We note that tofind

x(t)

or

X(

)

we need to integrate theproduct of two continuous functions overinfinity. This is fine if we are only doing themath, but if we are interested in finding Fou-rier transform in real-time applications it is just not possible. We need to use some tricksto make it a usable solution. Firstly, we musthave a finite duration signal and a finite spec-tral band. Secondly, the signal must have fi-nite time samples and the spectrum must havefinite frequency components. This is preciselywhat we are going to have, following thesteps given here.Let us begin with a continuous-time non-periodic signal

x(t)

as shown in Figure 6(a).Its Fourier transform would be

X(

)

,which iscontinuous and non-periodic in frequency do-

Figure 6(a). Non-periodic continuous-time signal with itsnon-periodic continous-frequency spectrumFigure 6(b). Non-periodic discrete-time signal with itsperiodic continous-frequency spectrumFigure 6(c). Periodic discrete-time signal and itsperiodic discrete-frequency spectrumFigure 7. An aperiodic discrete-time signal (a) is windowed (b) and thewindowed segment is replicated (c) to make it periodic for which DFTcan be computed.Circle 25 or visit freeproductinfo.net/rfd

Filters