11
1 Sampling and the Discrete Fourier Transform Chapter 7 5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 2 Sampling Methods Sampling is most commonly done with two devices, the sample-and-hold (S/H) and the analog-to-digital-converter (ADC) The S/H acquires a CT signal at a point in time and holds it for later use The ADC converts CT signal values at discrete points in time into numerical codes which can be stored in a digital system 5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 3 Sampling Methods During the clock, c(t), aperture time, the response of the S/H is the same as its excitation. At the end of that time, the response holds that value until the next aperture time. Sample-and-Hold 5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 4 Sampling Methods An ADC converts its input signal into a code. The code can be output serially or in parallel. 5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 5 Sampling Methods Excitation-Response Relationship for an ADC 5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 6 Sampling Methods

Sampling Methods - UNT Computer Sciencerakl/class3020/Chapter7.pdf · 1 Sampling and the Discrete Fourier Transform Chapter 7 5/2/05 M.J.Roberts-AlRightsReserved.EditedbyDr.RobertAkl

  • Upload
    vokhanh

  • View
    226

  • Download
    3

Embed Size (px)

Citation preview

1

Sampling and the DiscreteFourier Transform

Chapter 7

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 2

Sampling Methods• Sampling is most commonly done with two

devices, the sample-and-hold (S/H) and theanalog-to-digital-converter (ADC)

• The S/H acquires a CT signal at a point intime and holds it for later use

• The ADC converts CT signal values atdiscrete points in time into numerical codeswhich can be stored in a digital system

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 3

Sampling Methods

During the clock, c(t),aperture time, the responseof the S/H is the sameas its excitation. At theend of that time, theresponse holds that valueuntil the next aperture time.

Sample-and-Hold

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 4

Sampling MethodsAn ADC converts its input signal into a code. The code can be output serially or in parallel.

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 5

Sampling MethodsExcitation-Response Relationship for an ADC

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 6

Sampling Methods

2

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 7

Sampling MethodsEncoded signal samples can be converted back into a CTsignal by a digital-to-analog converter (DAC).

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 8

Pulse Amplitude ModulationPulse amplitude modulation was introduced in Chapter 6.

p t( ) = rectt

w

!

"

#

$ %1

Ts

combt

Ts

!

" &

#

$ '

Modulator

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 9

Pulse Amplitude Modulation

The response of the pulse modulator is

y t( ) = x t( )p t( ) = x t( ) rectt

w

!

"

#

$ %1

Ts

combt

Ts

!

" &

#

$ '

(

) *

+

, -

and its CTFT is

Y f( ) = wfs sinc wkfs( )X f ! kfs( )k=!"

"

#

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 10

Pulse Amplitude Modulation

The CTFT of the response is basically multiple replicasof the CTFT of the excitation with different amplitudes,spaced apart bythe pulse repetition rate.

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 11

Pulse Amplitude Modulation

If the pulse train is modified to make the pulses have a constantarea instead of a constant height, the pulse train becomes

p t( ) =1

wrect

t

w

!

"

#

$ %1

Ts

combt

Ts

!

" &

#

$ '

and the CTFT of the modulated pulse train becomes

Y f( ) = fs sinc wkfs( )X f ! kfs( )k=!"

"

#

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 12

Pulse Amplitude Modulation

As the aperture time, w, of the pulses approaches zero the pulse train approaches an impulse train (a comb function) and the replicas of the original signal’s spectrum all approach the same size. This limit iscalled impulse sampling.

Modulator

3

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 13

Sampling

The fundamentalconsideration insampling theory ishow fast to sample asignal to be able toreconstruct thesignal from thesamples.

High Sampling Rate

Medium Sampling Rate

Low Sampling Rate

CT Signal

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 14

Claude Elwood Shannon

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 15

Shannon’s Sampling Theorem

As an example,let the CT signalto be sampled be

x t( ) = Asinct

w

!

"

#

$

Its CTFT is

XCTFT f( ) = Aw rect wf( )

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 16

Shannon’s Sampling TheoremSample the signal to form a DT signal

x n[ ] = x nTs

( ) = AsincnT

s

w

!

"

#

$

and impulse sample the same signal to formthe CT impulse signal

x! t( ) = Asinct

w

"

#

$

% fs comb fst( ) = A sinc

nTs

w

"

#

$

% ! t & nTs( )

n=&'

'

(

The DTFT of the sampled signal is

XDTFT F( ) = Awfs rect Fwfs( )!comb F( )

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 17

Shannon’s Sampling Theorem

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 18

Shannon’s Sampling Theorem

XCTFT f( ) = Aw rect wf( )

XDTFT F( ) = Awfs rect Fwfs( )!comb F( )

XDTFT F( ) = Awfs rect F ! k( )wfs( )k=!"

"

#

The CTFT of the original signal is

a rectangle.

The DTFT of the sampled signal is

or

a periodic sequence of rectangles.

4

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 19

Shannon’s Sampling TheoremIf the “k = 0” rectangle from the DTFT isisolated and then the transformation,

is made, the transformation is

If this is now multiplied by the result is

which is the CTFT of the original CT signal.

F!f

fs

Awfs rect Fwfs( ) ! Awfs rect wf( )

Ts

Ts Awfs rect Fwfs( )[ ] = Awrect wf( ) = XCTFT f( )

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 20

Shannon’s Sampling TheoremIn this example (but not in general) the original signal can berecovered from the samples by this process:

1. Find the DTFT of the DT signal.2. Isolate the “k = 0” function from step 1.

3. Make the change of variable, , in the result of step 2.4. Multiply the result of step 3 by5. Find the inverse CTFT of the result of step 4.

The recovery process works in this example because the multiplereplicas of the original signal’s CTFT do not overlap in theDTFT. They do not overlap because the original signal isbandlimited and the sampling rate is high enough to separatethem.

F!f

fs

Ts

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 21

Shannon’s Sampling Theorem

If the signal weresampled at a lower rate,the signal recoveryprocess would not workbecause the replicaswould overlap and theoriginal CTFT functionshape would not beclear.

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 22

If a signal is impulse sampled, the CTFT of the impulse-sampled signal is

For the example signal (the sinc function),

which is the same as

Shannon’s Sampling Theorem

X! f( ) = XCTFT f( )"comb Ts f( ) = fs XCTFT f # kfs( )k=#$

$

%

X! f( ) = fs Awrect w f " kfs( )( )k="#

#

$

XDTFT F( )F!

f

fs

= Awfs rect f " kfs( )w( )k="#

#

$

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 23

Shannon’s Sampling Theorem

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 24

Shannon’s Sampling TheoremIf the sampling rate is high enough, in the frequency range,

the CTFT of the original signal and the CTFT of the impulse-sampled signal are identical except for a scaling factor of .Therefore, if the impulse-sampled signal were filtered by an ideallowpass filter with the correct corner frequency, the original signalcould be recovered from the impulse-sampled signal.

!fs

2< f <

fs

2

fs

5

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 25

Shannon’s Sampling Theorem

Suppose a signal isbandlimited with thisCTFT magnitude.

If we impulse sample it ata rate,

the CTFT of the impulse-sampled signal will havethis magnitude.

fs = 4 fm

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 26

Shannon’s Sampling TheoremSuppose the same signalis now impulse sampledat a rate,

The CTFT of the impulse-sampled signal will havethis magnitude.

This is the minimumsampling rate at whichthe original signal couldbe recovered.

fs = 2 fm

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 27

Shannon’s Sampling TheoremNow the most common form of Shannon’s sampling theoremcan be stated.

If a signal is sampled for all time at a rate morethan twice the highest frequency at which itsCTFT is non-zero it can be exactlyreconstructed from the samples.

This minimum sampling rate is called the Nyquist rate. A signalsampled above the Nyquist rate is oversampled and a signalsampled below the Nyquist rate is undersampled.

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 28

Harry Nyquist

2/7/1889 - 4/4/1976

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 29

Timelimited and BandlimitedSignals

• The sampling theorem says that it is possible tosample a bandlimited signal at a rate sufficient toexactly reconstruct the signal from the samples.

• But it also says that the signal must be sampled forall time. This requirement holds even for signalswhich are timelimited (non-zero only for a finitetime).

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 30

Timelimited and Bandlimited SignalsA signal that is timelimitedcannot be bandlimited. Let x(t) bea timelimited signal. Then

The CTFT of x(t) is

Since this sinc function of f is notlimited in f, anything convolvedwith it will also not be limited in fand cannot be the CTFT of abandlimited signal.

x t( ) = x t( )rectt ! t

0

"t#

$

%

&

X f( ) = X f( )!"t sinc "tf( )e# j2$ft0

rectt ! t

0

"t#

$

%

&

6

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 31

Sampling Bandpass SignalsThere are cases in which a sampling rate below the Nyquist ratecan also be sufficient to reconstruct a signal. This applies to so-called bandpass signals for which the width of the non-zero partof the CTFT is small compared with its highest frequency. Insome cases, sampling below the Nyquist rate will not cause thealiases to overlap and the original signal could be recovered byusing a bandpass filter instead of a lowpass filter.

fs < 2 f2

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 32

InterpolationA CT signal can be recovered (theoretically) from an impulse-sampled version by an ideal lowpass filter. If the cutofffrequency of the filter is then

fc

X f( ) = Ts rectf

2 fc

!

" #

$

% & X' f( ) , fm < fc < fs ( fm( )

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 33

InterpolationThe time-domain operation corresponding to the ideallowpass filter is convolution with a sinc function, theinverse CTFT of the filter’s rectangular frequencyresponse.

Since the impulse-sampled signal is of the form,

the reconstructed original signal is

x t( ) = 2fc

fssinc 2 fct( )!x" t( )

x! t( ) = x nTs

( )! t " nTs

( )n="#

#

$

x t( ) = 2fc

fsx nTs( )sinc 2 fc t ! nTs( )( )

n=!"

"

#

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 34

InterpolationIf the sampling is at exactly the Nyquist rate, then

x t( ) = x nTs

( )sinct ! nT

s

Ts

"

# $

%

& '

n=!(

(

)

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 35

Practical InterpolationSinc-function interpolation is theoretically perfect but itcan never be done in practice because it requires samplesfrom the signal for all time. Therefore real interpolationmust make some compromises. Probably the simplestrealizable interpolation technique is what a DAC does.

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 36

Practical InterpolationThe operation of a DAC can be mathematically modeledby a zero-order hold (ZOH), a device whose impulseresponse is a rectangular pulse whose width is the same asthe time between samples.

h t( ) =1 , 0 < t <T

s

0 , otherwise

! " #

$ % &

= rect

t 'Ts

2

Ts

(

)

* * *

+

,

- - -

7

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 37

Practical InterpolationIf the signal is impulse sampled and that signal excites a ZOH,the response is the same as that produced by a DAC when it isexcited by a stream of encoded sample values. The transferfunction of the ZOH is a sinc function.

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 38

Practical InterpolationThe ZOH suppresses aliases but does not entirely eliminate them.

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 39

Practical InterpolationA “natural” idea would be to simply draw straight lines betweensample values. This cannot be done in real time because doingso requires knowledge of the “next” sample value before itoccurs and that would require a non-causal system. If thereconstruction is delayed by one sample time, then it can be donewith a causal system.

Non-Causal First-Order Hold

Causal First-Order Hold

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 40

Sampling a SinusoidCosine sampled at twice itsNyquist rate. Samples uniquelydetermine the signal.

Cosine sampled at exactly itsNyquist rate. Samples do notuniquely determine the signal.

A different sinusoid of thesame frequency with exactlythe same samples as above.

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 41

Sampling a SinusoidSine sampled at its Nyquistrate. All the samples are zero.

Adding a sine at theNyquist frequency(half the Nyquistrate) to any signaldoes not change thesamples.

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 42

Sampling a Sinusoid

Sine sampled slightlyabove its Nyquist rate

Two different sinusoidssampled at the samerate with the samesamples

It can be shown (p. 516) that the samples from two sinusoids,

taken at the rate, , are the same for any integer value of k.

x1t( ) = Acos 2!f

0t +"( )

x2t( ) = Acos 2! f

0+ kfs( )t +"( )

fs

8

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 43

Sampling DT SignalsOne way of representing thesampling of CT signals is byimpulse sampling, multiplyingthe signal by an impulse train (acomb). DT signals are sampledin an analogous way. If x[n] isthe signal to be sampled, thesampled signal is

where is the discrete timebetween samples and the DT

sampling rate is .

xsn[ ] = x n[ ]comb

Ns

n[ ]

Ns

Fs

=1

Ns

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 44

Sampling DT SignalsThe DTFT of the sampled DTsignal is

In this example the aliases donot overlap and it would bepossible to recover the originalDT signal from the samples.The general rule is thatwhere is the maximum DTfrequency in the signal.

XsF( ) = X F( ) comb N

sF( )

= X F( ) combF

Fs

!

" #

$

% &

Fs

> 2Fm

Fm

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 45

Sampling DT SignalsInterpolation is accomplished by passing the impulse-sampled DT signal through a DT lowpass filter.

The equivalent operation in the discrete-time domain is

X F( ) = XsF( )

1

Fs

rectF

2Fc

!

" #

$

% & 'comb F( )

(

) *

+

, -

x n[ ] = xsn[ ]!

2Fc

Fs

sinc 2Fcn( )

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 46

Sampling DT SignalsDecimation

It is common practice, after sampling a DT signal, to removeall the zero values created by the sampling process, leavingonly the non-zero values. This process is decimation, firstintroduced in Chapter 2. The decimated DT signal is

and its DTFT is (p. 518)

Decimation is sometimes called downsampling.

xdn[ ] = x

sNsn[ ] = x N

sn[ ]

XdF( ) = X

s

F

Ns

!

" #

$

% &

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 47

Sampling DT SignalsDecimation

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 48

Sampling DT SignalsThe opposite of downsampling is upsampling. It issimply the reverse of downsampling. If the originalsignal is x[n], then the upsampled signal is

where zeros have been inserted between adjacentvalues of x[n]. If X(F) is the DTFT of x[n], then

is the DTFT of .

xsn[ ] =

xn

Ns

!

" #

$

% & ,

n

Ns

an integer

0 , otherwise

'

( )

* )

Ns!1

XsF( ) = X N

sF( )

xsn[ ]

9

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 49

Sampling DT SignalsThe signal, , can be lowpass filtered to interpolatebetween the non-zero values and form .

xsn[ ]

xin[ ]

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 50

Bandlimited Periodic Signals• If a signal is bandlimited it can be properly

sampled according to the sampling theorem.• If that signal is also periodic its CTFT

consists only of impulses.• Since it is bandlimited, there is a finite

number of (non-zero) impulses.• Therefore the signal can be exactly

represented by a finite set of numbers, theimpulse strengths.

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 51

Bandlimited Periodic Signals• If a bandlimited periodic signal is sampled

above the Nyquist rate over exactly onefundamental period, that set of numbers issufficient to completely describe it

• If the sampling continued, these samesamples would be repeated in everyfundamental period

• So the number of numbers needed tocompletely describe the signal is finite inboth the time and frequency domains

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 52

Bandlimited Periodic Signals

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 53

The Discrete Fourier TransformThe most widely used Fourier method in the world isthe Discrete Fourier Transform (DFT). It is defined by

x n[ ] =1

NF

X k[ ]ej 2!

nk

NF

k=0

NF "1

#DFT

$ % & & X k[ ] = x n[ ]e" j 2!

nk

NF

n=0

NF "1

#

This should look familiar. It is almost identical to the DTFS.

x n[ ] = X k[ ]ej2!

nk

NF

k=0

NF "1

#FS

$ % & X k[ ] =1

NF

x n[ ]e" j2!

nk

NF

n=0

NF "1

#

The difference is only a scaling factor. There really should notbe two so similar Fourier methods with different names but,for historical reasons, there are.

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 54

The Discrete Fourier Transform

The relation betweenthe CTFT of a CTsignal and the DFT ofsamples taken from itwill be illustrated inthe next few slides.Let an original CTsignal, x(t), besampled times at arate, .

NF

fs

Original CT Signal

10

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 55

The Discrete Fourier Transform

The sampled signalis

and its DTFT is

xsn[ ] = x nT

s( )

X s F( ) = fs X fs F ! n( )( )n=!"

"

#

Samples from Original Signal

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 56

The Discrete Fourier Transform

Only samples aretaken. If the first sampleis taken at time, t = 0 (theusual assumption) that isequivalent to multiplyingthe sampled signal by thewindow function,

NF

w n[ ] =1 , 0 ! n < N

F

0 , otherwise

" # $

Sampled and Windowed Signal

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 57

The Discrete Fourier TransformThe last step in theprocess is to periodicallyrepeat the time-domainsignal, which samples thefrequency-domain signal.Then there are twoperiodic impulse signalswhich are related to eachother through the DTFS.Multiplication of theDTFS harmonic functionby the number of samplesin one period yields theDFT.

Sampled, Windowed and Periodically-Repeated Signal

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 58

The Discrete Fourier Transform

The original signal and the final signal are related by

In words, the CTFT of the original signal is transformed byreplacing f with . That result is convolved with theDTFT of the window function. Then that result is transformed

by replacing F by . Then that result is multiplied by .

fsF

k

NF

fs

NF

X sws k[ ] =fs

NF

e! j"F NF !1( )

NF drcl F,NF( )#X fsF( )[ ]F$

k

NF

W(F)

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 59

The Discrete Fourier TransformIt can be shown (pp. 530-532) that the DFT can be used toapproximate samples from the CTFT. If the signal, x(t), is anenergy signal and is causal and if samples are taken fromit over a finite time beginning at time, t = 0, at a rate, , thenthe relationship between the CTFT of x(t) and the DFT of thesamples taken from it is

where . For those harmonic numbers, k, for which

As the sampling rate and number of samples are increased,this approximation is improved.

X kfF( ) ! Tse" j

#kNF sinc

k

NF

$

% &

'

( ) XDFT k[ ]

NF

fs

fF =fs

NF

k << NF

X kfF( ) ! Ts XDFT k[ ]

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 60

The Discrete Fourier TransformIf a signal, x(t), is bandlimited and periodic and issampled above the Nyquist rate over exactly onefundamental period the relationship between the CTFS ofthe original signal and the DFT of the samples is (pp. 532-535)

XDFT

k[ ] = NFX

CTFSk[ ]!comb

NF

k[ ]

That is, the DFT is a periodically-repeated version of theCTFS, scaled by the number of samples. So the impulsestrengths in the base period of the DFT, divided by thenumber of samples, is the same set of numbers as thestrengths of the CTFS impulses.

11

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 61

The Fast Fourier TransformProbably the most used computer algorithm in signal processingis the fast Fourier transform (fft). It is an efficient algorithm forcomputing the DFT. Consider a very simple case, a set of foursamples from which to compute a DFT. The DFT formula is

It is convenient to use the notation, , because then theDFT formula can be written as

X k[ ] = x n[ ]e! j 2"

kn

NF

n=0

NF !1

#

W = e! j2"

NF

X 0[ ]

X 1[ ]

X 2[ ]

X 3[ ]

!

"

# # # #

$

%

& & & &

=

W0

W0

W0

W0

W0

W1

W2

W3

W0

W2

W4

W6

W0

W3

W6

W9

!

"

# # # #

$

%

& & & &

x00[ ]

x01[ ]

x02[ ]

x03[ ]

!

"

# # # #

$

%

& & & &

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 62

The Fast Fourier Transform

The matrix multiplication requires complexmultiplications and N(N - 1) complex additions. The matrixproduct can be re-written in the form,

because , m an integer.

N2

X 0[ ]

X 1[ ]

X 2[ ]

X 3[ ]

!

"

# # # #

$

%

& & & &

=

1 1 1 1

1 W1

W2

W3

1 W2

W0

W2

1 W3

W2

W1

!

"

# # # #

$

%

& & & &

x00[ ]

x01[ ]

x02[ ]

x03[ ]

!

"

# # # #

$

%

& & & &

Wn

=Wn+mNF

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 63

The Fast Fourier Transform

It is possible to factor the matrix into the product of twomatrices.

X 0[ ]

X 2[ ]

X 1[ ]

X 3[ ]

!

"

# # # #

$

%

& & & &

=

1 W00 0

1 W20 0

0 0 1 W1

0 0 1 W3

!

"

# # # #

$

%

& & & &

1 0 W0

0

0 1 0 W0

1 0 W2

0

0 1 0 W2

!

"

# # # #

$

%

& & & &

x00[ ]

x01[ ]

x02[ ]

x03[ ]

!

"

# # # #

$

%

& & & &

It can be shown (pp. 552-553) that 4 multiplications and 12additions are required, compared with 16 multiplications and 12 additions using the original matrix multiplication.

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 64

The Fast Fourier TransformIt is helpful to view the fft algorithm in signal-flow graphform.

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 65

The Fast Fourier Transform

16-PointSignal-Flow

Graph

5/2/05 M. J. Roberts - All Rights Reserved. Edited by Dr. Robert Akl 66

The Fast Fourier TransformThe number of multiplications required for an fft algorithm of

length, , where p is an integer is . The speed

ratio in comparison with the direct DFT algorithm is .

N = 2p

Np

2

2N

p

p N Speed Ratio FFT/DFT

2 4 4 4 16 8 8 256 6416 65536 8192