9.4 discrete fourier transform (dft)eceweb1.rutgers.edu/~gajic/solmanual/slides/chapter9_dft.pdf ·...

21
9.4 Discrete Fourier Transform (DFT) The discrete-time Fourier transform, DTFT, can be derived also in the process of numerical evaluation of the integral that defines the Fourier transform. Consider the basic definition of the Fourier transform and approximate it by an infinite sum obtained by performing sampling (discretiza- tion of the time axis) with the sampling period . In such a case, we have The slides contain the copyrighted material from Linear Dynamic Systems and Signals, Prentice Hall, 2003. Prepared by Professor Zoran Gajic 9–43

Upload: others

Post on 01-Apr-2021

32 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 9.4 Discrete Fourier Transform (DFT)eceweb1.rutgers.edu/~gajic/solmanual/slides/chapter9_DFT.pdf · 9.4 Discrete Fourier Transform (DFT) The discrete-timeFourier transform, DTFT,

9.4 Discrete Fourier Transform (DFT)

The discrete-timeFourier transform,DTFT, can be derivedalso in the processof

numericalevaluationof the integral that definesthe Fourier transform. Consider

the basicdefinition of the Fourier transform�

� ��������

andapproximateit by an infinite sumobtainedby performingsampling(discretiza-

tion of the time axis) with the samplingperiod � . In sucha case,we have

��

� � � � ����� �� �� � �

� ��

� � ���� ��� �

The slides contain the copyrighted material from Linear Dynamic Systems and Signals, Prentice Hall, 2003. Prepared by Professor Zoran Gajic 9–43

Page 2: 9.4 Discrete Fourier Transform (DFT)eceweb1.rutgers.edu/~gajic/solmanual/slides/chapter9_DFT.pdf · 9.4 Discrete Fourier Transform (DFT) The discrete-timeFourier transform, DTFT,

or

������� � � ������� �

In order to be able calculatethe DTFT sum numerically (using a computer),we

haveto approximatetheinfinite time durationsignal by its finite time duration

approximation.In that direction,we first define the DTFT of length as�! #"$&% �

�' $�(

This approximationis meaningfulif the signalvaluesareconcentratedin the time

interval andthoseoutsideof this interval havenegligiblevalues.Since

can be arbitrary chosenandsincenoncausalsignalscan be shifted to the right,

in mostcaseswe canfind suchthat the signalDTFT of length canbe usedto

approximatewell the signalDTFT (and the signalFourier transform).

The slides contain the copyrighted material from Linear Dynamic Systems and Signals, Prentice Hall, 2003. Prepared by Professor Zoran Gajic 9–44

Page 3: 9.4 Discrete Fourier Transform (DFT)eceweb1.rutgers.edu/~gajic/solmanual/slides/chapter9_DFT.pdf · 9.4 Discrete Fourier Transform (DFT) The discrete-timeFourier transform, DTFT,

Our goal is to numericallycomputetheDTFT (andtheFouriertransform),which

is a functionof thedigital frequency . Since is a -periodicfunction in

numericalcomputationsof thecorrespondingsumwe will needonly to considerthe

interval . For thepurposeof suchcomputations,this frequencyinterval

hasto bedivided into subintervalssothat thedigital frequenciesareevaluatedat

)

Notethatthesefrequenciesareequidistantlydistributedontheunit circle*+

. Now,

we are readyto definethe DFT, more preciselythe -point DFT of a length

signal as

),!-/.0132

- * 0 +54 ,!-6.01#2

- * 087:9 4;

The slides contain the copyrighted material from Linear Dynamic Systems and Signals, Prentice Hall, 2003. Prepared by Professor Zoran Gajic 9–45

Page 4: 9.4 Discrete Fourier Transform (DFT)eceweb1.rutgers.edu/~gajic/solmanual/slides/chapter9_DFT.pdf · 9.4 Discrete Fourier Transform (DFT) The discrete-timeFourier transform, DTFT,

Thenumberof time samples andthenumberof thefrequencysamples can

be independentlychosen. It is convenientto make . If we can

add zerosat the end of the signal time samplesin order to increaseits length to

. This procedureis calledzero padding. It is demonstratedon the next example.

Note that the zeropaddingproceduredoesnot effect the DFT result.

Example 9.11: Considerthe following signalsamplesandassume

< = > ? @

This signal is zeropaddedto the lengthof as follows

< = > ? @

The slides contain the copyrighted material from Linear Dynamic Systems and Signals, Prentice Hall, 2003. Prepared by Professor Zoran Gajic 9–46

Page 5: 9.4 Discrete Fourier Transform (DFT)eceweb1.rutgers.edu/~gajic/solmanual/slides/chapter9_DFT.pdf · 9.4 Discrete Fourier Transform (DFT) The discrete-timeFourier transform, DTFT,

Matrix Form of DFT

The -point DFT of thelength signalformulacanbeeasilyandconveniently

recordedusinga matrix form. Let us first form the vectorsof signal time samples

and the signal frequencydomainDFT samplesas

... ...

A B... C D B

The DFT formula canbe representedin the following matrix form

where the matrix is definedbyC EGF H�I D�J IKML D�J IONQP LR HSIC

The slides contain the copyrighted material from Linear Dynamic Systems and Signals, Prentice Hall, 2003. Prepared by Professor Zoran Gajic 9–47

Page 6: 9.4 Discrete Fourier Transform (DFT)eceweb1.rutgers.edu/~gajic/solmanual/slides/chapter9_DFT.pdf · 9.4 Discrete Fourier Transform (DFT) The discrete-timeFourier transform, DTFT,

Observefirst that T�U T , and VXW T , which

implies thatall elementsin thefirst raw andin thefirst columnof thematrix are

equalto one. Simplealgebra(evaluationof Y Z U8[:\^]_ for given valuesof )

producesother entriesin matrix . For example

`�a5` bcaGb

Matrix Form for the Inverse of DFT (IDFT)

Assuming that matrixd aGe

is square ( ) and invertible, then

provides a simple formula for the recovery of the

signal time domain samplesfrom its frequency domain DFT samples. From

, under the above assumptions,we have the definition

of the inverseDFT transform, denotedby IDFT

The slides contain the copyrighted material from Linear Dynamic Systems and Signals, Prentice Hall, 2003. Prepared by Professor Zoran Gajic 9–48

Page 7: 9.4 Discrete Fourier Transform (DFT)eceweb1.rutgers.edu/~gajic/solmanual/slides/chapter9_DFT.pdf · 9.4 Discrete Fourier Transform (DFT) The discrete-timeFourier transform, DTFT,

f6g

Thecrucialstepis to showthat thesquarematrix is invertible. This canbedone

by multiplying the matrix by its complexconjugate, h , obtainedby taking the

complexconjugateof eachelementin the matrix. It canbe easilyshownthat

h i

where i is anidentity matrix of dimension . Theaboveimpliesthat the inverse

of matrix hasa very simple form given by

f6g h

The slides contain the copyrighted material from Linear Dynamic Systems and Signals, Prentice Hall, 2003. Prepared by Professor Zoran Gajic 9–49

Page 8: 9.4 Discrete Fourier Transform (DFT)eceweb1.rutgers.edu/~gajic/solmanual/slides/chapter9_DFT.pdf · 9.4 Discrete Fourier Transform (DFT) The discrete-timeFourier transform, DTFT,

Hence,the IDFT is givenby a very simpleformula

j6k l

Scalar Form of IDFT

From the last formula we can recoverevery single componentof the discrete-

time signal by observingthe following fact

j6k l lm�n o n8p:q^rs j mSnt

For eachparticularsamplevalue of , we havet j6kmSu3v

j m�nt mt j6km�u#v

o nw r m

The slides contain the copyrighted material from Linear Dynamic Systems and Signals, Prentice Hall, 2003. Prepared by Professor Zoran Gajic 9–50

Page 9: 9.4 Discrete Fourier Transform (DFT)eceweb1.rutgers.edu/~gajic/solmanual/slides/chapter9_DFT.pdf · 9.4 Discrete Fourier Transform (DFT) The discrete-timeFourier transform, DTFT,

Hence,the scalar form of the IDFT is given byx�y/z{S|3} { ~&���5�

Note that the last formula was derived under the assumptionthat . If

that was not the case,then time domainsamplesof the vector would not be

uniquelyrecoveredfrom frequencydomainDFT samplesof the vector .

Discrete-Time Signal Wrapping (Modulo-N Reduction)

In the casewhen , a very simpleprocedurecalled the signalwrapping

can reducethe original signal length to . Note that the value for is dictated

by the conditionof the samplingtheorem,which sometimesproduceslarge values

for . The wrappingprocedureis demonstratedin the next example.

The slides contain the copyrighted material from Linear Dynamic Systems and Signals, Prentice Hall, 2003. Prepared by Professor Zoran Gajic 9–51

Page 10: 9.4 Discrete Fourier Transform (DFT)eceweb1.rutgers.edu/~gajic/solmanual/slides/chapter9_DFT.pdf · 9.4 Discrete Fourier Transform (DFT) The discrete-timeFourier transform, DTFT,

Example 9.12: Let and with the signalvaluesgiven by

� � � � � � �

The modulo- reducedsignal (wrappedsignal) is given by

� � � � � � � �

In the casewhen is not an integermultiple of , the signalof length canbe

first zero paddedand then wrappedas demonstratedbelow.

Let and . We first form a signal of the length by

using the zero paddingprocedure,that is

� � � � � � � � �

The slides contain the copyrighted material from Linear Dynamic Systems and Signals, Prentice Hall, 2003. Prepared by Professor Zoran Gajic 9–52

Page 11: 9.4 Discrete Fourier Transform (DFT)eceweb1.rutgers.edu/~gajic/solmanual/slides/chapter9_DFT.pdf · 9.4 Discrete Fourier Transform (DFT) The discrete-timeFourier transform, DTFT,

and thenwrap this signal into a signalof length as follows

� � � � � � � � � �

The wrappingprocedureis a consequenceof the following simple fact. Let us

denotethe wrappedsignal by , and let . Then the -point DFT of a

length signal is given by��� � ����� �6� � ���G� ���G� ���G������ �¢¡¤£

�6� �

��� � ���G� ��� �

where the columnsof matrix���G�

are identical to the first columnsof

matrix , that is

¥§¦ ¥�¦ ¨�© ¦OªQ«^¬­ ¥�¦�

The slides contain the copyrighted material from Linear Dynamic Systems and Signals, Prentice Hall, 2003. Prepared by Professor Zoran Gajic 9–53

Page 12: 9.4 Discrete Fourier Transform (DFT)eceweb1.rutgers.edu/~gajic/solmanual/slides/chapter9_DFT.pdf · 9.4 Discrete Fourier Transform (DFT) The discrete-timeFourier transform, DTFT,

It shouldbe emphasizedthat the inverseDFT for the wrappedsignal produces

the samplesof the wrappedsignal, that is

®6¯ °

IDFT in Terms of DFT

An interesting relations can be obtained from and

®6¯ ¯± °. It follows from that

° ° ° ° °

so we have

° °

The slides contain the copyrighted material from Linear Dynamic Systems and Signals, Prentice Hall, 2003. Prepared by Professor Zoran Gajic 9–54

Page 13: 9.4 Discrete Fourier Transform (DFT)eceweb1.rutgers.edu/~gajic/solmanual/slides/chapter9_DFT.pdf · 9.4 Discrete Fourier Transform (DFT) The discrete-timeFourier transform, DTFT,

9.4.1 Fast Fourier Transform (FFT)

In order to calculatenumerically the DFT we have to multiply the

dimensionalmatrix by the vector of length . In general,multiplying a square

matrix of order by a correspondingvector requires ² scalarmultiplications.

In a celebratedpaperthat marks the beginningof the scientific discipline called

digital signal processing(Cooley and Tukey, 1965), it was shownhow to exploit

thespecialstructureof thematrix in orderto evaluatethe requiredproductmore

efficiently andto reducethe numberof the requiredscalarmultiplications. During

the last thirty five yearsmany the FFT algorithmsweredeveloped.The main idea

of thosealgorithmsis to evaluatethe –point DFT in termsof two –point

DFTs, andthento evaluatethe –point DFT in termsof two –point DFTs

and so on. Thosealgorithmshavea commonfeaturethat the requirednumberof

scalarmultiplicationsneededto evaluatethe DFT is given by

The slides contain the copyrighted material from Linear Dynamic Systems and Signals, Prentice Hall, 2003. Prepared by Professor Zoran Gajic 9–55

Page 14: 9.4 Discrete Fourier Transform (DFT)eceweb1.rutgers.edu/~gajic/solmanual/slides/chapter9_DFT.pdf · 9.4 Discrete Fourier Transform (DFT) The discrete-timeFourier transform, DTFT,

³ ³

which in the caseof large valuesfor brings significantsavings. The function

³ growsmuchsloweras increasesthana linear function .

Detailed study of the FFT algorithms is beyond the scopeof this textbook.

Furthermore,sincedigital computersnow performscalarmultiplicationsandscalar

additionswith equalspeed,we will certainlyseein the nearfuture manynew FFT

algorithmsthatareefficient in view of boththenumberof bothscalarmultiplications

and scalaradditionsneededto evaluatethe DFT.

For thepurposeof thiscourse,it is sufficient to evaluatetheFFT usingMATLAB

and its function fft. This can be done in a very simple manneras follows

X=fft(x,N), where is the –datapoint vector and is the soughtDFT.

The slides contain the copyrighted material from Linear Dynamic Systems and Signals, Prentice Hall, 2003. Prepared by Professor Zoran Gajic 9–56

Page 15: 9.4 Discrete Fourier Transform (DFT)eceweb1.rutgers.edu/~gajic/solmanual/slides/chapter9_DFT.pdf · 9.4 Discrete Fourier Transform (DFT) The discrete-timeFourier transform, DTFT,

Note that in evaluatingfft(x,N) the datavector is paddedwith zerosif it has

less than samplesand truncatedif hasmore than samples.The inverse

FFT is computedvia MATLAB using the function ifft asx=ifft(X,N).

9.5 Discrete-Time Fourier Series (DFS)

In Section9.1 we have introducedthe DTFT through the samplingoperationof

a continuous-timesignal and in Section 9.4 we have introducedthe DFT from

the DTFT. The DTFT could have been derived from the discrete-timeFourier

series(DFS) similarly to the Fourier transformbeing derived in Chapter3 from

the continuous-timeFourier series. Since we have alreadyintroducedthe DFT,

now the DFS comesas a by-productof DFT.

Discrete-timeFourierseriescanbe easilydeducedfrom the –point DFT and

its IDFT as the following pair

The slides contain the copyrighted material from Linear Dynamic Systems and Signals, Prentice Hall, 2003. Prepared by Professor Zoran Gajic 9–57

Page 16: 9.4 Discrete Fourier Transform (DFT)eceweb1.rutgers.edu/~gajic/solmanual/slides/chapter9_DFT.pdf · 9.4 Discrete Fourier Transform (DFT) The discrete-timeFourier transform, DTFT,

´�µ/¶·S¸3¹ ¹ º¼» ·O½!¾ ¹

and

¹´�µ6¶

» ¸¿¹µ º» ·§½5¾ ¹

Knowing the fact that is a periodic signal with the period equal to , that

is , we concludethat the first formula representsthe periodic

signal expansionin terms of harmonicsof its fundamentaldigital harmonic

¹ —the discrete-timeFourier series(DFS). The fact that we needonly

harmonicto representa periodic signal follows from the result

ºÁÀ»&Ã¿Ä ´ÆÅ ·§½5¾ º» ·X½5¾ º�Ä ·�ÇÉÈ º&» ·X½5¾

The slides contain the copyrighted material from Linear Dynamic Systems and Signals, Prentice Hall, 2003. Prepared by Professor Zoran Gajic 9–58

Page 17: 9.4 Discrete Fourier Transform (DFT)eceweb1.rutgers.edu/~gajic/solmanual/slides/chapter9_DFT.pdf · 9.4 Discrete Fourier Transform (DFT) The discrete-timeFourier transform, DTFT,

Consequently,the secondformula definesthe discrete-timeFourier seriescoeffi-

cients. Sincea periodicsignalhasan infinite time duration,thesignalobtainedvia

thediscrete-timeFourier serieshasto beperiodicallyextendedalongtheentire time

axis so that . The sameextensionshouldbe

donefor the negativevaluesof the discrete-timeinstants.

It canbe observedthat in contrastto the continuous-timeFourier series, which

representsa continuous-timeperiodic signal in terms of an infinite sum of its

harmonics, the DFS is a finite sumthat contains terms,where is the period

of the discrete-timeperiodic signal. Being representedby a finite sum, the DFS

is always convergent, in contrast to the continuous-timeFourier series whose

convergencerequiresthat the Dirichlet conditionsbe satisfied.

The slides contain the copyrighted material from Linear Dynamic Systems and Signals, Prentice Hall, 2003. Prepared by Professor Zoran Gajic 9–59

Page 18: 9.4 Discrete Fourier Transform (DFT)eceweb1.rutgers.edu/~gajic/solmanual/slides/chapter9_DFT.pdf · 9.4 Discrete Fourier Transform (DFT) The discrete-timeFourier transform, DTFT,

Example 9.13: Considerthe following periodicdiscrete-timesignal

with theperiodequalto . The signalfundamentaldigital harmonicis equal

to Ê . The DFS coefficientsaregiven by

ÊË�Ì6ÍÎÏ Ê

Ì�Ð Î�ÑXÒ5Ó ÔÎÏ Ê

Ì�Ð Î�Ñ Õ Ö

Evaluatingeachof the four Fourier seriescoefficients,we obtain

The slides contain the copyrighted material from Linear Dynamic Systems and Signals, Prentice Hall, 2003. Prepared by Professor Zoran Gajic 9–60

Page 19: 9.4 Discrete Fourier Transform (DFT)eceweb1.rutgers.edu/~gajic/solmanual/slides/chapter9_DFT.pdf · 9.4 Discrete Fourier Transform (DFT) The discrete-timeFourier transform, DTFT,

×�Ø Ù Ú ×�Ø�Û ×�Ø�Ü Ù Ú×�Ø�Û ×�Ø&ÝÉÛ ×�Ø�ÜÞÛ

×�Ø�Ü Ù Ú ×�Ø�Ü�Û ×�Ø�ß Ù Ú

Hence,the DFS representationof the given periodic signal isÜ

à�áãâ â ؼä à Ù Ú

Of course,this hasto be periodicallyextendedto any discrete-timeinstant since

. We can easily check that the DFS obtainedrepresentsthe

original signal, that is

The slides contain the copyrighted material from Linear Dynamic Systems and Signals, Prentice Hall, 2003. Prepared by Professor Zoran Gajic 9–61

Page 20: 9.4 Discrete Fourier Transform (DFT)eceweb1.rutgers.edu/~gajic/solmanual/slides/chapter9_DFT.pdf · 9.4 Discrete Fourier Transform (DFT) The discrete-timeFourier transform, DTFT,

å æ ç å�è åé æ ç

å�è åêÉè å�é�è

å�é æ ç å�é�è å�ë æ ç

The slides contain the copyrighted material from Linear Dynamic Systems and Signals, Prentice Hall, 2003. Prepared by Professor Zoran Gajic 9–62

Page 21: 9.4 Discrete Fourier Transform (DFT)eceweb1.rutgers.edu/~gajic/solmanual/slides/chapter9_DFT.pdf · 9.4 Discrete Fourier Transform (DFT) The discrete-timeFourier transform, DTFT,

Discrete-Time Linear System Response to Periodic Inputs

Similarly, as discussedin Section 5.4.1, we conclude that a hypotheti-

cal system input ìíOî!ï ðproducesthe discrete-timesystem output equal to

ì�í§î5ï ð ñ, where

ñis the discrete-timesystem digital fre-

quencytransferfunction. Using the linearity principle, the periodic input of the

period equal to and the fundamentaldigital harmonicequaltoñ

,

producesthe following zero-stateresponseòôó6õ

í§öñ ñ ñ ì ð íXî5ï

ò�ó6õ

í�öñ ñ ì ð í§î5ï

ñ ñ ñ

The systemoutput is also periodic with the sameperiod (the samefundamental

digital frequency)as the input signal.

The slides contain the copyrighted material from Linear Dynamic Systems and Signals, Prentice Hall, 2003. Prepared by Professor Zoran Gajic 9–63