Example: marketing

Lecture 7 -The Discrete Fourier Transform

Lecture 7 - (DFT)is theequivalentofthecontinuousFourierTrans formforsignalsknownonlyat instantsseparatedbysampletimes ( finitesequenceofdata).Let bethecontinuoussignalwhichis samplesbedenoted .TheFourierTransformoftheoriginalsignal, , wouldbe "!$#% '&(*)+) , .-+ /10 2,3 We couldregardeachsample asanimpulsehavingarea 4 5 . Then,sincetheintegrandexistsonlyat thesamplepoints: 6!$#% 7 :+=< >;?@ -+ /A0 2B3 & C D-+ / EGF D-+ /10H?IF F D-+ /10 J ?IF H -+ /A08;:+=< >;?ie. "!$#% K&:+=<LJNMOE D-+ /10 J ?We couldinprincipleevaluatethisforany#, butwithonly datapointstostartwith,only finiteinterval (usuallythefundamentalperiod @) ratherthanfrom QPto82 FPif thewaveformwasperiodic. Similarly, sincethereareonlya finitenumberofinputdatapoints,theDFTtrea tsthedataasif it wereperiodic( to H is thesameas R to S H .)Hencethesequenceshownbelow (a)is consideredtobeoneperiodoftheperiodicsequ enceinplot(b).

The Discrete Fourier Transform (DFT) is the equivalent of the continuous Fourier Transform for signals known only at instants separated by sample times (i.e. a finite sequence of data). Let be the continuous signal which is the source of the data. Let samples be denoted . The Fourier Transform of the original signal,, would be ...

Tags:

  Transform, Fourier, Fourier transform

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of Lecture 7 -The Discrete Fourier Transform

1 Lecture 7 - (DFT)is theequivalentofthecontinuousFourierTrans formforsignalsknownonlyat instantsseparatedbysampletimes ( finitesequenceofdata).Let bethecontinuoussignalwhichis samplesbedenoted .TheFourierTransformoftheoriginalsignal, , wouldbe "!$#% '&(*)+) , .-+ /10 2,3 We couldregardeachsample asanimpulsehavingarea 4 5 . Then,sincetheintegrandexistsonlyat thesamplepoints: 6!$#% 7 :+=< >;?@ -+ /A0 2B3 & C D-+ / EGF D-+ /10H?IF F D-+ /10 J ?IF H -+ /A08;:+=< >;?ie. "!$#% K&:+=<LJNMOE D-+ /10 J ?We couldinprincipleevaluatethisforany#, butwithonly datapointstostartwith,only finiteinterval (usuallythefundamentalperiod @) ratherthanfrom QPto82 FPif thewaveformwasperiodic. Similarly, sincethereareonlya finitenumberofinputdatapoints,theDFTtrea tsthedataasif it wereperiodic( to H is thesameas R to S H .)Hencethesequenceshownbelow (a)is consideredtobeoneperiodoftheperiodicsequ enceinplot(b).

2 (a) (b) :(a)Sequenceof &T U samples.(b) wereperiodic,weevaluatetheDFTequationfor thefundamentalfrequency (onecyclepersequence,<:?Hz,VXW:?rad/sec. )anditsharmonics( (oraverage)at#Y&Z ). #Y&Z [ H\ \ S] ^ \ ]`_ \ S] U or, ingeneral _ &:+=<LJaMOE D-+ /$bdcegfJ _&Z ih S H 83 _ is theDiscreteFourierTransformofthesequence .We maywritethisequationinmatrixformas:jkkkk kl C .. S m nnnnno&jkkkkkkkl ppVprq Tp:+=< pVptspru Tp:+V pvqpuprw Tp:+ p:+=<p:+Vp:+q pmnnnnnnnojkkkkkl C .. m nnnnnowherep&Zx y[z{ ! \}| andp& ~ .DFT exampleLetthecontinuoussignalbe K& dcF $ U H\ @ 1 HzF O \ 2Hz012345678910 4 at 4 timespersecond(ie. = 4Hz)from &r to &qs. Thevaluesofthediscretesamplesaregivenby: &t F $ 5 WV @ F $ \{ byputting &r & &t , & , &t , &Z , &Z R Therefore _ &qLE d-+ / cbfJ&qLJNMOE A ! fJjkkl C m nno&jkkl ! ! ! !m nnojkkl C m nno&jkkl $ !}

3 R H !R m nnoThemagnitudeoftheDFTcoefficientsis shownbelow (Hz)|F[n]| _ &:+=<LJaMOE d-+ / bdcegfJ85is 4 & :+=<LfMOE _ D-U /bdce <:timesthecomplex conjugateoftheoriginal(symmet-ric) _ coefficientsarecomplex. We canassumethatthe 4 valuesarereal(thisis thesimplestcase;therearesituations( )inwhichtwoinputs,at each , aretreatedasacomplex pair, sincethey aretheoutputsfrom oand odemodulators).Intheprocessoftakingtheinversetransformtheterms _ and _ (re-memberthatthespectrumissymmetricalabout:V) combinetoproduce fre-quency components,onlyoneofwhichis consideredtobevalid(theoneatthelowerofthetwo frequencies,_*]VXW?Hzwhere_ :V; thehigherfrequencycomponentis at an aliasingfrequency (_ :V)).Fromtheinversetransformformula,thecontributionto of _ and _ is: f & _ D-/bdcegfJ F _ D-/bdce8;:+f>"J ( )Forall real S _ &:+=<LJaMOE D-+ / bdce8 :+f> JBut-+ / bdce8 :+f> J&-+ /VXWJ 1 forall - /$bdc eJ&Z- /$ S _ & _ ( conjugate)86 SubstitutingintotheEquationfor f above gives, f 4 & _ d-/bdcegfJ F _.

4 -+ /bdcegfJH since-/VXWJ&T ie. f & _ \ _ _ 6 \ _ or f & T _ \ _ F $ _ d sampledsinewave atVXWf:?Hz,ofmagnitudeV: _ Forthespecialcaseof_& , &S 4 ( )andthecontributionof C to 4 is E &<: &averageof & C &r $ impliesa <: C &VEs&r (asexpected)2. {& !R & impliesa fundamentalcomponentofpeakamplitudeV: &Vs] &r withphasegivenby & \ o &t K U \ Y o (asexpected)3. & H _&:V noother S _componenthere)andthisimpliesacomponent V & D-/bdce VJ& 4 H d-/WJ& \{ (asexpected)since D \{ i&t forall 8701230123456f (Hz)|F[n]|sqrt(2)3/sqrt(2) ,theconventionalwayofdisplayingaspectrum is (obviously, theinformationcontentis thesame):Intypicalapplications, is muchgreaterthan ; forexample,for & U R , _ has U components,but ^ U R arethecomplex conjugatesof ^ $ ,leaving E < ,V<BEVs{ < VtoV<BEVsG <A< <<BEVs <V Vasthecosine-onlycomponentat thehighestdistinguishablefrequency _&:V.}}}}

5 Mostcomputerprogrammesevaluate f :(or f b:forthepowerspectralden-sity)whichgives thecorrect shape forthespectrum,exceptforthevaluesat_&Z whatdegreedoestheDFTapproximatetheFourie rtransformofthefunctionunderlyingthedata ?ClearlytheDFTis onlyanapproximationsinceit providesonlyfora maintypesofDFTerrors:aliasingand leakage anothermanifestationofthephenomenonwhich wehave now theinitialsamplesarenotsufficientlyclose lyspacedtorepresenthigh-frequency componentspresentintheunderlyingfunction , ,thesolutionis eithertoincreasethesamplingrate(ifpossib le)ortopre-filterthesignalinordertominim iseitshigh-frequency periodicwaveformrequirestheintegrationto beperformedover theinterval -PtoFPorover weattempttocompletetheDFTovera non-integernumberofcyclesoftheinputsigna l,thenwemightexpectthetransformtobecorru ptedinsomeway. Thisis indeedthecase,aswillnow a sinusoidwitha fractionalnum-berofcyclesinthe (for_& to_&:V)is shownbelow |F[n]| mighthave expectedtheDFTtogive anoutputat justthequantisedfrequen-89cieseitherside ofthetruefrequency.

6 ,whichis knownasleakage, ,whichhasmajordiscontinuities, 1 :Leakage. sofarconsideredandsoit willnotbepossibletoavoidin-troducingdisc ontinuitieswhenusinga touseoneofthewindowfunctionswhichweencou nteredinthedesignofFIRfilters( ).Thesewindowfunctionstaperthesamplestow ardszerovaluesatbothendpoints,andsothere isnodiscontinuity(orverylittle,inthecase oftheHanningwindow) muchreduced, (a)02468012345(b) :Leakage is reducedusinga evaluatea DFTona digitalcomputerdependsprincipallyonthenu mberofmultiplicationsinvolved, , thisnumberis directlyrelatedto V(matrixmultiplicationofa vector),where is , is chosentobeatleast256inordertogeta reasonableapproximationforthespectrumoft hesequenceunderconsideration hencecomputationalspeedbecomesa beendevelopedsincethemid-60 (FFT)algorithmsandthey relyonthefactthatthestandardDFTin-volves a lotofredundantcalculations:Re-writing _ &:+=<LJaMOE D-+ /bdcefJas _ &:+=<LJNMOE dpfJ:it is easytorealisethatthesamevaluesofpfJ:arec alculatedmany , theintegerproduct_ repeatsfordifferentcom-binationsof and_.

7 Secondly,pfJ:is a periodicfunctionwithonly ,consider &9 (theFFTis simplestbyfar if is anintegralpowerof2)p< &t-+ /bdc &t-+ /s X & ! &Z = say Then V& ! Rq & !5 i& s& & u& ! 5 %& !5 &9 &~ Fromtheabove, it canbeseenthat:91pts & pE p & p< pu & pV pv & pvq Also,if_ fallsoutsidetherange0-7,westillgetoneoftheabove and i&r ^ pq &t q & s q&t samplesinto2 summations,eachwith:Vsamples,onefor evenandtheotherfor S&JVfor evenand S&J +=<Vfor oddandwrite: _ &eb+=<L MOE 4 dpV f:Feb+=<L MOE F dp8V < >f:NotethatpV f:&t-+ /bdce8V f>&9-+ /bdceb f&rp febTherefore _ &eb+=<L MOE 4 dp febFp :eb+=<L MOE F dp febie. _ &t _ Fp :i _ Thusthe -pointDFT _ canbeobtainedfromtwo:V-pointtransforms,o neoneveninputdata, _ , andoneonoddinputdata, _ . Althoughthefre-quency index_rangesover values,only:Vvaluesof _ and _ needtobecomputedsince _ and _ areperiodicin_ ,for &9 :92 eveninputdata d $ oddinputdata d d 4 H &t FpE C &t Fp< 4 H &t 4 FpV &t Fprq C &t Fpts C &t C pE C 4 H &t Fp &t p< &t 4 Fpu &t pV 4 H &t Fpv &t prq Thisis showngraphicallyontheflow :N/2pointDFTN/2pointDFTf[0]f[2]f[3]f[4]f [6]f[1]f[5]f[7]H[0]H[3]G[3]G[0]F[0]F[7] is a powerof , wecanrepeattheabove processonthetwo:V-pointtransforms,breaki ngthemdownto.

8 S-pointtransforms,etc , untilwecomedownto & , onlyonefurtherstageis needed( stages,where &Z H ), asshownbelow computedbydividingup,ordecimating, thesamplesequence intosub-sequencesuntilonly -pointDFT s is theinput,ortime,sampleswhicharedividedup ,thisalgorithmis knownasthedecimation-in-time(DIT)algorit hm.(Anequivalentalgorithmexistsforwhicht heoutput,orfrequency, pointsaresub-divided thedecimation-in-frequency algorithm.)Thebasiccomputationat theheartoftheFFTis ,thebutterflycomputa-tionis pointDFTN/4 pointDFTN/4 pointDFTN/4 pointDFTf[0]f[4]f[2]f[6]f[1]f[5]f[3]f[7] F[0]F[7] :FFTflowgraph2. p* : Fp* : R R p :Fp and arecomplex butterflycomputationrequiresonecomplex multiplicationand2 complex ,thattheinputsamplesare bit-reversed (seetablebelow)becauseateachstageofdecim ationthesequenceinputsamplesis separatedintoeven-andodd-indexedsamples.

9 (NB: thebit-reversalalgorithmonlyappliesif is anintegralpowerof ).94 Index [ Vcomplex ( ):Vcomplex B B U V stages,thenumberofcomplex mul-tiplicationsrequiredtoevaluatean -pointDFTwiththeFFTis approximately | B U V (approximatelybecausemultiplicationsbyfa ctorssuchaspE:,peb:,pe :andp e :arereallyjustcomplex additionsandsubtractions). V(DFT):V , U V (FFT)saving321,0248092 25665,5361,02498 1,0241,048,5765, is nota powerof , thereare2 strategiesavailabletocompletean advantageofsuchfactorsas ,if is divisi-bleby ( & R ), thefinaldecimationstagewouldincludea ; (for &v R ) andcomputea $ -pointFFT. (However, youshouldagainbewaryofabrupttransitionsb etweenthetrailing(orleading)edgeofthedat aandthefollowing(orpreceding)zeroes;a betterapproachmightbetopackthedatawithmo rerealistic dummyvalues ).96]


Related search queries